From faa1141a2bf333eaf391e842be7221d1aae390f7 Mon Sep 17 00:00:00 2001 From: timvisee Date: Tue, 31 Aug 2021 16:03:38 +0200 Subject: [PATCH] Further improve Arch AUR packages Based on comments at: https://gitlab.com/timvisee/ffsend/-/commit/10977f056ddf65d34cf86b7f716ee76cbca9fc8b Thanks @alerque --- .gitlab-ci.yml | 2 +- pkg/aur/ffsend-bin/PKGBUILD | 3 +-- pkg/aur/ffsend-git/PKGBUILD | 15 +++++++-------- pkg/aur/ffsend/PKGBUILD | 16 +++++++--------- 4 files changed, 16 insertions(+), 20 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8666459..e1ce00f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -301,7 +301,7 @@ package-aur: - sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i ffsend/PKGBUILD - sed "s/^pkgver=.*\$/pkgver=$VERSION/" -i ffsend-bin/PKGBUILD - sed "s/^pkgver=.*\$/pkgver=$VERSION.$CI_COMMIT_SHORT_SHA/" -i ffsend-git/PKGBUILD - - sed "s/^source=(\"\(.*\)::.*\").*\$/source=(\"\1::$(echo $URL_SOURCE | sed 's/\//\\\//g')\")/" -i ffsend/PKGBUILD + - sed "s/^source=(\".*\").*\$/source=(\"$(echo $URL_SOURCE | sed 's/\//\\\//g')\")/" -i ffsend/PKGBUILD - sed "s/\(\"ffsend-v\$pkgver::\).*\"/\1$(echo $URL_BIN | sed 's/\//\\\//g')\"/" -i ffsend-bin/PKGBUILD - sed "s/\(\"ffsend-v\$pkgver.bash::\).*\"/\1$(echo $URL_BASH_COMPLETION | sed 's/\//\\\//g')\"/" -i ffsend-bin/PKGBUILD - sed "s/\(\"ffsend-v\$pkgver.zsh::\).*\"/\1$(echo $URL_ZSH_COMPLETION | sed 's/\//\\\//g')\"/" -i ffsend-bin/PKGBUILD diff --git a/pkg/aur/ffsend-bin/PKGBUILD b/pkg/aur/ffsend-bin/PKGBUILD index 1b46636..1cfc028 100644 --- a/pkg/aur/ffsend-bin/PKGBUILD +++ b/pkg/aur/ffsend-bin/PKGBUILD @@ -27,10 +27,9 @@ optdepends=('xclip: clipboard support' package() { cd "$srcdir" - # Install Binary install -Dm755 "ffsend-v$pkgver" "$pkgdir/usr/bin/ffsend" - # Install shell completions and LICENSE file + # Shell completions and LICENSE file install -Dm644 "ffsend-v$pkgver.bash" "$pkgdir/usr/share/bash-completion/completions/ffsend" install -Dm644 "ffsend-v$pkgver.zsh" "$pkgdir/usr/share/zsh/site-functions/_ffsend" install -Dm644 "ffsend-v$pkgver.fish" "$pkgdir/usr/share/fish/vendor_completions.d/ffsend.fish" diff --git a/pkg/aur/ffsend-git/PKGBUILD b/pkg/aur/ffsend-git/PKGBUILD index 2925d11..41fa975 100644 --- a/pkg/aur/ffsend-git/PKGBUILD +++ b/pkg/aur/ffsend-git/PKGBUILD @@ -10,9 +10,9 @@ pkgrel=1 pkgdesc="Easily and securely share files from the command line. A Send client." url="https://gitlab.com/timvisee/ffsend" license=('GPL3') -source=("ffsend::git+$url.git") +source=("git+${url}") sha256sums=('SKIP') -arch=('any') +arch=('x86_64' 'i686') provides=('ffsend') conflicts=('ffsend') depends=('ca-certificates') @@ -20,13 +20,13 @@ makedepends=('cargo' 'cmake' 'openssl>=1.0') optdepends=('xclip: clipboard support') prepare() { - cd "$srcdir/ffsend" + cd "${pkgname%-git}" cargo fetch --locked --target "$CARCH-unknown-linux-gnu" } build() { - cd "$srcdir/ffsend" + cd "${pkgname%-git}" export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target @@ -34,19 +34,18 @@ build() { } check() { - cd "$srcdir/ffsend" + cd "${pkgname%-git}" export RUSTUP_TOOLCHAIN=stable cargo test --frozen } package() { - cd "$srcdir/ffsend" + cd "${pkgname%-git}" - # Install Binary install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/ffsend" - # Install shell completions and LICENSE file + # Shell completions and LICENSE file install -Dm644 "contrib/completions/ffsend.bash" \ "$pkgdir/etc/bash_completion.d/ffsend" install -Dm644 "contrib/completions/_ffsend" \ diff --git a/pkg/aur/ffsend/PKGBUILD b/pkg/aur/ffsend/PKGBUILD index e47eed3..09a6c68 100644 --- a/pkg/aur/ffsend/PKGBUILD +++ b/pkg/aur/ffsend/PKGBUILD @@ -10,22 +10,21 @@ pkgrel=1 pkgdesc="Easily and securely share files from the command line. A Send client." 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 +source=("$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=('any') -provides=('ffsend') +arch=('x86_64' 'i686') depends=('ca-certificates') makedepends=('cargo' 'cmake' 'openssl>=1.0') optdepends=('xclip: clipboard support') prepare() { - cd "$srcdir/ffsend-v$pkgver" + cd "$pkgname-v$pkgver" cargo fetch --locked --target "$CARCH-unknown-linux-gnu" } build() { - cd "$srcdir/ffsend-v$pkgver" + cd "$pkgname-v$pkgver" export RUSTUP_TOOLCHAIN=stable export CARGO_TARGET_DIR=target @@ -33,19 +32,18 @@ build() { } check() { - cd "$srcdir/ffsend-v$pkgver" + cd "$pkgname-v$pkgver" export RUSTUP_TOOLCHAIN=stable cargo test --frozen } package() { - cd "$srcdir/ffsend-v$pkgver" + cd "$pkgname-v$pkgver" - # Install Binary install -Dm0755 -t "$pkgdir/usr/bin/" "target/release/$pkgname" - # Install shell completions and LICENSE file + # Shell completions and LICENSE file install -Dm644 "contrib/completions/ffsend.bash" \ "$pkgdir/etc/bash_completion.d/ffsend" install -Dm644 "contrib/completions/_ffsend" \