# Contributor: Dermot Bradley <dermot_bradley@yahoo.com>
maintainer="Wolfgang Fischer <wdev@posteo.org>"
pkgname=step-kms-plugin
pkgver=0.11.7
pkgrel=5
pkgdesc="Step plugin to manage keys and certs on KMSs and HSMs"
url="https://github.com/smallstep/step-kms-plugin"
arch="all"
license="Apache-2.0"
makedepends="
	go
	pcsc-lite-dev
	"
source="$pkgname-$pkgver.tar.gz::https://github.com/smallstep/step-kms-plugin/archive/refs/tags/v$pkgver.tar.gz"
options="net"

export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"

build() {
	make VERSION=$pkgver build
}

check() {
	make test
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
0a21a44e44d453cdcc48b71f4237d38e836e01f78bcca69431f0991021553184ebc2e6245fac0e8693196c7b11e6340dd0a6772c8e2b4b2754b9daafef40fcde  step-kms-plugin-0.11.7.tar.gz
"
