aports/testing/regclient/APKBUILD
2025-04-11 19:40:50 +02:00

47 lines
1.2 KiB
Text

# Maintainer: Hristiyan Ivanov <hristiyan.d.ivanov@gmail.com>
pkgname=regclient
pkgver=0.8.2
pkgrel=1
pkgdesc="Docker and OCI registry client"
url="https://github.com/regclient/regclient"
arch="all !loongarch64"
license="Apache-2.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/regclient/regclient/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|x86|riscv64|ppc64le)
options="$options !check" # some tests are designed only for specific architectures
;;
esac
prepare() {
default_prepare
go mod download
}
build() {
for package in regctl regsync regbot; do
go build \
-ldflags "-X github.com/regclient/regclient/internal/version.vcsTag=v$pkgver" \
-tags nolegacy \
-o bin/$package ./cmd/$package
done
}
check() {
go test ./...
}
package() {
for package in regctl regsync regbot; do
install -Dm0755 bin/$package -t "$pkgdir"/usr/bin/
done
}
sha512sums="
df476068fcb7ea4280607ec380aad05d63503628a5011fe0da748b508aac219909df73d9d43a4453a20c508344dd41c6df2fe56ab939addc1e807cec8422fa51 regclient-0.8.2.tar.gz
"