dev-python/csv23: arm64 keyworded (bug #719700)
[gentoo.git] / net-misc / cni-plugins / cni-plugins-0.8.4.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit linux-info golang-vcs-snapshot
7
8 DESCRIPTION="Standard networking plugins for container networking"
9 HOMEPAGE="https://github.com/containernetworking/plugins"
10 EGO_PN="github.com/containernetworking/plugins"
11 SRC_URI="https://${EGO_PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
12
13 LICENSE="Apache-2.0"
14 SLOT="0"
15 KEYWORDS="~amd64"
16 IUSE="hardened"
17
18 CONFIG_CHECK="~BRIDGE_VLAN_FILTERING"
19
20 src_compile() {
21         pushd src || die
22         local i
23         for i in plugins/{meta/{bandwidth,firewall,flannel,portmap,sbr,tuning},main/{bridge,host-device,ipvlan,loopback,macvlan,ptp,vlan},ipam/{dhcp,host-local,static},sample}; do
24                 CGO_LDFLAGS="$(usex hardened '-fno-PIC ' '')" GOPATH="${WORKDIR}/${P}" go install -v "${EGO_PN}/${i}" || die
25         done
26         popd || die
27 }
28
29 src_install() {
30         exeinto /opt/cni/bin
31         doexe bin/*
32         pushd src/${EGO_PN} || die
33         dodoc README.md
34         local i
35         for i in plugins/{meta/{bandwidth,firewall,flannel,portmap,sbr,tuning},main/{bridge,host-device,ipvlan,loopback,macvlan,ptp,vlan},ipam/{dhcp,host-local,static},sample}; do
36                 newdoc README.md ${i##*/}.README.md
37         done
38         popd || die
39 }