1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
5 inherit user golang-build golang-vcs-snapshot
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="Kubernetes API server"
12 HOMEPAGE="https://github.com/kubernetes/kubernetes https://kubernetes.io"
13 SRC_URI="${ARCHIVE_URI}"
18 DEPEND="dev-go/go-bindata"
24 enewuser ${PN} -1 -1 -1 ${PN}
29 sed -i -e "/vendor\/github.com\/jteeuwen\/go-bindata\/go-bindata/d" src/${EGO_PN}/hack/lib/golang.sh || die
30 sed -i -e "/export PATH/d" src/${EGO_PN}/hack/generate-bindata.sh || die
34 LDFLAGS="" GOPATH="${WORKDIR}/${P}" emake -j1 -C src/${EGO_PN} WHAT=cmd/${PN}
38 pushd src/${EGO_PN} || die
39 dobin _output/bin/${PN}
41 keepdir /var/log/${PN}
42 fowners ${PN}:${PN} /var/log/${PN}
43 newinitd "${FILESDIR}"/${PN}.initd ${PN}
44 newconfd "${FILESDIR}"/${PN}.confd ${PN}
45 insinto /etc/logrotate.d
46 newins "${FILESDIR}"/${PN}.logrotated ${PN}