diff --git a/srcpkgs/kops/template b/srcpkgs/kops/template new file mode 100644 index 0000000000..69557948ae --- /dev/null +++ b/srcpkgs/kops/template @@ -0,0 +1,38 @@ +# Template file for 'kops' +pkgname=kops +version=1.15.0 +revision=1 +archs="x86_64*" +build_wrksrc=src/k8s.io/kops +build_style=go +go_import_path=k8s.io/kops +hostmakedepends="git" +depends="kubectl" +short_desc="Production Grade K8s Installation, Upgrades, and Management" +maintainer="Mate Gabri " +license="Apache-2.0" +homepage="https://github.com/kubernetes/kops" + +do_fetch() { + # We must clone it instead of downloading the tarball because the build + # process expects the directory to be a git repository + rm -rf $wrksrc + mkdir -p $wrksrc/src/k8s.io + git clone -b ${version} https://github.com/kubernetes/kops \ + $wrksrc/src/k8s.io/kops +} + +do_build() { + export GOPATH="$wrksrc" + + make + + ../../../bin/kops completion bash > completion.bash + ../../../bin/kops completion zsh | sed -n '/#compdef/,$p' > completion.zsh +} + +do_install() { + vbin ../../../bin/kops + vinstall completion.bash 644 usr/share/bash-completion/completions kops + vinstall completion.zsh 644 usr/share/zsh/site-functions _kops +}