1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
5 inherit golang-build golang-vcs-snapshot bash-completion-r1
7 EGO_PN="k8s.io/kubernetes"
8 ARCHIVE_URI="https://github.com/kubernetes/kubernetes/archive/v${PV}.tar.gz -> kubernetes-${PV}.tar.gz"
11 DESCRIPTION="CLI to Easily bootstrap a secure Kubernetes cluster"
12 HOMEPAGE="https://github.com/kubernetes/kubernetes https://kubernetes.io"
13 SRC_URI="${ARCHIVE_URI}"
19 DEPEND=">=dev-lang/go-1.13
26 sed -i -e "/vendor\/github.com\/jteeuwen\/go-bindata\/go-bindata/d" -e "s/-s -w/-w/" src/${EGO_PN}/hack/lib/golang.sh || die
27 sed -i -e "/export PATH/d" src/${EGO_PN}/hack/generate-bindata.sh || die
31 LDFLAGS="" GOPATH="${WORKDIR}/${P}" emake -j1 -C src/${EGO_PN} WHAT=cmd/${PN} GOFLAGS=-v
32 pushd src/${EGO_PN} || die
33 _output/bin/${PN} completion bash > ${PN}.bash || die
34 _output/bin/${PN} completion zsh > ${PN}.zsh || die
39 pushd src/${EGO_PN} || die
40 dobin _output/bin/${PN}
42 newbashcomp ${PN}.bash ${PN}
43 insinto /usr/share/zsh/site-functions
44 newins ${PN}.zsh _${PN}