mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-12 22:44:32 +02:00
62 lines
2 KiB
Text
62 lines
2 KiB
Text
# Contributor: Hoang Nguyen <folliekazetani@protonmail.com>
|
|
maintainer="Hoang Nguyen <folliekazetani@protonmail.com>"
|
|
pkgname=helmfile
|
|
pkgver=1.0.0
|
|
pkgrel=1
|
|
pkgdesc="Declarative spec for deploying helm charts"
|
|
url="https://helmfile.readthedocs.io/"
|
|
# armhf: ftbfs
|
|
arch="all !armhf"
|
|
license="MIT"
|
|
depends="helm"
|
|
makedepends="go"
|
|
checkdepends="bash"
|
|
subpackages="
|
|
$pkgname-doc
|
|
$pkgname-bash-completion
|
|
$pkgname-zsh-completion
|
|
$pkgname-fish-completion
|
|
"
|
|
source="$pkgname-$pkgver.tar.gz::https://github.com/helmfile/helmfile/archive/refs/tags/v$pkgver.tar.gz"
|
|
options="net" # download Go modules
|
|
|
|
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
|
|
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
|
|
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
|
|
|
|
build() {
|
|
local _goldflags="
|
|
-X go.szostok.io/version.version=$pkgver
|
|
-X go.szostok.io/version.buildDate=$(date -u "+%Y-%m-%dT%H:%M:%S%z" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})
|
|
-X go.szostok.io/version.commitDate=$(date -u "+%Y-%m-%dT%H:%M:%S%z" ${SOURCE_DATE_EPOCH:+-d @$SOURCE_DATE_EPOCH})
|
|
-X go.szostok.io/version.commit=0000000
|
|
-X go.szostok.io/version.dirtyBuild=false
|
|
"
|
|
go build -v -o helmfile -ldflags "$_goldflags"
|
|
|
|
for shell in bash fish zsh; do
|
|
./helmfile completion $shell > $pkgname.$shell
|
|
done
|
|
}
|
|
|
|
check() {
|
|
# /test/e2e/template/helmfile module relies on external binaries and helm plugins only available for x86_64
|
|
# shellcheck disable=2046
|
|
go test $(go list ./... | grep -v /e2e)
|
|
}
|
|
|
|
package() {
|
|
install -Dm755 $pkgname "$pkgdir"/usr/bin/$pkgname
|
|
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
|
|
|
|
install -Dm644 helmfile.bash \
|
|
"$pkgdir"/usr/share/bash-completion/completions/helmfile
|
|
install -Dm644 helmfile.zsh \
|
|
"$pkgdir"/usr/share/zsh/site-functions/_helmfile
|
|
install -Dm644 helmfile.fish \
|
|
"$pkgdir"/usr/share/fish/vendor_completions.d/helmfile.fish
|
|
}
|
|
|
|
sha512sums="
|
|
d4f343b4c32a1cfefea137a86ac38995670b927014cdde4abfe4ae05df25df2726c5e24267619f3a3d6474aca660131fd5aafd53a1131a035419f29676c05a5f helmfile-1.0.0.tar.gz
|
|
"
|