aports/testing/protoc-gen-go/APKBUILD
2025-03-23 12:01:36 +00:00

35 lines
986 B
Text

maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
pkgname=protoc-gen-go
pkgver=1.36.5
pkgrel=0
pkgdesc="Protocol Buffers Go generator"
url="https://github.com/protocolbuffers/protobuf-go"
arch="all"
license="BSD-3-Clause"
depends="protoc"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/protocolbuffers/protobuf-go/archive/refs/tags/v$pkgver.tar.gz"
builddir="$srcdir/protobuf-go-$pkgver"
options="net" # download Go modules
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
go build -v \
-ldflags "-X google.golang.org/protobuf/internal/version.PreRelease=" \
./cmd/protoc-gen-go/
}
check() {
go test ./...
}
package() {
install -Dm755 protoc-gen-go -t "$pkgdir"/usr/bin/
}
sha512sums="
19c42045781216fbcece6d2b7904e6cb65bc2f8070cf7befbb1215d10582307850c2b53178112279ad43238583a080a3e62eab6ecfff8e4f3b53c3883875a79b protoc-gen-go-1.36.5.tar.gz
"