Skip to content
Snippets Groups Projects
Commit b146be38 authored by Hoang Nguyen's avatar Hoang Nguyen :turtle: Committed by alice
Browse files

testing/opcr-policy: new aport

parent 5d92a9f0
No related branches found
No related tags found
1 merge request!45338testing/opcr-policy: new aport
Pipeline #157496 skipped
# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=opcr-policy
pkgver=0.1.51
pkgrel=0
pkgdesc="CLI for building, versioning and publishing authorization policies"
url="https://www.openpolicycontainers.com/"
arch="all"
license="Apache-2.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/opcr-io/policy/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/policy-$pkgver"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
local _goldflags="
-X github.com/opcr-io/policy/pkg/version.ver=$pkgver
-X github.com/opcr-io/policy/pkg/version.commit=AlpineLinux
-X github.com/opcr-io/policy/pkg/version.date=$(date -u "+%Y-%m-%dT%H:%M:%SZ" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})
"
go build -v -ldflags "$_goldflags" ./cmd/policy/
}
check() {
go test ./...
}
package() {
install -Dm755 policy -t "$pkgdir"/usr/bin/
}
sha512sums="
34706cf0b1025eaea7446de30726873cdbf917247eca3cb40a104e9f453d91551ebedce7902286b1f4cc965e8322234e64f27162af48577ee71a2d4757123d93 opcr-policy-0.1.51.tar.gz
"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment