From b69933f200628226873e483116624e072d108627 Mon Sep 17 00:00:00 2001 From: timvisee Date: Wed, 28 Aug 2019 19:59:04 +0200 Subject: [PATCH] Fix shell completion installation, add ZSH file and LICENSE in AUR --- .gitlab-ci.yml | 10 +++++++++- pkg/aur/ffsend-bin/PKGBUILD | 12 ++++++++---- pkg/aur/ffsend-git/PKGBUILD | 13 +++++++++---- pkg/aur/ffsend/PKGBUILD | 13 +++++++++---- 4 files changed, 35 insertions(+), 13 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c833ebe..aa1334d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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)' diff --git a/pkg/aur/ffsend-bin/PKGBUILD b/pkg/aur/ffsend-bin/PKGBUILD index a7750ea..b282b69 100644 --- a/pkg/aur/ffsend-bin/PKGBUILD +++ b/pkg/aur/ffsend-bin/PKGBUILD @@ -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" } diff --git a/pkg/aur/ffsend-git/PKGBUILD b/pkg/aur/ffsend-git/PKGBUILD index 5a6d3e2..4e7d1f1 100644 --- a/pkg/aur/ffsend-git/PKGBUILD +++ b/pkg/aur/ffsend-git/PKGBUILD @@ -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" } diff --git a/pkg/aur/ffsend/PKGBUILD b/pkg/aur/ffsend/PKGBUILD index 409d7a7..82482ca 100644 --- a/pkg/aur/ffsend/PKGBUILD +++ b/pkg/aur/ffsend/PKGBUILD @@ -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" }