Further improve Arch AUR packages

Based on comments at:
10977f056d

Thanks @alerque
This commit is contained in:
timvisee 2021-08-31 16:03:38 +02:00
parent 10977f056d
commit faa1141a2b
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
4 changed files with 16 additions and 20 deletions

View file

@ -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

View file

@ -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"

View file

@ -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" \

View file

@ -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" \