mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-03-31 11:22:38 +02:00
48 lines
1.2 KiB
Plaintext
48 lines
1.2 KiB
Plaintext
# Maintainer: Hristiyan Ivanov <hristiyan.d.ivanov@gmail.com>
|
|
pkgname=regclient
|
|
pkgver=0.11.1
|
|
pkgrel=2
|
|
pkgdesc="Docker and OCI registry client"
|
|
url="https://github.com/regclient/regclient"
|
|
arch="all"
|
|
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|loongarch64)
|
|
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="
|
|
d368c0b218d58a3fe18474ab3db2b62f0327a6c58099b4dc683091b70ed145e3e9f3073d38b1624d40e2c1dde3190d230fea61c079a2f38541857c29024e0b68 regclient-0.11.1.tar.gz
|
|
"
|