aports/testing/tenv/APKBUILD
2025-05-12 08:51:47 +00:00

51 lines
1.4 KiB
Text

# Contributor: Alexander Sharov <kvendingoldo@gmail.com>
# Maintainer: Alexander Sharov <kvendingoldo@gmail.com>
pkgname=tenv
pkgver=4.6.2
pkgrel=0
pkgdesc="OpenTofu, Terraform, Terragrunt, and Atmos version manager"
license="Apache-2.0"
arch="all"
url="https://github.com/tofuutils/tenv"
source="tenv-$pkgver.tar.gz::https://github.com/tofuutils/tenv/archive/v$pkgver.tar.gz"
options="net"
depends="cosign !terraform !tofu !terragrunt !atmos"
makedepends="go cosign"
subpackages="
$pkgname-bash-completion
$pkgname-fish-completion
$pkgname-zsh-completion
"
export GOCACHE="${GOCACHE:-"$srcdir/go-cache"}"
export GOTMPDIR="${GOTMPDIR:-"$srcdir"}"
export GOMODCACHE="${GOMODCACHE:-"$srcdir/go"}"
build() {
local i
mkdir build
for i in tenv terraform terragrunt tf tofu atmos; do
go build -ldflags "-s -w -X main.version=v$pkgver" -o build/$i ./cmd/$i
done
for i in bash fish zsh; do
./build/tenv completion $i > ./tenv.$i
done
}
check() {
make test
}
package() {
install -Dm755 -t "$pkgdir"/usr/bin build/*
install -Dm644 ./tenv.bash $pkgdir/usr/share/bash-completion/completions/tenv
install -Dm644 ./tenv.fish $pkgdir/usr/share/fish/vendor_completions.d/tenv.fish
install -Dm644 ./tenv.zsh $pkgdir/usr/share/zsh/site-functions/tenv
}
sha512sums="
9052cc7f0dab2043c09728217e4e233279abb735b2f9b5238cda036e69b1faa91a91e4a1c45204ffebb4e0fe175038710f7a7620ed6fff32cfe7a8b33678b31d tenv-4.6.2.tar.gz
"