summaryrefslogtreecommitdiff
blob: 108b80c18f66a31d20648c69e5fba3fe8b5745a0 (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
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=6
EGO_PN="github.com/gopasspw/gopass"

inherit golang-vcs-snapshot golang-build bash-completion-r1

DESCRIPTION="a simple but powerful password manager for the terminal"
HOMEPAGE="https://www.gopass.pw/"
SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="MIT"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE=""

DEPEND=">=dev-lang/go-1.11"
RDEPEND="
	dev-vcs/git
	>=app-crypt/gnupg-2
"

PATCHES=( "${FILESDIR}"/${PN}-1.8.4-xc-tests.patch )

src_install() {
	dobin gopass

	local DOCS=( src/${EGO_PN}/{CHANGELOG,CONTRIBUTING}.md src/${EGO_PN}/docs/*.md )
	einstalldocs

	# install fish completion
	./gopass completion fish > "${T}"/${PN}.fish || die
	insinto /usr/share/fish/vendor_completions.d
	doins "${T}"/${PN}.fish

	# install bash completion
	./gopass completion bash > "${T}"/${PN} || die
	dobashcomp "${T}"/${PN}

	# install zsh completion
	./gopass completion zsh > "${T}"/${PN}.zsh || die
	insinto /usr/share/zsh/site-functions
	newins "${T}"/${PN}.zsh _${PN}
}