aports/testing/certstrap/APKBUILD
2024-07-03 02:57:22 +02:00

41 lines
1.3 KiB
Plaintext

# Contributor: Thomas Kienlen <kommander@laposte.net>
# Maintainer: Thomas Kienlen <kommander@laposte.net>
pkgname=certstrap
pkgver=1.3.0
pkgrel=18
pkgdesc="Tools to bootstrap CAs, certificate requests, and signed certificates"
url="https://github.com/square/certstrap"
arch="all"
license="Apache-2.0"
makedepends="go"
source="$pkgname-$pkgver.tar.gz::https://github.com/square/certstrap/archive/v$pkgver/v$pkgver.tar.gz
update-go-deps.patch
"
options="chmod-clean"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
go build -trimpath
}
check() {
# Fix GO 1.18 compatibility
# https://github.com/golang/go/issues/41682
# SHA1 support will be removed in GO 1.19
export GODEBUG=x509sha1=1
# Certificates have expired on 13 Mar 2024
go test -v -skip 'TestCertificateAuthority|TestCertificateVerify' ./...
}
package() {
install -Dm755 certstrap "$pkgdir"/usr/bin/certstrap
}
sha512sums="
f3ef9fb9e581acb028f447ac2e2b924a27d6c652d3be30a1df310f7bfde2c8cc40f5ad0fdba0396fbc6bb332c24853aeedee78a00d5217ca02007130e26c5455 certstrap-1.3.0.tar.gz
6f50f5796af73b8edc40f2305d9027cd15b0a6ef599f82682828a86174cc0cd50e432dffca15508f8f712ef677a71591fc96afcdf4ff3939e4efe678f67676d3 update-go-deps.patch
"