1 |
commit: 1441d99586ec8d03ff5565f7a45fa9ce02c826ab |
2 |
Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Aug 8 14:49:39 2017 +0000 |
4 |
Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Aug 8 14:49:39 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1441d995 |
7 |
|
8 |
sys-cluster/kubectl: Add bash and zsh completion |
9 |
|
10 |
Package-Manager: Portage-2.3.6, Repoman-2.3.3 |
11 |
|
12 |
sys-cluster/kubectl/kubectl-1.7.3-r1.ebuild | 46 +++++++++++++++++++++++++++++ |
13 |
1 file changed, 46 insertions(+) |
14 |
|
15 |
diff --git a/sys-cluster/kubectl/kubectl-1.7.3-r1.ebuild b/sys-cluster/kubectl/kubectl-1.7.3-r1.ebuild |
16 |
new file mode 100644 |
17 |
index 00000000000..89ea95537ed |
18 |
--- /dev/null |
19 |
+++ b/sys-cluster/kubectl/kubectl-1.7.3-r1.ebuild |
20 |
@@ -0,0 +1,46 @@ |
21 |
+# Copyright 1999-2017 Gentoo Foundation |
22 |
+# Distributed under the terms of the GNU General Public License v2 |
23 |
+ |
24 |
+EAPI=6 |
25 |
+inherit golang-build golang-vcs-snapshot bash-completion-r1 |
26 |
+ |
27 |
+EGO_PN="k8s.io/kubernetes" |
28 |
+ARCHIVE_URI="https://github.com/kubernetes/kubernetes/archive/v${PV}.tar.gz -> kubernetes-${PV}.tar.gz" |
29 |
+KEYWORDS="~amd64" |
30 |
+ |
31 |
+DESCRIPTION="CLI to run commands against Kubernetes clusters" |
32 |
+HOMEPAGE="https://github.com/kubernetes/kubernetes https://kubernetes.io" |
33 |
+SRC_URI="${ARCHIVE_URI}" |
34 |
+ |
35 |
+LICENSE="Apache-2.0" |
36 |
+SLOT="0" |
37 |
+IUSE="" |
38 |
+ |
39 |
+DEPEND="dev-go/go-bindata" |
40 |
+ |
41 |
+RESTRICT="test" |
42 |
+ |
43 |
+src_prepare() { |
44 |
+ default |
45 |
+ sed -i -e "/vendor\/github.com\/jteeuwen\/go-bindata\/go-bindata/d" src/${EGO_PN}/hack/lib/golang.sh || die |
46 |
+ sed -i -e "/export PATH/d" src/${EGO_PN}/hack/generate-bindata.sh || die |
47 |
+} |
48 |
+ |
49 |
+src_compile() { |
50 |
+ LDFLAGS="" GOPATH="${WORKDIR}/${P}" emake -j1 -C src/${EGO_PN} WHAT=cmd/${PN} |
51 |
+ pushd src/${EGO_PN} || die |
52 |
+ _output/bin/${PN} completion bash > ${PN}.bash |
53 |
+ _output/bin/${PN} completion zsh > ${PN}.zsh |
54 |
+ popd || die |
55 |
+} |
56 |
+ |
57 |
+src_install() { |
58 |
+ pushd src/${EGO_PN} || die |
59 |
+ dobin _output/bin/${PN} |
60 |
+ |
61 |
+ newbashcomp ${PN}.bash ${PN} |
62 |
+ insinto /usr/share/zsh/site-functions |
63 |
+ newins ${PN}.zsh ${PN} |
64 |
+ |
65 |
+ popd || die |
66 |
+} |