mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 20:46:39 +02:00
53 lines
1.3 KiB
Text
53 lines
1.3 KiB
Text
# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
|
|
# Maintainer:
|
|
pkgname=k3sup
|
|
pkgver=0.13.6
|
|
pkgrel=4
|
|
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"
|
|
|
|
# secfixes:
|
|
# 0.13.4-r0:
|
|
# - CVE-2023-48795
|
|
|
|
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="
|
|
5643e91669430bd7c32173a163769b7ea9bb43a003b5c025fb851a76dd1ebeb9b190237b068b3218d342d38ec2d87ef0dcc025330d069d71175ddac804d848fa k3sup-0.13.6.tar.gz
|
|
"
|