# Contributor: Lauren N. Liberda # Maintainer: Lauren N. Liberda pkgname=k3sup pkgver=0.12.3 pkgrel=9 pkgdesc="A light-weight utility to get from zero to KUBECONFIG with k3s" url="https://k3sup.dev/" arch="all" license="MIT" makedepends="go" subpackages=" $pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion " source="https://github.com/alexellis/k3sup/archive/refs/tags/$pkgver/k3sup-$pkgver.tar.gz" prepare() { default_prepare mkdir -p bin/ } build() { go build -a \ -ldflags "-X github.com/alexellis/k3sup/cmd.Version=$pkgver" \ -o bin/k3sup for i in bash fish zsh; do ./bin/k3sup completion "$i" > "$builddir"/k3sup.$i done } check() { go test $(go list ./... | grep -v /vendor/ | xargs) -cover } package() { install -Dm755 bin/k3sup "$pkgdir"/usr/bin/k3sup install -Dm644 "$builddir"/$pkgname.bash "$pkgdir"/usr/share/bash-completion/completions/$pkgname install -Dm644 "$builddir"/$pkgname.fish "$pkgdir"/usr/share/fish/vendor_completions.d/$pkgname.fish install -Dm644 "$builddir"/$pkgname.zsh "$pkgdir"/usr/share/zsh/site-functions/_$pkgname } sha512sums=" 7f79e2c4ad08aa17735455221094dfdeffb14e8e4bfafcf3bf4b6526eba85eb7993a39be0a0803fa764faa36516a7569d8d8bc6ac3028150effc8b1928502e31 k3sup-0.12.3.tar.gz "