aboutsummaryrefslogtreecommitdiffstats
path: root/community/gopass/APKBUILD
blob: 3f092882f0c9b2b00355c01fbb664705f276ba87 (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
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Contributor: Claas Störtenbecker <claas.stoertenbecker@gmail.com>
# Maintainer: Anjandev Momi <anjan@momi.ca>
pkgname=gopass
pkgver=1.12.6
pkgrel=0
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"
options="chmod-clean"
subpackages="
	$pkgname-bash-completion
	$pkgname-zsh-completion
	$pkgname-fish-completion
	$pkgname-doc
	"

case $CARCH in
	mips64)
		export GOFLAGS="${GOFLAGS/-buildmode=pie}" # buildmode=pie is not supported on mips64
	;;
esac

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 BUILDFLAGS="\$(BUILDFLAGS_NOPIE) $GOFLAGS"
}

package() {
	GOPATH="$srcdir" make install DESTDIR="$pkgdir" PREFIX="/usr" BUILDFLAGS="\$(BUILDFLAGS_NOPIE) $GOFLAGS"
	install -Dm0644 "$builddir"/fish.completion \
		"$pkgdir"/usr/share/fish/completions/gopass.fish
}

sha512sums="2e237d1135e79e0236091dac38329ce39aad901fa016366f618d92ddc61246f7496d73d8b7fc4e9e5cb723b60c7798736eb2359a3da5ac1a7dce6fa9bb63ae1b  gopass-1.12.6.tar.gz"