From 10977f056ddf65d34cf86b7f716ee76cbca9fc8b Mon Sep 17 00:00:00 2001 From: timvisee Date: Tue, 31 Aug 2021 15:32:58 +0200 Subject: [PATCH] Update Arch AUR packages to latest standards Suggested by https://aur.archlinux.org/packages/ffsend/#comment-824438 --- pkg/aur/ffsend-git/PKGBUILD | 29 ++++++++++++++++++++++------- pkg/aur/ffsend/PKGBUILD | 29 ++++++++++++++++++++++------- 2 files changed, 44 insertions(+), 14 deletions(-) diff --git a/pkg/aur/ffsend-git/PKGBUILD b/pkg/aur/ffsend-git/PKGBUILD index a44b52a..2925d11 100644 --- a/pkg/aur/ffsend-git/PKGBUILD +++ b/pkg/aur/ffsend-git/PKGBUILD @@ -12,24 +12,39 @@ url="https://gitlab.com/timvisee/ffsend" license=('GPL3') source=("ffsend::git+$url.git") sha256sums=('SKIP') -arch=('x86_64' 'i686') +arch=('any') provides=('ffsend') conflicts=('ffsend') depends=('ca-certificates') -makedepends=('openssl>=1.0' 'rust>=1.39' 'cargo' 'cmake') -optdepends=('xclip: clipboard support' - 'bash-completion: support auto completion for bash') +makedepends=('cargo' 'cmake' 'openssl>=1.0') +optdepends=('xclip: clipboard support') + +prepare() { + cd "$srcdir/ffsend" + + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" +} build() { - cd ffsend - env CARGO_INCREMENTAL=0 cargo build --release + cd "$srcdir/ffsend" + + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + cargo build --frozen --release +} + +check() { + cd "$srcdir/ffsend" + + export RUSTUP_TOOLCHAIN=stable + cargo test --frozen } package() { cd "$srcdir/ffsend" # Install Binary - install -Dm755 "./target/release/ffsend" "$pkgdir/usr/bin/ffsend" + install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/ffsend" # Install shell completions and LICENSE file install -Dm644 "contrib/completions/ffsend.bash" \ diff --git a/pkg/aur/ffsend/PKGBUILD b/pkg/aur/ffsend/PKGBUILD index 0ccd2f8..e47eed3 100644 --- a/pkg/aur/ffsend/PKGBUILD +++ b/pkg/aur/ffsend/PKGBUILD @@ -12,23 +12,38 @@ url="https://gitlab.com/timvisee/ffsend" license=('GPL3') source=("ffsend-v$pkgver.tar.gz::$url/-/archive/v$pkgver/ffsend-v$pkgver.tar.gz") # automatically set in CI, see: /.gitlab-ci.yml sha256sums=('SKIP') # automatically set in CI, see: /.gitlab-ci.yml -arch=('x86_64' 'i686') +arch=('any') provides=('ffsend') depends=('ca-certificates') -makedepends=('openssl>=1.0' 'rust>=1.39' 'cargo' 'cmake') -optdepends=('xclip: clipboard support' - 'bash-completion: support auto completion for bash') +makedepends=('cargo' 'cmake' 'openssl>=1.0') +optdepends=('xclip: clipboard support') + +prepare() { + cd "$srcdir/ffsend-v$pkgver" + + cargo fetch --locked --target "$CARCH-unknown-linux-gnu" +} build() { - cd "ffsend-v$pkgver" - env CARGO_INCREMENTAL=0 cargo build --release + cd "$srcdir/ffsend-v$pkgver" + + export RUSTUP_TOOLCHAIN=stable + export CARGO_TARGET_DIR=target + cargo build --frozen --release +} + +check() { + cd "$srcdir/ffsend-v$pkgver" + + export RUSTUP_TOOLCHAIN=stable + cargo test --frozen } package() { cd "$srcdir/ffsend-v$pkgver" # Install Binary - install -Dm755 "./target/release/ffsend" "$pkgdir/usr/bin/ffsend" + install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" # Install shell completions and LICENSE file install -Dm644 "contrib/completions/ffsend.bash" \