# Maintainer: Knut Ahlers pkgname=vault2env pkgver=2.2.0 pkgrel=1 pkgdesc="Small utility to transfer fields of a key in Vault into the environment" arch=('i686' 'x86_64') url="https://github.com/Luzifer/$pkgname" license=('Apache') makedepends=('go') source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") sha512sums=('647daca87c2a48c3606ad77fb543505bcf6a015387b64cd408c4fa9c3c3f83264446829a612fdc4e3f1c33d190e7900a8835ec6f53a2e1eead9f9e23abc701ec') build() { cd "${srcdir}/${pkgname}-${pkgver}" GO111MODULE=on GOPATH="${srcdir}/go" go install \ -a -v \ -ldflags="-X main.version=${pkgver}" \ -mod=readonly GO111MODULE=on GOPATH="${srcdir}/go" go clean -modcache } package() { install -Dm755 "${srcdir}/go/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}" install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}" }