From 9879958efc6699170583ed605226d24113d5931f Mon Sep 17 00:00:00 2001 From: maxice8 Date: Mon, 30 Jul 2018 01:12:30 -0300 Subject: [PATCH] gopass: fix cross. use hostmakedepends gopass to generate completions --- srcpkgs/gopass/template | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/srcpkgs/gopass/template b/srcpkgs/gopass/template index e6c0299c575..d12789a8c00 100644 --- a/srcpkgs/gopass/template +++ b/srcpkgs/gopass/template @@ -13,12 +13,20 @@ homepage="https://www.justwatch.com/gopass/" changelog="https://raw.githubusercontent.com/justwatchcom/gopass/master/CHANGELOG.md" distfiles="https://github.com/gopasspw/gopass/archive/v${version}.tar.gz" checksum=6dc423448c0672fd5087ab75e4c3d8584fb75c93789c9fd68bf14576ab46d1ed -nocross=yes + +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