kubectl-1.5.3.ebuild 967 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit user golang-build golang-vcs-snapshot
  5. EGO_PN="k8s.io/kubernetes/..."
  6. ARCHIVE_URI="https://github.com/kubernetes/kubernetes/archive/v${PV}.tar.gz -> kubernetes-${PV}.tar.gz"
  7. KEYWORDS="~amd64"
  8. DESCRIPTION="CLI to run commands against Kubernetes clusters"
  9. HOMEPAGE="https://github.com/kubernetes/kubernetes https://kubernetes.io"
  10. SRC_URI="${ARCHIVE_URI}"
  11. LICENSE="Apache-2.0"
  12. SLOT="0"
  13. IUSE=""
  14. DEPEND="dev-go/go-bindata"
  15. RESTRICT="test"
  16. src_prepare() {
  17. default
  18. sed -i -e "/vendor\/github.com\/jteeuwen\/go-bindata\/go-bindata/d" src/${EGO_PN%/*}/hack/lib/golang.sh || die
  19. sed -i -e "/export PATH/d" src/${EGO_PN%/*}/hack/generate-bindata.sh || die
  20. }
  21. src_compile() {
  22. LDFLAGS="" GOPATH="${WORKDIR}/${P}" emake -j1 -C src/${EGO_PN%/*} WHAT=cmd/${PN}
  23. }
  24. src_install() {
  25. pushd src/${EGO_PN%/*} || die
  26. dobin _output/bin/${PN}
  27. popd || die
  28. }