abinfo "Building kubectl ..."
# Without "FORCE_HOST_GO=1" the build scripts will attempt to download a whole Go toolchain
# when our Go does not match version from '.go-version'.
FORCE_HOST_GO=1 make kubectl

abinfo "Installing kubectl ..."
install -Dvm755 "$SRCDIR"/_output/bin/kubectl -t "$PKGDIR"/usr/bin

abinfo "Installing bash and zsh completions ..."
"$PKGDIR"/usr/bin/kubectl completion bash | \
install -Dvm644 /dev/stdin "$PKGDIR"/usr/share/bash-completion/completions/kubectl
"$PKGDIR"/usr/bin/kubectl completion zsh | \
install -Dvm644 /dev/stdin "$PKGDIR"/usr/share/zsh/site-functions/_kubectl
