vault2env/PKGBUILD

24 lines
947 B
Text
Raw Normal View History

2018-11-28 19:42:21 +00:00
# Maintainer: Knut Ahlers <knut at ahlers dot me>
pkgname=vault2env
pkgver=2.0.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=('49d85e30035c982d9a4b537675c93c1000227f45c3d945b927107b4fc4e238de086c7a6fb033eec6b2a459c088b4572c6b90621edc0c147e39ef743e96927541')
build() {
mkdir -p "${srcdir}/go/src/github.com/Luzifer"
ln -sf "${srcdir}/${pkgname}-${pkgver}" "${srcdir}/go/src/github.com/Luzifer/${pkgname}"
GOPATH="${srcdir}/go" go install -a -v -ldflags="-X main.version=${pkgver}" "github.com/Luzifer/${pkgname}"
}
package() {
install -Dm755 "${srcdir}/go/bin/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}