WIP: Add PKGBUILD for local Arch/Manjaro install #14
3 changed files with 76 additions and 0 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
|
@ -1,2 +1,7 @@
|
|||
/target
|
||||
.idea/**
|
||||
|
||||
# makepkg build artifacts
|
||||
/packaging/pkg/
|
||||
/packaging/src/
|
||||
/packaging/*.pkg.tar.zst
|
||||
|
|
|
|||
24
README.md
24
README.md
|
|
@ -111,6 +111,30 @@ excluded), so it's a real edge case, not a hypothetical. Not fixed for now
|
|||
since it takes a document engineered to trigger it, but worth knowing if a
|
||||
report seems to be missing something you know is in an uploaded document.
|
||||
|
||||
## Installing (Arch/Manjaro)
|
||||
|
||||
[`packaging/PKGBUILD`](./packaging/PKGBUILD) builds and installs `doubleo7`
|
||||
as a proper pacman package (`doubleo7-git`), pulling source straight from
|
||||
this repo's git history rather than a crates.io release:
|
||||
|
||||
```
|
||||
cd packaging
|
||||
makepkg -si
|
||||
```
|
||||
|
||||
`-s` resolves `makedepends` (`cargo`, `git`) via pacman first, `-i`
|
||||
installs the resulting package after building it. To pick up upstream
|
||||
changes later, just rerun the same command from a checkout with the latest
|
||||
commits — `pkgver()` derives its version from `git rev-list`/`git
|
||||
rev-parse`, so `makepkg` detects the new commit, rebuilds, and `pacman -U`
|
||||
replaces the old install in place. Uninstall with `sudo pacman -R
|
||||
doubleo7-git`.
|
||||
|
||||
Note: Manjaro's default `CFLAGS`/`LDFLAGS` hardening flags corrupt the
|
||||
vendored C build inside `aws-lc-sys` (a transitive TLS dependency), causing
|
||||
a symbol-mismatch link error — `PKGBUILD`'s `build()` unsets them before
|
||||
invoking `cargo build` to work around it.
|
||||
|
||||
## Project layout
|
||||
|
||||
Split one concern per file rather than one large module:
|
||||
|
|
|
|||
47
packaging/PKGBUILD
Normal file
47
packaging/PKGBUILD
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
# Maintainer: Austin Schaefer <schaefer.austin.p@inbox.eu>
|
||||
pkgname=doubleo7-git
|
||||
pkgver=0.2.0.r59.g8d7f8b6
|
||||
pkgrel=1
|
||||
pkgdesc="Local-first, multi-agent deep-research CLI"
|
||||
arch=('x86_64')
|
||||
url="https://code.austinschaefer.com/schaefera/doubleo7"
|
||||
license=('custom')
|
||||
depends=('gcc-libs')
|
||||
makedepends=('cargo' 'git' 'cmake')
|
||||
provides=('doubleo7')
|
||||
conflicts=('doubleo7')
|
||||
source=("$pkgname::git+ssh://git@51.15.208.55:22222/schaefera/doubleo7.git")
|
||||
sha256sums=('SKIP')
|
||||
|
||||
pkgver() {
|
||||
cd "$pkgname"
|
||||
local base
|
||||
base=$(grep -m1 '^version' Cargo.toml | cut -d '"' -f2)
|
||||
printf "%s.r%s.g%s" "$base" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname"
|
||||
cargo fetch --locked
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname"
|
||||
export RUSTUP_TOOLCHAIN=stable
|
||||
# Distro CFLAGS/LDFLAGS hardening flags corrupt aws-lc-sys's vendored C
|
||||
# build (symbol-prefix mismatch at link time); build it with cc-rs's own
|
||||
# defaults instead.
|
||||
unset CFLAGS CXXFLAGS LDFLAGS CPPFLAGS
|
||||
cargo build --frozen --release
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$pkgname"
|
||||
cargo test --frozen --release
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname"
|
||||
install -Dm755 "target/release/doubleo7" "$pkgdir/usr/bin/doubleo7"
|
||||
install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
|
||||
}
|
||||
Loading…
Reference in a new issue