From 78bba1d5866fdddced9ca7d2effa6db3384975f8 Mon Sep 17 00:00:00 2001 From: Gabriel Sanches Date: Fri, 2 Oct 2020 19:19:27 -0300 Subject: [PATCH] New package: buf-0.32.0 --- srcpkgs/buf/template | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 srcpkgs/buf/template diff --git a/srcpkgs/buf/template b/srcpkgs/buf/template new file mode 100644 index 00000000000..f37811a879d --- /dev/null +++ b/srcpkgs/buf/template @@ -0,0 +1,31 @@ +# Template file for 'buf' +pkgname=buf +version=0.32.0 +revision=1 +build_style=go +build_helper=qemu +go_import_path="github.com/bufbuild/buf" +go_ldflags="-s -w" +go_package=" + ${go_import_path}/cmd/buf + ${go_import_path}/cmd/protoc-gen-buf-check-breaking + ${go_import_path}/cmd/protoc-gen-buf-check-lint" +short_desc="Utility tool for Protocol Buffers" +maintainer="Gabriel Sanches " +license="Apache-2.0" +homepage="https://buf.build/" +distfiles="https://${go_import_path}/archive/v${version}.tar.gz" +checksum=a4aebeaa77404bc99fd64bf0e667a7240c0a6228ed43a59043f42314560e64f4 + +post_build() { + buf=$(find $GOPATH/bin -name $pkgname) + for shell in bash fish zsh; do + vtargetrun $buf ${shell}-completion > ${pkgname}.${shell} + done +} + +post_install() { + for shell in bash fish zsh; do + vcompletion ${pkgname}.$shell $shell + done +}