diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 46 |
1 files changed, 28 insertions, 18 deletions
@@ -1,44 +1,54 @@ -# Maintainer: Vasia Novikov <n1dr+cmarchlinux@yaaandex.com> (replace "aaa" with "a") +# Maintainer: Vasili Novikov (replace "vvv" with "v" in email) vvvasya.novikov+cm3513git@gmail.com pkgname=rua -pkgver=0.17.0 +pkgver=0.19.10 pkgrel=1 pkgdesc='AUR helper in Rust providing control, review, patch application and safe build options' url='https://github.com/vn971/rua' source=("${pkgname}-${pkgver}.tar.gz::https://github.com/vn971/rua/archive/v${pkgver}.tar.gz") -arch=('x86_64' 'i686') +arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64') license=('GPL3') -makedepends=('cargo') +makedepends=('cargo' 'libseccomp') depends=('bubblewrap' 'git' 'pacman' 'xz') optdepends=( 'bubblewrap-suid: version of bubblewrap that works on linux-hardened kernel' - 'shellcheck: check PKGBUILD scripts, taking care of special variables' - 'sudo: package installation can be done via sudo, if convenient' + 'shellcheck: allows checking PKGBUILD scripts, taking care of special variables' + 'sudo: allows package installation via sudo, if desired' ) +# Depending on the environment Rust packages may fail to build with LTO, +# see https://aur.archlinux.org/packages/rua#comment-861014 +options=('!lto') + +b2sums=(35634176f7d5939dd5ef5f013f8a1163bd2612fdaa4ecf477347a75a7ad790edfec04a5663723d677f982a27dc72eb41b27304bcbc97ad8fb4a5c119d17fe32e) + #options+=(!strip) # uncomment if you want readable stack traces -sha256sums=(11ec2129b0ad46173d27195cf2597037ba569660363034206528b588f09a3c41) +prepare() { + cd "$srcdir/$pkgname-$pkgver" + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" +} build () { cd "$srcdir/$pkgname-$pkgver" mkdir -p target/completions - if pacman -T pacman-git > /dev/null; then - _features="git" - fi + # RUSTUP_TOOLCHAIN is specified in project's .rust-toolchain.toml + COMPLETIONS_DIR=target/completions \ + CARGO_TARGET_DIR=target \ + cargo build --frozen --release +} - RUSTUP_TOOLCHAIN=stable \ - COMPLETIONS_DIR=target/completions \ - cargo build --features "${_features:-}" --release +check() { + cd "$srcdir/$pkgname-$pkgver" + cargo test --frozen } package() { cd "$srcdir/$pkgname-$pkgver" - install -Dm755 target/release/rua "${pkgdir}/usr/bin/rua" + install -Dm0755 target/release/rua "${pkgdir}/usr/bin/rua" - install -Dm644 target/completions/rua.bash "${pkgdir}/usr/share/bash-completion/completions/rua.bash" - install -Dm644 target/completions/rua.fish "${pkgdir}/usr/share/fish/completions/rua.fish" - install -Dm644 target/completions/_rua "${pkgdir}/usr/share/zsh/functions/Completion/Linux/_rua" + install -Dm0644 target/completions/rua.bash "${pkgdir}/usr/share/bash-completion/completions/rua.bash" + install -Dm0644 target/completions/rua.fish "${pkgdir}/usr/share/fish/completions/rua.fish" + install -Dm0644 target/completions/_rua "${pkgdir}/usr/share/zsh/functions/Completion/Linux/_rua" } - |