# Contributor: Leo # Contributor: Claas Störtenbecker # Maintainer: Leo pkgname=gopass pkgver=1.8.5 pkgrel=1 pkgdesc="The slightly more awesome Standard Unix Password Manager for Teams. Written in Go." url="https://www.gopass.pw" 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" prepare() { mkdir -p "$srcdir/src/github.com/gopasspw" mv "$srcdir/$pkgname-$pkgver" "$srcdir/src/github.com/gopasspw/gopass" } build() { GOPATH="$srcdir" make build 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"