mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-01-02 07:11:47 +01:00
50 lines
1.3 KiB
Plaintext
50 lines
1.3 KiB
Plaintext
# Contributor: Lauren N. Liberda <lauren@selfisekai.rocks>
|
|
# Maintainer: Lauren N. Liberda <lauren@selfisekai.rocks>
|
|
pkgname=k3sup
|
|
pkgver=0.13.3
|
|
pkgrel=0
|
|
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() {
|
|
# shellcheck disable=SC2046
|
|
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="
|
|
d9a068efd9be591d7ebe7be91c3c6661d7eea1cef97700cbb6ed90b15a402d42985d7b5eab2e2aa89501e3ec5ad08c8bc353c857db1c23ff903d47d2466768d0 k3sup-0.13.3.tar.gz
|
|
"
|