diff --git a/srcpkgs/k9s/template b/srcpkgs/k9s/template index eb361efff77..7fbe5f51afa 100644 --- a/srcpkgs/k9s/template +++ b/srcpkgs/k9s/template @@ -16,13 +16,28 @@ checksum=597fa2c547437070a8993d1fb6fce91d696bd3731d37230feace3a2d3bfdb198 export LDFLAGS="-fuse-ld=bfd" post_build() { +case "${XBPS_TARGET_MACHINE}" in + aarch64*) export GOARCH=arm64 ;; + armv5*) export GOARCH=arm; export GOARM=5 ;; + armv6*) export GOARCH=arm; export GOARM=6 ;; + armv7*) export GOARCH=arm; export GOARM=7 ;; + i686*) export GOARCH=386 ;; + x86_64*) export GOARCH=amd64 ;; + ppc64le*) export GOARCH=ppc64le ;; + ppc64*) export GOARCH=ppc64 ;; + ppc*) export GOARCH=ppc ;; + mipsel*) export GOARCH=mipsle ;; + mips*) export GOARCH=mips ;; + riscv64*) export GOARCH=riscv64 ;; + *) broken="Unsupported architecture ${XBPS_TARGET_MACHINE}" ;; +esac for shell in bash zsh fish; do - _build-k9s-xbps/bin/k9s completion $shell >k9s.$shell + go run main.go completion $shell >completion.$shell done } post_install() { for shell in bash zsh fish; do - vcompletion k9s.$shell $shell + vcompletion completion.$shell $shell done }