summaryrefslogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD34
1 files changed, 34 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 0000000..f22ffb0
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,34 @@
1# Maintainer: ml <ml@visu.li>
2pkgname=helmsman
3pkgver=3.2.0
4pkgrel=1
5pkgdesc='Helm Charts as Code'
6arch=('x86_64' 'i686')
7url='https://github.com/Praqma/helmsman'
8license=('MIT')
9depends=('helm' 'kubectl')
10optdepends=('ruby-hiera-eyaml: backend for secret encryption')
11makedepends=('go')
12source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
13sha256sums=('66fee9d212a78c918d5d31b3f0f4a5217fdf81995c68724a253d1d356d41efa3')
14
15build() {
16 cd "${pkgname}-${pkgver}"
17 export CGO_LDFLAGS="$LDFLAGS"
18 export GOFLAGS='-buildmode=pie -modcacherw -trimpath'
19 # https://github.com/Praqma/helmsman/blob/master/Makefile
20 # man makepkg(8)
21 _date=$(date --utc --date="@${SOURCE_DATE_EPOCH}" +'%d%m%y')
22 go build -o "$pkgname" -ldflags "-X main.version=v${pkgver}-${_date}" ./cmd/helmsman
23}
24
25check() {
26 cd "${pkgname}-${pkgver}"
27 go test ./...
28}
29
30package() {
31 cd "${pkgname}-${pkgver}"
32 install -Dm755 "$pkgname" -t "${pkgdir}/usr/bin"
33 install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
34}