1 |
commit: ace76fb957e46e87b595cb3811d16e41d5b5e6fb |
2 |
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Nov 28 20:25:42 2015 +0000 |
4 |
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Nov 28 20:25:53 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ace76fb9 |
7 |
|
8 |
net-firewall/iptables: control nfsynproxy tool via USE=pcap #566886 |
9 |
|
10 |
net-firewall/iptables/iptables-1.4.21-r4.ebuild | 105 ++++++++++++++++++++++++ |
11 |
1 file changed, 105 insertions(+) |
12 |
|
13 |
diff --git a/net-firewall/iptables/iptables-1.4.21-r4.ebuild b/net-firewall/iptables/iptables-1.4.21-r4.ebuild |
14 |
new file mode 100644 |
15 |
index 0000000..49b9bd8 |
16 |
--- /dev/null |
17 |
+++ b/net-firewall/iptables/iptables-1.4.21-r4.ebuild |
18 |
@@ -0,0 +1,105 @@ |
19 |
+# Copyright 1999-2014 Gentoo Foundation |
20 |
+# Distributed under the terms of the GNU General Public License v2 |
21 |
+# $Id$ |
22 |
+ |
23 |
+EAPI="5" |
24 |
+ |
25 |
+# Force users doing their own patches to install their own tools |
26 |
+AUTOTOOLS_AUTO_DEPEND=no |
27 |
+ |
28 |
+inherit eutils multilib systemd toolchain-funcs autotools flag-o-matic |
29 |
+ |
30 |
+DESCRIPTION="Linux kernel (2.4+) firewall, NAT and packet mangling tools" |
31 |
+HOMEPAGE="http://www.netfilter.org/projects/iptables/" |
32 |
+SRC_URI="http://www.netfilter.org/projects/iptables/files/${P}.tar.bz2" |
33 |
+ |
34 |
+LICENSE="GPL-2" |
35 |
+# Subslot tracks libxtables as that's the one other packages generally link |
36 |
+# against and iptables changes. Will have to revisit if other sonames change. |
37 |
+SLOT="0/10" |
38 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86" |
39 |
+IUSE="conntrack ipv6 netlink pcap static-libs" |
40 |
+ |
41 |
+RDEPEND=" |
42 |
+ conntrack? ( net-libs/libnetfilter_conntrack ) |
43 |
+ netlink? ( net-libs/libnfnetlink ) |
44 |
+ pcap? ( net-libs/libpcap ) |
45 |
+" |
46 |
+DEPEND="${RDEPEND} |
47 |
+ virtual/os-headers |
48 |
+ virtual/pkgconfig |
49 |
+" |
50 |
+ |
51 |
+src_prepare() { |
52 |
+ # use the saner headers from the kernel |
53 |
+ rm -f include/linux/{kernel,types}.h |
54 |
+ |
55 |
+ epatch "${FILESDIR}"/${P}-configure.patch #557586 |
56 |
+ epatch "${FILESDIR}"/${P}-static-connlabel-config.patch #558234 |
57 |
+ |
58 |
+ # Only run autotools if user patched something |
59 |
+ epatch_user && eautoreconf || elibtoolize |
60 |
+} |
61 |
+ |
62 |
+src_configure() { |
63 |
+ # Some libs use $(AR) rather than libtool to build #444282 |
64 |
+ tc-export AR |
65 |
+ |
66 |
+ # Hack around struct mismatches between userland & kernel for some ABIs. #472388 |
67 |
+ use amd64 && [[ ${ABI} == "x32" ]] && append-flags -fpack-struct |
68 |
+ |
69 |
+ sed -i \ |
70 |
+ -e "/nfnetlink=[01]/s:=[01]:=$(usex netlink 1 0):" \ |
71 |
+ -e "/nfconntrack=[01]/s:=[01]:=$(usex conntrack 1 0):" \ |
72 |
+ configure || die |
73 |
+ |
74 |
+ econf \ |
75 |
+ --sbindir="${EPREFIX}/sbin" \ |
76 |
+ --libexecdir="${EPREFIX}/$(get_libdir)" \ |
77 |
+ --enable-devel \ |
78 |
+ --enable-shared \ |
79 |
+ $(use_enable pcap bpf-compiler) \ |
80 |
+ $(use_enable pcap nfsynproxy) \ |
81 |
+ $(use_enable static-libs static) \ |
82 |
+ $(use_enable ipv6) |
83 |
+} |
84 |
+ |
85 |
+src_compile() { |
86 |
+ emake V=1 |
87 |
+} |
88 |
+ |
89 |
+src_install() { |
90 |
+ default |
91 |
+ dodoc INCOMPATIBILITIES iptables/iptables.xslt |
92 |
+ |
93 |
+ # all the iptables binaries are in /sbin, so might as well |
94 |
+ # put these small files in with them |
95 |
+ into / |
96 |
+ dosbin iptables/iptables-apply |
97 |
+ dosym iptables-apply /sbin/ip6tables-apply |
98 |
+ doman iptables/iptables-apply.8 |
99 |
+ |
100 |
+ insinto /usr/include |
101 |
+ doins include/iptables.h $(use ipv6 && echo include/ip6tables.h) |
102 |
+ insinto /usr/include/iptables |
103 |
+ doins include/iptables/internal.h |
104 |
+ |
105 |
+ keepdir /var/lib/iptables |
106 |
+ newinitd "${FILESDIR}"/${PN}.init iptables |
107 |
+ newconfd "${FILESDIR}"/${PN}-1.4.13.confd iptables |
108 |
+ if use ipv6 ; then |
109 |
+ keepdir /var/lib/ip6tables |
110 |
+ newinitd "${FILESDIR}"/iptables.init ip6tables |
111 |
+ newconfd "${FILESDIR}"/ip6tables-1.4.13.confd ip6tables |
112 |
+ fi |
113 |
+ |
114 |
+ systemd_dounit "${FILESDIR}"/systemd/iptables{,-{re,}store}.service |
115 |
+ if use ipv6 ; then |
116 |
+ systemd_dounit "${FILESDIR}"/systemd/ip6tables{,-{re,}store}.service |
117 |
+ fi |
118 |
+ |
119 |
+ # Move important libs to /lib #332175 |
120 |
+ gen_usr_ldscript -a ip{4,6}tc iptc xtables |
121 |
+ |
122 |
+ prune_libtool_files |
123 |
+} |