1 # Maintainer: Orhun Parmaksız <orhun@archlinux.org>
2 # Contributor: Stijn Seghers <stijnseghers at gmail dot com>
5 _commit=62a21c17d035fb62586ca2d0c786ccdca0d5d12c
8 pkgdesc='Cargo command for the shuttle platform'
10 url="https://github.com/shuttle-hq/shuttle"
12 depends=('gcc-libs' 'openssl' 'zlib' 'curl')
13 makedepends=('cargo' 'git')
14 source=("$pkgname::git+$url.git#commit=$_commit"
15 "$pkgname-examples::git+https://github.com/shuttle-hq/examples.git")
23 git config submodule."examples".url "${srcdir}/${pkgname}"-examples
24 git -c protocol.file.allow=always submodule update --init --recursive
28 cargo fetch --locked --target "$CARCH-unknown-linux-gnu"
32 cd "$pkgname/$pkgname"
33 cargo build --release --frozen
35 local compgen="target/release/$pkgname generate -s"
36 $compgen bash >"completions/$pkgname"
37 $compgen fish >"completions/$pkgname.fish"
38 $compgen zsh >"completions/_$pkgname"
42 cd "$pkgname/$pkgname"
43 cargo test --frozen --lib
48 install -Dm 755 "target/release/$pkgname" -t "$pkgdir/usr/bin"
49 install -Dm 644 "$pkgname/README.md" -t "$pkgdir/usr/share/doc/$pkgname"
50 install -Dm 644 "completions/$pkgname" -t "$pkgdir/usr/share/bash-completion/completions/"
51 install -Dm 644 "completions/$pkgname.fish" -t "$pkgdir/usr/share/fish/vendor_completions.d/"
52 install -Dm 644 "completions/_$pkgname" -t "$pkgdir/usr/share/zsh/site-functions/"
55 # vim:set ts=2 sw=2 et: