1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-23 19:25:25 +03:00
aports/testing/go-jsonnet/APKBUILD
2023-02-15 04:17:08 +01:00

40 lines
1.1 KiB
Text

# Maintainer: Hoang Nguyen <folliekazetani@protonmail.com>
pkgname=go-jsonnet
pkgver=0.19.1
pkgrel=3
pkgdesc="Implementation of Jsonnet in Go"
url="https://jsonnet.org"
arch="all"
license="Apache-2.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/google/go-jsonnet/archive/refs/tags/v$pkgver.tar.gz"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
case "$CARCH" in
s390x|riscv64) options="!check" ;; # blocked by rapidyaml -> jsonnet-dev
*) checkdepends="jsonnet-dev" ;;
esac
build() {
for bin in jsonnet jsonnetfmt jsonnet-deps jsonnet-lint; do
go build ./cmd/$bin
done
}
check() {
# C bindings tests (using Python) depend on the vendored jsonnet C++ source code
go test ./...
}
package() {
for bin in jsonnet jsonnetfmt jsonnet-deps jsonnet-lint; do
install -Dm755 ./$bin -t "$pkgdir"/usr/bin/
done
}
sha512sums="
48974d179d6ef02f0de616505146df3d307db553d0ca05284825247c7de028c5dd469b8749f184adb1f7d04bc0ce1692ed75d5a50edaf8c768b72e23cf1355b1 go-jsonnet-0.19.1.tar.gz
"