Fix shell completion installation, add ZSH file and LICENSE in AUR

This commit is contained in:
timvisee 2019-08-28 19:59:04 +02:00
parent 4c185539a4
commit b69933f200
No known key found for this signature in database
GPG key ID: B8DB720BC383E172
4 changed files with 35 additions and 13 deletions

View file

@ -280,7 +280,9 @@ package-aur:
- URL_BIN=https://github.com/timvisee/ffsend/releases/download/v$VERSION/ffsend-v$VERSION-linux-x64-static
- URL_SOURCE=https://gitlab.com/timvisee/ffsend/-/archive/v$VERSION/ffsend-v$VERSION.tar.gz
- URL_BASH_COMPLETION=https://gitlab.com/timvisee/ffsend/raw/v$VERSION/contrib/completions/ffsend.bash
- URL_ZSH_COMPLETION=https://gitlab.com/timvisee/ffsend/raw/v$VERSION/contrib/completions/_ffsend
- URL_FISH_COMPLETION=https://gitlab.com/timvisee/ffsend/raw/v$VERSION/contrib/completions/ffsend.fish
- URL_LICENSE=https://gitlab.com/timvisee/ffsend/raw/v$VERSION/LICENSE
- 'echo "Selected binary URL: $URL_BIN"'
- 'echo "Selected source URL: $URL_SOURCE"'
- echo "Determining sha256sum for remote binary..."
@ -288,8 +290,12 @@ package-aur:
- 'echo "Got sha256sum: $SHA_BIN"'
- 'SHA_BASH_COMPLETION=$(curl -sSL "$URL_BASH_COMPLETION" | sha256sum | cut -d" " -f1)'
- 'echo "Got sha256sums of bash completion: $SHA_BASH_COMPLETION"'
- 'SHA_ZSH_COMPLETION=$(curl -sSL "$URL_ZSH_COMPLETION" | sha256sum | cut -d" " -f1)'
- 'echo "Got sha256sums of ZSH completion: $SHA_ZSH_COMPLETION"'
- 'SHA_FISH_COMPLETION=$(curl -sSL "$URL_FISH_COMPLETION" | sha256sum | cut -d" " -f1)'
- 'echo "Got sha256sums of fish completion: $SHA_FISH_COMPLETION"'
- 'SHA_LICENSE=$(curl -sSL "$URL_LICENSE" | sha256sum | cut -d" " -f1)'
- 'echo "Got sha256sums of LICENSE: $SHA_LICENSE"'
- echo "Determining sha256sum for remote source..."
- 'SHA_SOURCE=$(curl -sSL "$URL_SOURCE" | sha256sum | cut -d" " -f1)'
- 'echo "Got sha256sum: $SHA_SOURCE"'
@ -302,9 +308,11 @@ package-aur:
- sed "s/^source=(\"\(.*\)::.*\").*\$/source=(\"\1::$(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
- sed "s/\(\"ffsend-v\$pkgver.fish::\).*\"/\1$(echo $URL_FISH_COMPLETION | sed 's/\//\\\//g')\"/" -i ffsend-bin/PKGBUILD
- sed "s/\(\"LICENSE-v\$pkgver::\).*\"/\1$(echo $URL_LICENSE | sed 's/\//\\\//g')\"/" -i ffsend-bin/PKGBUILD
- sed "s/^sha256sums=.*\$/sha256sums=('$SHA_SOURCE')/" -i ffsend/PKGBUILD
- sed "s/^sha256sums=.*\$/sha256sums=('$SHA_BIN' '$SHA_BASH_COMPLETION' '$SHA_FISH_COMPLETION')/" -i ffsend-bin/PKGBUILD
- sed "s/^sha256sums=.*\$/sha256sums=('$SHA_BIN' '$SHA_BASH_COMPLETION' '$SHA_ZSH_COMPLETION' '$SHA_FISH_COMPLETION' '$SHA_LICENSE')/" -i ffsend-bin/PKGBUILD
# Get SHA hash for local and remote file w/o version, update if it has changed
- 'SHA_STRIP_LOCAL=$(cat ffsend-git/PKGBUILD | sed /^pkgver=.\*/d | sha256sum | cut -d" " -f1)'

View file

@ -13,7 +13,9 @@ url="https://gitlab.com/timvisee/ffsend"
license=('GPL3')
source=("ffsend-v$pkgver::https://github.com/timvisee/ffsend/releases/download/v$pkgver/ffsend-v$pkgver-linux-x64-static"
"ffsend-v$pkgver.bash::https://raw.githubusercontent.com/timvisee/ffsend/v$pkgver/contrib/completions/ffsend.bash"
"ffsend-v$pkgver.fish::https://raw.githubusercontent.com/timvisee/ffsend/v$pkgver/contrib/completions/ffsend.fish") # automatically set in CI, see: /.gitlab-ci.yml
"ffsend-v$pkgver.zsh::https://raw.githubusercontent.com/timvisee/ffsend/v$pkgver/contrib/completions/_ffsend"
"ffsend-v$pkgver.fish::https://raw.githubusercontent.com/timvisee/ffsend/v$pkgver/contrib/completions/ffsend.fish"
"LICENSE-v$pkgver::https://raw.githubusercontent.com/timvisee/ffsend/v$pkgver/LICENSE") # automatically set in CI, see: /.gitlab-ci.yml
sha256sums=('SKIP')
arch=('x86_64')
provides=('ffsend')
@ -28,7 +30,9 @@ package() {
# Install Binary
install -Dm755 "ffsend-v$pkgver" "$pkgdir/usr/bin/ffsend"
# Install completions
install -Dm644 "ffsend-v$pkgver.bash" "$pkgver/usr/share/bash-completion/completions/ffsend"
install -Dm644 "ffsend-v$pkgver.fish" "$pkgver/usr/share/fish/vendor_completions.d/ffsend.fish"
# Install 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"
install -Dm644 "LICENSE-v$pkgver" "$pkgdir/usr/share/licenses/ffsend/LICENSE"
}

View file

@ -31,8 +31,13 @@ package() {
# Install Binary
install -Dm755 "./target/release/ffsend" "$pkgdir/usr/bin/ffsend"
# Install completions
cd "./contrib/completions"
install -Dm644 "ffsend.bash" "$pkgver/usr/share/bash-completion/completions/ffsend"
install -Dm644 "ffsend.fish" "$pkgver/usr/share/fish/vendor_completions.d/ffsend.fish"
# Install shell completions and LICENSE file
install -Dm644 "contrib/completions/ffsend.bash" \
"$pkgdir/etc/bash_completion.d/ffsend"
install -Dm644 "contrib/completions/_ffsend" \
"$pkgdir/usr/share/zsh/site-functions/_ffsend"
install -Dm644 "contrib/completions/ffsend.fish" \
"$pkgdir/usr/share/fish/vendor_completions.d/ffsend.fish"
install -Dm644 "LICENSE" \
"$pkgdir/usr/share/licenses/ffsend/LICENSE"
}

View file

@ -30,8 +30,13 @@ package() {
# Install Binary
install -Dm755 "./target/release/ffsend" "$pkgdir/usr/bin/ffsend"
# Install completions
cd "./contrib/completions"
install -Dm644 "ffsend.bash" "$pkgver/usr/share/bash-completion/completions/ffsend"
install -Dm644 "ffsend.fish" "$pkgver/usr/share/fish/vendor_completions.d/ffsend.fish"
# Install shell completions and LICENSE file
install -Dm644 "contrib/completions/ffsend.bash" \
"$pkgdir/etc/bash_completion.d/ffsend"
install -Dm644 "contrib/completions/_ffsend" \
"$pkgdir/usr/share/zsh/site-functions/_ffsend"
install -Dm644 "contrib/completions/ffsend.fish" \
"$pkgdir/usr/share/fish/vendor_completions.d/ffsend.fish"
install -Dm644 "LICENSE" \
"$pkgdir/usr/share/licenses/ffsend/LICENSE"
}