summaryrefslogtreecommitdiffstats
path: root/helmsman/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'helmsman/PKGBUILD')
-rw-r--r--helmsman/PKGBUILD45
1 files changed, 45 insertions, 0 deletions
diff --git a/helmsman/PKGBUILD b/helmsman/PKGBUILD
new file mode 100644
index 0000000..048e58a
--- /dev/null
+++ b/helmsman/PKGBUILD
@@ -0,0 +1,45 @@
1# Maintainer: ml <ml@visu.li>
2# to build in clean chroot build helm-diff from AUR, then pass to build cmd:
3# $ extra-x86_64-build -- -I helm-diff-3.1.3-2-x86_64.pkg.tar.zst
4pkgname=helmsman
5pkgver=3.6.3
6pkgrel=1
7pkgdesc='Helm Charts as Code'
8arch=('x86_64' 'i686')
9url='https://github.com/Praqma/helmsman'
10license=('MIT')
11depends=('helm-diff' 'kubectl')
12optdepends=(
13 'ruby-hiera-eyaml: backend for secret encryption'
14 'helm-secrets: backend for secret encryption')
15makedepends=('go')
16source=("$url/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
17sha256sums=('05ce86066028ed0fbb99902018953107432727abe297745de4013815b5bf6781')
18
19build() {
20 cd "$pkgname-$pkgver"
21 export CGO_ENABLED=1
22 export CGO_LDFLAGS="$LDFLAGS"
23 export CGO_CFLAGS="$CFLAGS"
24 export CGO_CPPFLAGS="$CPPFLAGS"
25 export CGO_CXXFLAGS="$CXXFLAGS"
26 export GOFLAGS='-buildmode=pie -modcacherw -mod=readonly -trimpath'
27 # man makepkg(8), https://github.com/Praqma/helmsman/blob/master/Makefile
28 TZ=UTC printf -v _date '%(%d%m%y)T' "${SOURCE_DATE_EPOCH:- -1}"
29 go build -ldflags "-linkmode=external -X main.version=v$pkgver-$_date" ./cmd/helmsman
30}
31
32check() {
33 cd "$pkgname-$pkgver"
34 go test -short ./...
35}
36
37package() {
38 cd "$pkgname-$pkgver"
39 install -Dm755 "$pkgname" -t "$pkgdir/usr/bin"
40 install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
41
42 # README, docs and examples
43 install -Dm644 README.md -t "$pkgdir/usr/share/doc/$pkgname"
44 cp -a docs examples -t "$pkgdir/usr/share/doc/$pkgname"
45}