gopass: Include shell completion files in package

This commit is contained in:
Iku Iwasa 2020-02-11 16:28:35 +09:00
parent 680f2110f4
commit c717cc9811
2 changed files with 20 additions and 2 deletions

View File

@ -1,7 +1,7 @@
# $NetBSD$
PKGNAME= gopass-1.8.6
PKGREVISION= 4
PKGREVISION= 5
DISTNAME= gopass-${GITHUB_TAG}
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_GITHUB:=gopasspw/}
@ -18,10 +18,25 @@ EXTRACT_USING= bsdtar
GO_DIST_BASE= ${GITHUB_PROJECT}-${PKGVERSION_NOREV}
GO_SRCPATH= github.com/gopasspw/gopass/
INSTALLATION_DIRS+= bin
INSTALLATION_DIRS+= bin \
share/bash-completion/completions \
share/fish/vendor_completions.d \
share/zsh/site-functions
post-build:
cd ${WRKDIR} && \
./bin/gopass completion bash > ${WRKSRC}/completion.bash && \
./bin/gopass completion fish > ${WRKSRC}/completion.fish && \
./bin/gopass completion zsh > ${WRKSRC}/completion.zsh
do-install:
${INSTALL_PROGRAM} ${WRKDIR}/bin/gopass ${DESTDIR}${PREFIX}/bin
${INSTALL_DATA} ${WRKSRC}/completion.bash \
${DESTDIR}${PREFIX}/share/bash-completion/completions/gopass
${INSTALL_DATA} ${WRKSRC}/completion.fish \
${DESTDIR}${PREFIX}/share/fish/vendor_completions.d/gopass.fish
${INSTALL_DATA} ${WRKSRC}/completion.zsh \
${DESTDIR}${PREFIX}/share/zsh/site-functions/_gopass
.include "../../lang/go/go-package.mk"
.include "../../mk/bsd.pkg.mk"

View File

@ -1,2 +1,5 @@
@comment $NetBSD$
bin/gopass
share/bash-completion/completions/gopass
share/fish/vendor_completions.d/gopass.fish
share/zsh/site-functions/_gopass