aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gopass
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-05-03 22:41:13 -0300
committerKevin Daudt <kdaudt@alpinelinux.org>2019-05-05 06:16:25 +0000
commit221638333c7322a9bf4b1733e9d3a21217f856a1 (patch)
tree0ca4dd7831e3b458abc2ba5c5844e316a80681a0 /testing/gopass
parent712738b7aac404b8065bf280b4ccc97c39c5acc3 (diff)
downloadaports-221638333c7322a9bf4b1733e9d3a21217f856a1.tar.bz2
aports-221638333c7322a9bf4b1733e9d3a21217f856a1.tar.xz
testing/gopass: enable completions
Diffstat (limited to 'testing/gopass')
-rw-r--r--testing/gopass/APKBUILD45
1 files changed, 37 insertions, 8 deletions
diff --git a/testing/gopass/APKBUILD b/testing/gopass/APKBUILD
index f68aa7c382..57146a8d71 100644
--- a/testing/gopass/APKBUILD
+++ b/testing/gopass/APKBUILD
@@ -1,16 +1,21 @@
+# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Claas Störtenbecker <claas.stoertenbecker@gmail.com>
-# Maintainer: Claas Störtenbecker <claas.stoertenbecker@gmail.com>
+# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=gopass
pkgver=1.8.5
-pkgrel=0
+pkgrel=1
pkgdesc="The slightly more awesome Standard Unix Password Manager for Teams. Written in Go."
url="https://www.gopass.pw"
-arch="x86_64"
+arch="all"
license="MIT"
depends="gnupg git"
makedepends="go ncurses"
source="${pkgname}-${pkgver}.tar.gz::https://github.com/gopasspw/gopass/archive/v$pkgver.tar.gz"
builddir="$srcdir/src/github.com/gopasspw/$pkgname"
+subpackages="
+ $pkgname-bash-completion:bashcomp:noarch
+ $pkgname-zsh-completion:zshcomp:noarch
+ $pkgname-fish-completion:fishcomp:noarch"
# test suite exists but fails for reasons i don't know yet, will talk with gopass developer
options="!check"
@@ -20,14 +25,38 @@ prepare() {
}
build() {
- export GOPATH="$srcdir"
- cd "$builddir"
- make build
-}
+ GOPATH="$srcdir" make build
-#check() {}
+ for completion in bash zsh fish; do
+ ./gopass completion $completion > ${completion}.completion;
+ done
+}
package() {
install -Dm755 "$builddir/$pkgname" -t "$pkgdir/usr/bin"
}
+
+bashcomp() {
+ depends=""
+ pkgdesc="Bash completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel bash-completion"
+
+ install -Dm0644 "$builddir"/bash.completion "$subpkgdir"/usr/share/bash-completion/completions/gopass
+}
+
+zshcomp() {
+ depends=""
+ pkgdesc="Zsh completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel zsh"
+
+ install -Dm0644 "$builddir"/zsh.completion "$subpkgdir"/usr/share/zsh/site-functions/_gopass
+}
+
+fishcomp() {
+ depends=""
+ pkgdesc="Fish completions for $pkgname"
+ install_if="$pkgname=$pkgver-r$pkgrel fish"
+
+ install -Dm0644 "$builddir"/fish.completion "$subpkgdir"/usr/share/fish/completions/gopass.fish
+}
sha512sums="1f451b10aa87141de635650489bf7227c252e10e5139dad274c95d5625db74fec0b8892a468800d3d3c5dd8b3d64f1c93bd6c75a0ba54fe5f6e630c77b2c6c71 gopass-1.8.5.tar.gz"