blob: 95000533f7de4a08621575f776e5f5ccd0c8df39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
# Maintainer: ml <ml@visu.li>
pkgname=helmsman
pkgver=3.4.2
pkgrel=1
pkgdesc='Helm Charts as Code'
arch=('x86_64' 'i686')
url='https://github.com/Praqma/helmsman'
license=('MIT')
depends=('helm-diff' 'kubectl')
optdepends=('ruby-hiera-eyaml: backend for secret encryption')
makedepends=('go')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=('5e0dc492560cb3ecc11f5db6bcea3861f8305004950becc12a81dfc7bfaed17d')
prepare() {
cd "${pkgname}-${pkgver}"
go mod download
}
build() {
cd "${pkgname}-${pkgver}"
export CGO_ENABLED=1
export CGO_LDFLAGS="$LDFLAGS"
export CGO_CFLAGS="$CFLAGS"
export CGO_CPPFLAGS="$CPPFLAGS"
export CGO_CXXFLAGS="$CXXFLAGS"
export GOFLAGS='-buildmode=pie -modcacherw -mod=readonly -trimpath'
# man makepkg(8), https://github.com/Praqma/helmsman/blob/master/Makefile
_date=$(date --utc --date="@${SOURCE_DATE_EPOCH}" +'%d%m%y')
go build -o "$pkgname" -ldflags "-X main.version=v${pkgver}-${_date}" ./cmd/helmsman
}
check() {
cd "${pkgname}-${pkgver}"
go test ./...
}
package() {
cd "${pkgname}-${pkgver}"
install -Dm755 "$pkgname" -t "${pkgdir}/usr/bin"
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
|