diff options
Diffstat (limited to 'PKGBUILD')
-rw-r--r-- | PKGBUILD | 34 |
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> | ||
2 | pkgname=helmsman | ||
3 | pkgver=3.2.0 | ||
4 | pkgrel=1 | ||
5 | pkgdesc='Helm Charts as Code' | ||
6 | arch=('x86_64' 'i686') | ||
7 | url='https://github.com/Praqma/helmsman' | ||
8 | license=('MIT') | ||
9 | depends=('helm' 'kubectl') | ||
10 | optdepends=('ruby-hiera-eyaml: backend for secret encryption') | ||
11 | makedepends=('go') | ||
12 | source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz") | ||
13 | sha256sums=('66fee9d212a78c918d5d31b3f0f4a5217fdf81995c68724a253d1d356d41efa3') | ||
14 | |||
15 | build() { | ||
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 | |||
25 | check() { | ||
26 | cd "${pkgname}-${pkgver}" | ||
27 | go test ./... | ||
28 | } | ||
29 | |||
30 | package() { | ||
31 | cd "${pkgname}-${pkgver}" | ||
32 | install -Dm755 "$pkgname" -t "${pkgdir}/usr/bin" | ||
33 | install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}" | ||
34 | } | ||