blob: 0605f8a2e431588553dc8f4ff0d9292f259eb6fc (
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
43
|
# Maintainer: ml <ml@visu.li>
pkgname=helm-s3
pkgver=0.9.2
pkgrel=2
pkgdesc='Helm plugin that allows to use AWS S3 as a [private] chart repository'
arch=('x86_64')
url='https://github.com/hypnoglow/helm-s3'
license=('MIT')
install=helm-s3.install
depends=('helm')
makedepends=('go')
source=("${pkgname}-${pkgver}.tar.gz::${url}/archive/v${pkgver}.tar.gz")
sha256sums=('a601ebde9d881da832189fa4cf75e88a2c402fb5b1081e00e56bff3ee854b2e8')
prepare() {
cd "${pkgname}-${pkgver}"
go mod download
sed -i '/^hooks:$/Q' plugin.yaml
}
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 -trimpath -modcacherw -mod=readonly'
go build -o bin/helms3 -ldflags "-X main.version=${pkgver}" ./cmd/helms3
}
check() {
cd "${pkgname}-${pkgver}"
make test-unit
grep -Fqm1 "$pkgver" bin/helms3
}
package() {
cd "${pkgname}-${pkgver}"
install -Dm755 bin/helms3 -t "${pkgdir}/usr/lib/helm/plugins/${pkgname##helm-}/bin"
install -m644 plugin.yaml -t "${pkgdir}/usr/lib/helm/plugins/${pkgname##helm-}"
install -Dm644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
}
|