net-vpn/openvpn: drop vulnerable
[gentoo.git] / sys-cluster / kubeadm / kubeadm-1.15.10.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5 inherit golang-build golang-vcs-snapshot bash-completion-r1
6
7 EGO_PN="k8s.io/kubernetes"
8 ARCHIVE_URI="https://github.com/kubernetes/kubernetes/archive/v${PV}.tar.gz -> kubernetes-${PV}.tar.gz"
9
10 DESCRIPTION="CLI to Easily bootstrap a secure Kubernetes cluster"
11 HOMEPAGE="https://github.com/kubernetes/kubernetes https://kubernetes.io"
12 SRC_URI="${ARCHIVE_URI}"
13
14 LICENSE="Apache-2.0"
15 SLOT="0"
16 KEYWORDS="~amd64"
17 IUSE=""
18
19 DEPEND="=dev-lang/go-1.12*
20         dev-go/go-bindata"
21
22 RESTRICT="test"
23
24 src_prepare() {
25         default
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
28 }
29
30 src_compile() {
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
35         popd || die
36 }
37
38 src_install() {
39         pushd src/${EGO_PN} || die
40         dobin _output/bin/${PN}
41
42         newbashcomp ${PN}.bash ${PN}
43         insinto /usr/share/zsh/site-functions
44         newins ${PN}.zsh _${PN}
45
46         popd || die
47 }