From 41465142c578ac0da6300469c7d2cb3b70a677f8 Mon Sep 17 00:00:00 2001 From: Daniel Lewan Date: Thu, 14 Jul 2022 19:31:02 +0200 Subject: [PATCH] New package: opa-0.44.0 --- srcpkgs/opa/template | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 srcpkgs/opa/template diff --git a/srcpkgs/opa/template b/srcpkgs/opa/template new file mode 100644 index 000000000000..9a4fce5a46fa --- /dev/null +++ b/srcpkgs/opa/template @@ -0,0 +1,37 @@ +# Template file for 'opa' +pkgname=opa +version=0.44.0 +revision=1 +build_style=go +build_helper=qemu +go_import_path=github.com/open-policy-agent/opa +# go_build_tags=opa_wasm +go_ldflags="-X github.com/open-policy-agent/opa/internal/report.ExternalServiceURL='' + -X github.com/open-policy-agent/opa/version.Version=${version}" +short_desc="General-purpose policy engine" +maintainer="Daniel Lewan " +license="Apache-2.0" +homepage="https://www.openpolicyagent.org/" +changelog="https://raw.githubusercontent.com/open-policy-agent/opa/main/CHANGELOG.md" +distfiles="https://github.com/open-policy-agent/opa/archive/v${version}.tar.gz" +checksum=277745ca4328671791ec3fc37bf16b4e270c4057c9a43eefdf855986c364dc9a + +post_build() { + CGO_ENABLED=0 GOOS="" GOARCH="" go run -ldflags "$go_ldflags" ./build/generate-man man + for shell in bash fish zsh + do + opa_cli=$(find "$GOPATH"/bin -name opa) + vtargetrun "$opa_cli" completion $shell >$shell.completion + done +} + +post_install() { + for f in man/*.1 + do + vman "$f" + done + for shell in bash fish zsh + do + vcompletion "$shell.completion" "$shell" + done +}