From 36d4eb46f29fa92a2f9da25c28bec80e6c5ca2da Mon Sep 17 00:00:00 2001 From: andy Date: Fri, 3 Feb 2017 14:28:41 +0100 Subject: gopass: added bash/zsh completion, git snapshot and test useflags Package-Manager: Portage-2.3.3, Repoman-2.3.1 --- app-admin/gopass/gopass-1.0.0.ebuild | 44 ++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 15 deletions(-) (limited to 'app-admin/gopass/gopass-1.0.0.ebuild') diff --git a/app-admin/gopass/gopass-1.0.0.ebuild b/app-admin/gopass/gopass-1.0.0.ebuild index 476a1d6..014f262 100644 --- a/app-admin/gopass/gopass-1.0.0.ebuild +++ b/app-admin/gopass/gopass-1.0.0.ebuild @@ -4,33 +4,47 @@ EAPI=6 -inherit golang-base +inherit bash-completion-r1 -EGO_PN=github.com/justwatchcom/gopass -EGIT_COMMIT="v${PV}" -SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" +EGO_PN=github.com/justwatchcom/${PN} + +if [[ ${PV} == 9999 ]]; then + inherit golang-vcs +else + KEYWORDS="~amd64 ~x86 ~arm" + EGIT_COMMIT="v${PV}" + SRC_URI="https://${EGO_PN}/archive/${EGIT_COMMIT}.tar.gz -> ${P}.tar.gz" + inherit golang-vcs-snapshot +fi DESCRIPTION="The team password manager. Written in Go." HOMEPAGE="https://www.justwatch.com/gopass" LICENSE="MIT" -RESTRICT="test" SLOT="0" -KEYWORDS="~amd64 ~x86" -IUSE="X" -DEPEND="" +IUSE="X zsh-completion test" +DEPEND=">=dev-lang/go-1.6:=" RDEPEND=" app-crypt/gnupg X? ( x11-misc/xclip ) + zsh-completion? ( app-shells/gentoo-zsh-completions ) dev-vcs/git " -DEPEND=">=dev-lang/go-1.6:=" -S="${WORKDIR}/src/${EGO_PN}" -src_unpack() { - mkdir -p "${S}" && cd "${S}" || die - unpack ${A} && mv ${P}/* . || die +src_compile() { + cd "${S}"/src/${EGO_PN} || die + GOPATH="${S}" LDFLAGS="" emake build || die } -src_compile() { - GOPATH="${WORKDIR}" LDFLAGS="" emake build || die +src_install() { + cd "${S}"/src/${EGO_PN} || die + emake DESTDIR="${D}" install + if use zsh-completion; then + emake zsh.completion || die + insinto /usr/share/zsh/site-functions + newins zsh.completion _${PN} + fi + emake bash.completion || die + newbashcomp bash.completion ${PN} + einstalldocs } + -- cgit v1.2.3-65-gdbad