void-packages/srcpkgs/gopass/template

41 lines
1.2 KiB
Bash

# Template file for 'gopass'
pkgname=gopass
version=1.10.1
revision=1
build_style=go
go_import_path=github.com/gopasspw/gopass
makedepends="gnupg2"
depends="gnupg2 git"
short_desc="Slightly more awesome standard unix password manager for teams"
maintainer="Felipe Nogueira <contato.fnog@gmail.com>"
license="MIT"
homepage="https://www.gopass.pw/"
changelog="https://raw.githubusercontent.com/gopasspw/gopass/master/CHANGELOG.md"
distfiles="https://github.com/gopasspw/gopass/archive/v${version}.tar.gz"
checksum=f4bfe03bc26701baf411795faafe774aa6025bc6050ab3ebf7e931e5ff821961
if [ "$CROSS_BUILD" ]; then
# Depend on system gopass to generate completions
hostmakedepends+=" gopass"
fi
post_build() {
local GOPASS=${GOPATH}/bin/gopass
local completions=(zsh bash fish)
if [ "$CROSS_BUILD" ]; then
GOPASS=/usr/bin/gopass
fi
for completion in "${completions[@]}"; do
$GOPASS completion $completion > ${completion}.completion;
done
}
post_install() {
install -Dm0755 zsh.completion ${DESTDIR}/usr/share/zsh/site-functions/_gopass
install -Dm0755 bash.completion ${DESTDIR}/usr/share/bash-completion/completions/gopass
install -Dm0755 fish.completion ${DESTDIR}/usr/share/fish/vendor_completions.d/gopass.fish
vlicense LICENSE
}