aboutsummaryrefslogtreecommitdiffstats
path: root/testing/gopass/APKBUILD
blob: 75bdfa081eba9a3f629cf788c2a9b7b206a072f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Claas Störtenbecker <claas.stoertenbecker@gmail.com>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=gopass
pkgver=1.9.0
pkgrel=0
pkgdesc="The slightly more awesome Standard Unix Password Manager for Teams. Written in Go."
url="https://www.gopass.pw"
arch="all !mips !mips64"
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"
options="chmod-clean"
subpackages="
	$pkgname-bash-completion
	$pkgname-zsh-completion
	$pkgname-fish-completion
	"

prepare() {
	mkdir -p "$srcdir/src/github.com/gopasspw"
	mv "$srcdir/$pkgname-$pkgver" "$srcdir/src/github.com/gopasspw/gopass"
	default_prepare
}

check() {
	GOPATH="$srcdir" make test-integration
}

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="5f0dbc42bcdbb5acdb36806b24cc607115eb403e3ca5268818590dccf23e62f5337e570b77c5fadd42e9b508fb419b51603a6cb6bb4abe6d9fa334c9710d61ca  gopass-1.9.0.tar.gz"