summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2022-10-17 18:41:25 -0700
committerZac Medico <zmedico@gentoo.org>2022-10-17 18:43:13 -0700
commita6cc749894e46f1e47753ca8a5b8691fe4a00bcd (patch)
treefdcc151a270d4833820d24e580e06bff5876dabd /app-containers
parentapp-containers/flannel: drop 0.14.0, 0.16.0, 0.16.1, 0.16.3 (diff)
downloadgentoo-a6cc749894e46f1e47753ca8a5b8691fe4a00bcd.tar.gz
gentoo-a6cc749894e46f1e47753ca8a5b8691fe4a00bcd.tar.bz2
gentoo-a6cc749894e46f1e47753ca8a5b8691fe4a00bcd.zip
app-containers/flannel: add 0.20.0
Signed-off-by: Zac Medico <zmedico@gentoo.org>
Diffstat (limited to 'app-containers')
-rw-r--r--app-containers/flannel/Manifest1
-rw-r--r--app-containers/flannel/flannel-0.20.0.ebuild54
2 files changed, 55 insertions, 0 deletions
diff --git a/app-containers/flannel/Manifest b/app-containers/flannel/Manifest
index 7a3e6484defb..adad8566f465 100644
--- a/app-containers/flannel/Manifest
+++ b/app-containers/flannel/Manifest
@@ -1 +1,2 @@
DIST flannel-0.17.0.tar.gz 9534647 BLAKE2B 03d6d036d5877641a2fc7b6654995822522d378943e4d7b2531be8197de6e7d6e0509143cd8d4dfd3d2ef11c9355011bfc44c834f966e14fd3aa774350bcab11 SHA512 f0625339e387a6ae81780d21025c282c2e0caf8b32ac778634a877a4e04ebf10d41fc10b50ae477c28815cedaf34af867b651ed5a8c5267177ea925abc6a1253
+DIST flannel-0.20.0.tar.gz 10737855 BLAKE2B d2e5821c4457a8c0781618a62245132f862d7877ce10467f8d9c72be2440f7b60f0866a3420a69d13bc53826407b0b653e6c2385f8e56d684ee1e09acf0528f0 SHA512 624a293607d3d4d5e53b41b5fd26a416f8499a763f8cfbe39c79796644a56d5eb3605664592d15eddde519f2dba55da241889be159644bbe40e78ae72ed5a43b
diff --git a/app-containers/flannel/flannel-0.20.0.ebuild b/app-containers/flannel/flannel-0.20.0.ebuild
new file mode 100644
index 000000000000..18d922d3f1d3
--- /dev/null
+++ b/app-containers/flannel/flannel-0.20.0.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+inherit go-module systemd tmpfiles
+
+KEYWORDS="~amd64 ~arm64"
+DESCRIPTION="An etcd backed network fabric for containers"
+HOMEPAGE="https://github.com/flannel-io/flannel"
+SRC_URI="https://github.com/flannel-io/flannel/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Apache-2.0 BSD ISC LGPL-3 MIT"
+SLOT="0"
+IUSE="hardened"
+
+RESTRICT+=" test"
+
+src_prepare() {
+ default
+ sed -e "s:^var Version =.*:var Version = \"${PV}\":" \
+ -i "${S}/version/version.go" || die
+}
+
+src_compile() {
+ CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')"\
+ go build -o dist/flanneld -ldflags "
+ -X github.com/flannel-io/flannel/version.Version=v${PV}
+ -extldflags \"-static\"" . || die
+}
+
+src_test() {
+ GOPATH="${WORKDIR}/${P}" \
+ go test -v -work -x "${EGO_PN}" || die
+}
+
+src_install() {
+ dobin dist/${PN}d
+ 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
+ newtmpfiles "${FILESDIR}/flannel.tmpfilesd" flannel.conf
+ systemd_dounit "${FILESDIR}/flanneld.service"
+ dodoc README.md
+}
+
+pkg_postinst() {
+ tmpfiles_process flannel.conf
+}