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