1 |
commit: 166b01ff87eef4866daeede41629a619e8605d02 |
2 |
Author: Patrick McLean <patrick.mclean <AT> sony <DOT> com> |
3 |
AuthorDate: Sat May 9 02:50:50 2020 +0000 |
4 |
Commit: Patrick McLean <chutzpah <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat May 9 02:54:51 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=166b01ff |
7 |
|
8 |
net-firewall/arptables-0.0.5-r1: Revbump, support eselect-arptables |
9 |
|
10 |
Copyright: Sony Interactive Entertainment Inc. |
11 |
Package-Manager: Portage-2.3.99, Repoman-2.3.22 |
12 |
Signed-off-by: Patrick McLean <chutzpah <AT> gentoo.org> |
13 |
|
14 |
net-firewall/arptables/arptables-0.0.5-r1.ebuild | 55 ++++++++++++++++++++++++ |
15 |
1 file changed, 55 insertions(+) |
16 |
|
17 |
diff --git a/net-firewall/arptables/arptables-0.0.5-r1.ebuild b/net-firewall/arptables/arptables-0.0.5-r1.ebuild |
18 |
new file mode 100644 |
19 |
index 00000000000..6dc0f8f781c |
20 |
--- /dev/null |
21 |
+++ b/net-firewall/arptables/arptables-0.0.5-r1.ebuild |
22 |
@@ -0,0 +1,55 @@ |
23 |
+# Copyright 1999-2020 Gentoo Authors |
24 |
+# Distributed under the terms of the GNU General Public License v2 |
25 |
+ |
26 |
+EAPI=7 |
27 |
+ |
28 |
+inherit toolchain-funcs |
29 |
+ |
30 |
+DESCRIPTION="set up, maintain, and inspect the tables of ARP rules in the Linux kernel" |
31 |
+HOMEPAGE="http://ebtables.sourceforge.net/" |
32 |
+SRC_URI="ftp://ftp.netfilter.org/pub/${PN}/${P}.tar.gz" |
33 |
+ |
34 |
+LICENSE="GPL-2" |
35 |
+SLOT="0" |
36 |
+KEYWORDS="~amd64 ~ppc ~x86" |
37 |
+IUSE="" |
38 |
+ |
39 |
+BDEPEND=">=app-eselect/eselect-iptables-20200508" |
40 |
+RDEPEND="${BDEPEND}" |
41 |
+ |
42 |
+src_compile() { |
43 |
+ # -O0 does not work and at least -O2 is required, bug #240752 |
44 |
+ emake CC="$(tc-getCC)" COPT_FLAGS="-O2 ${CFLAGS//-O0/-O2}" |
45 |
+ sed -e 's:__EXEC_PATH__:/sbin:g' \ |
46 |
+ -i arptables-save arptables-restore || die "sed failed" |
47 |
+} |
48 |
+ |
49 |
+src_install() { |
50 |
+ emake \ |
51 |
+ PREFIX="${ED}"/ \ |
52 |
+ LIBDIR="${ED}/$(get_libdir)" \ |
53 |
+ SYSCONFIGDIR="${ED}"/etc \ |
54 |
+ MANDIR="${ED}"/usr/share/man \ |
55 |
+ install |
56 |
+ |
57 |
+ newman arptables-legacy.8 arptables.8 |
58 |
+} |
59 |
+ |
60 |
+pkg_postinst() { |
61 |
+ if ! eselect arptables show &>/dev/null; then |
62 |
+ elog "Current arptables implementation is unset, setting to ebtables-legacy" |
63 |
+ eselect arptables set arptables-legacy |
64 |
+ fi |
65 |
+ |
66 |
+ eselect arptables show |
67 |
+} |
68 |
+ |
69 |
+pkg_prerm() { |
70 |
+ if has_version 'net-firewall/iptables[nftables]'; then |
71 |
+ elog "Resetting arptables symlinks to xtables-nft-multi before removal" |
72 |
+ eselect arptables set xtables-nft-multi |
73 |
+ else |
74 |
+ elog "Unsetting arptables symlinks before removal" |
75 |
+ eselect arptables unset |
76 |
+ fi |
77 |
+} |