summaryrefslogtreecommitdiff
path: root/app-emulation/flannel/flannel-0.10.0.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-07-14 21:03:06 +0100
commit8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 (patch)
tree7681bbd4e8b05407772df40a4bf04cbbc8afc3fa /app-emulation/flannel/flannel-0.10.0.ebuild
parent30a9caf154332f12ca60756e1b75d2f0e3e1822d (diff)
gentoo resync : 14.07.2018
Diffstat (limited to 'app-emulation/flannel/flannel-0.10.0.ebuild')
-rw-r--r--app-emulation/flannel/flannel-0.10.0.ebuild51
1 files changed, 51 insertions, 0 deletions
diff --git a/app-emulation/flannel/flannel-0.10.0.ebuild b/app-emulation/flannel/flannel-0.10.0.ebuild
new file mode 100644
index 000000000000..3fd362881d8c
--- /dev/null
+++ b/app-emulation/flannel/flannel-0.10.0.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit golang-vcs-snapshot systemd user
+
+KEYWORDS="~amd64"
+DESCRIPTION="An etcd backed network fabric for containers"
+EGO_PN="github.com/coreos/flannel"
+HOMEPAGE="https://github.com/coreos/flannel"
+SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+LICENSE="Apache-2.0"
+SLOT="0"
+IUSE="hardened"
+RESTRICT="test"
+
+src_prepare() {
+ default
+ sed -e "s:^var Version =.*:var Version = \"${PV}\":" \
+ -i "${S}/src/${EGO_PN}/version/version.go" || die
+}
+
+src_compile() {
+ CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')"\
+ GOPATH="${WORKDIR}/${P}" \
+ go install -v -work -x ${EGO_BUILD_FLAGS} "${EGO_PN}"
+ [[ -x bin/${PN} ]] || die
+}
+
+src_test() {
+ GOPATH="${WORKDIR}/${P}" \
+ go test -v -work -x "${EGO_PN}" || die
+}
+
+src_install() {
+ newbin "bin/${PN}" ${PN}d
+ cd "src/${EGO_PN}" || die
+ exeinto /usr/libexec/flannel
+ doexe dist/mk-docker-opts.sh
+ insinto /etc/systemd/system/docker.service.d
+ newins "${FILESDIR}/flannel-docker.conf" flannel.conf
+ newinitd "${FILESDIR}"/flanneld.initd flanneld
+ newconfd "${FILESDIR}"/flanneld.confd flanneld
+ keepdir /var/log/${PN}
+ insinto /etc/logrotate.d
+ newins "${FILESDIR}"/flanneld.logrotated flanneld
+ systemd_newtmpfilesd "${FILESDIR}/flannel.tmpfilesd" flannel.conf
+ systemd_dounit "${FILESDIR}/flanneld.service"
+ dodoc README.md
+}