envrun/PKGBUILD

32 lines
915 B
Text
Raw Normal View History

2018-11-30 19:31:34 +00:00
# Maintainer: Knut Ahlers <knut at ahlers dot me>
pkgname=envrun
2024-02-28 22:23:09 +00:00
pkgver=0.7.3
2019-08-04 10:36:43 +00:00
pkgrel=1
pkgdesc="Helper utility to inject environment variables stored in a file into processes"
2018-11-30 19:31:34 +00:00
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")
2024-02-28 22:23:09 +00:00
sha512sums=('fa253f37fb55dfee9b0f032097888cdd9cb7ee1810cd82ca652a37e7658d9be0c2f3011a20fc82a73d55261dbdb17e0679f7600830e2205fbde329ca04978f88')
2018-11-30 19:31:34 +00:00
build() {
export GO111MODULE=on
export GOPATH="${srcdir}/go"
cd "${srcdir}/${pkgname}-${pkgver}"
go build -a -v \
-ldflags="-X main.version=${pkgver}" \
-mod=readonly \
-o "${srcdir}/${pkgname}"
go clean -modcache
2018-11-30 19:31:34 +00:00
}
package() {
install -Dm755 "${srcdir}/${pkgname}" "${pkgdir}/usr/bin/${pkgname}"
2018-11-30 19:31:34 +00:00
install -Dm644 "${srcdir}/${pkgname}-${pkgver}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
}