summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 8df9435a070384f7874612eff1571358b246619e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 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}"
}