1+ # Maintainer: Gavin Luo <lunt.luo@gmail.com>
2+
3+ pkgname=bsk-cli
4+ pkgver=0.1.9
5+ pkgrel=1
6+ pkgdesc=" BrowserSkill CLI — let AI agents drive your browser through a local bsk daemon and the built-in agent skill"
7+ arch=(' x86_64' ' aarch64' )
8+ url=" https://github.com/Tencent/BrowserSkill"
9+ license=(' MIT' )
10+ # aws-lc-sys/ring C code inherits CFLAGS via the cc crate; with the default
11+ # makepkg lto option (-flto in CFLAGS) its GCC-LTO objects fail to link with
12+ # the lld linker used in the build environment (undefined aws_lc_* symbols).
13+ # See Arch Rust package guidelines: "disable the lto option" for crates that
14+ # bundle C/C++ code such as ring.
15+ options=(' !lto' )
16+ depends=(' glibc' ' gcc-libs' )
17+ makedepends=(' cargo' )
18+ source=(" ${pkgname} -${pkgver} .tar.gz::https://github.com/Tencent/BrowserSkill/archive/refs/tags/cli-v${pkgver} .tar.gz" )
19+ b2sums=(' de5886506a19ac2f942cc5f62b4c77295522cb334921db6dcce45f71db2584cf40540e961411cd80825af3d3517b7229d38cc89d103153496927e6305d2b73e5' )
20+
21+ prepare () {
22+ cd " BrowserSkill-cli-v${pkgver} "
23+ export RUSTUP_TOOLCHAIN=stable
24+ cargo fetch --locked --target " ${CARCH} -unknown-linux-gnu"
25+ }
26+
27+ build () {
28+ cd " BrowserSkill-cli-v${pkgver} "
29+ export RUSTUP_TOOLCHAIN=stable
30+ export CARGO_TARGET_DIR=target
31+ cargo build --frozen --release --all-features
32+ }
33+
34+ check () {
35+ cd " BrowserSkill-cli-v${pkgver} "
36+ export RUSTUP_TOOLCHAIN=stable
37+ # upstream skill_install harness tests mutate HERMES_HOME and race under
38+ # cargo's default parallel threads; serialize to honor the test's own
39+ # "not in parallel" SAFETY assumption (flake is in upstream, not here)
40+ cargo test --frozen --all-features -- --test-threads=1
41+ }
42+
43+ package () {
44+ cd " BrowserSkill-cli-v${pkgver} "
45+ install -Dm0755 -t " ${pkgdir} /usr/bin/" " target/release/bsk"
46+ install -Dm644 LICENSE -t " ${pkgdir} /usr/share/licenses/${pkgname} /"
47+ }
0 commit comments