From 270c793dc6764cd54d04c9a9a0a3e0f5268481f8 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.26.0 --- srcpkgs/buf/template | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 srcpkgs/buf/template diff --git a/srcpkgs/buf/template b/srcpkgs/buf/template new file mode 100644 index 00000000000..18d94544d2f --- /dev/null +++ b/srcpkgs/buf/template @@ -0,0 +1,34 @@ +# Template file for 'buf' +pkgname=buf +version=0.26.0 +revision=1 +build_style=go +build_helper=qemu +_base_path=github.com/bufbuild/buf +go_import_path=${_base_path}/cmd/buf +go_ldflags="-s -w" +short_desc="Utility tool for Protocol Buffers" +maintainer="Gabriel Sanches " +license="Apache-2.0" +homepage="https://buf.build/" +distfiles="https://${_base_path}/archive/v${version}.tar.gz" +checksum=09d00c41b2b0befbb2da59297fec809dbdfdc9ac2f10c8bd3c6b29a0d5584dc1 + +post_build() { + buf=$(find $GOPATH/bin -name $pkgname) + for shell in bash fish zsh; do + vtargetrun $buf ${shell}-completion > ${pkgname}.${shell} + done + + # Build additional binaries. + for plugin in protoc-gen-buf-check-breaking protoc-gen-buf-check-lint; do + go_package=${_base_path}/cmd/${plugin} + do_build + done +} + +post_install() { + for shell in bash fish zsh; do + vcompletion ${pkgname}.$shell $shell + done +}