1 |
commit: 378a5a00455245d79a60b65bea7bdd83b4bdb2fb |
2 |
Author: Sergey Popov <pinkbyte <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Mar 20 13:51:38 2018 +0000 |
4 |
Commit: Sergey Popov <pinkbyte <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Mar 20 13:51:56 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=378a5a00 |
7 |
|
8 |
net-firewall/ipt_netflow: version bump |
9 |
|
10 |
Package-Manager: Portage-2.3.19, Repoman-2.3.6 |
11 |
|
12 |
net-firewall/ipt_netflow/Manifest | 1 + |
13 |
net-firewall/ipt_netflow/ipt_netflow-2.3.ebuild | 100 ++++++++++++++++++++++++ |
14 |
2 files changed, 101 insertions(+) |
15 |
|
16 |
diff --git a/net-firewall/ipt_netflow/Manifest b/net-firewall/ipt_netflow/Manifest |
17 |
index d2fd5f95a46..b87114ce096 100644 |
18 |
--- a/net-firewall/ipt_netflow/Manifest |
19 |
+++ b/net-firewall/ipt_netflow/Manifest |
20 |
@@ -1 +1,2 @@ |
21 |
DIST ipt-netflow-2.2.tgz 96697 BLAKE2B 996ad539b6a6a5198a1e4a4a1a51f0610d97fb45740ad9c92e19854f2928eb697ca8fe14625054a05b106eebc345dfe6c235cdf375d1360ef44ff6cf0b03f34a SHA512 a406ab9bd18616414d8c99f427382a075bdb8000d8c40959f5b6d6e577d7eb4dfc7f8b773664a516ec2228d15590f21c3fbd6aa3d4302f6cdf03810e1702af74 |
22 |
+DIST ipt_netflow-2.3.tar.gz 90987 BLAKE2B fbe46583e58e75e3cfe5cc5ad4e8b40d5040d6642f850c560c3e8aa831effa43cba8f25907d32b3b66721f4d5d5bb8579bafa82e4b8d1c9a2225a5c748d08dd9 SHA512 e5ba66da9cae6fb9652e5532383233d433dd30dd16634734860f7e6910e46080e562e2d72c74584a86ead31156cffd4c5c44b438f617a9e5b3e5fdc1470045fc |
23 |
|
24 |
diff --git a/net-firewall/ipt_netflow/ipt_netflow-2.3.ebuild b/net-firewall/ipt_netflow/ipt_netflow-2.3.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..e5345962d7d |
27 |
--- /dev/null |
28 |
+++ b/net-firewall/ipt_netflow/ipt_netflow-2.3.ebuild |
29 |
@@ -0,0 +1,100 @@ |
30 |
+# Copyright 1999-2018 Gentoo Foundation |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=6 |
34 |
+MY_PN="${PN/_/-}" |
35 |
+MY_P="${MY_PN}-${PV}" |
36 |
+inherit linux-info linux-mod toolchain-funcs |
37 |
+ |
38 |
+DESCRIPTION="Netflow iptables module" |
39 |
+HOMEPAGE=" |
40 |
+ https://sourceforge.net/projects/ipt-netflow |
41 |
+ https://github.com/aabc/ipt-netflow |
42 |
+" |
43 |
+SRC_URI="https://github.com/aabc/ipt-netflow/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
44 |
+ |
45 |
+LICENSE="GPL-2" |
46 |
+SLOT="0" |
47 |
+KEYWORDS="~amd64 ~x86" |
48 |
+ |
49 |
+IUSE="debug natevents snmp" |
50 |
+ |
51 |
+RDEPEND=" |
52 |
+ net-firewall/iptables:0= |
53 |
+ snmp? ( net-analyzer/net-snmp ) |
54 |
+" |
55 |
+DEPEND="${RDEPEND} |
56 |
+ virtual/linux-sources |
57 |
+ virtual/pkgconfig |
58 |
+" |
59 |
+ |
60 |
+# set S before MODULE_NAMES |
61 |
+S="${WORKDIR}/${MY_P}" |
62 |
+PATCHES=( |
63 |
+ # bug #455984 |
64 |
+ "${FILESDIR}/${PN}-2.0-configure.patch" |
65 |
+) |
66 |
+ |
67 |
+pkg_setup() { |
68 |
+ BUILD_TARGETS="all" |
69 |
+ MODULE_NAMES="ipt_NETFLOW(ipt_netflow:${S})" |
70 |
+ IPT_LIB="/usr/$(get_libdir)/xtables" |
71 |
+ local CONFIG_CHECK="~IP_NF_IPTABLES" |
72 |
+ use debug && CONFIG_CHECK+=" ~DEBUG_FS" |
73 |
+ use natevents && CONFIG_CHECK+=" NF_CONNTRACK_EVENTS NF_NAT_NEEDED" |
74 |
+ linux-mod_pkg_setup |
75 |
+} |
76 |
+ |
77 |
+src_prepare() { |
78 |
+ sed -i \ |
79 |
+ -e 's:make -C:$(MAKE) -C:g' \ |
80 |
+ -e 's:gcc -O2:$(CC) $(CFLAGS) $(LDFLAGS):' \ |
81 |
+ -e 's:gcc:$(CC) $(CFLAGS) $(LDFLAGS):' \ |
82 |
+ Makefile.in || die |
83 |
+ |
84 |
+ # Fix incorrect module version in sources |
85 |
+ sed -i -e "/IPT_NETFLOW_VERSION/s/2.2/${PV}/" ipt_NETFLOW.c || die |
86 |
+ |
87 |
+ # Checking for directory is enough |
88 |
+ sed -i -e 's:-s /etc/snmp/snmpd.conf:-d /etc/snmp:' configure || die |
89 |
+ |
90 |
+ default |
91 |
+} |
92 |
+ |
93 |
+do_conf() { |
94 |
+ echo ./configure $* |
95 |
+ ./configure $* ${EXTRA_ECONF} || die 'configure failed' |
96 |
+} |
97 |
+ |
98 |
+src_configure() { |
99 |
+ local IPT_VERSION="$($(tc-getPKG_CONFIG) --modversion xtables)" |
100 |
+ # this configure script is not based on autotools |
101 |
+ # ipt-src need to be defined, see bug #455984 |
102 |
+ do_conf \ |
103 |
+ --disable-dkms \ |
104 |
+ --enable-aggregation \ |
105 |
+ --enable-direction \ |
106 |
+ --enable-macaddress \ |
107 |
+ --enable-vlan \ |
108 |
+ --ipt-lib="${IPT_LIB}" \ |
109 |
+ --ipt-src="/usr/" \ |
110 |
+ --ipt-ver="${IPT_VERSION}" \ |
111 |
+ --kdir="${KV_DIR}" \ |
112 |
+ --kver="${KV_FULL}" \ |
113 |
+ $(use debug && echo '--enable-debugfs') \ |
114 |
+ $(use natevents && echo '--enable-natevents') \ |
115 |
+ $(use snmp && echo '--enable-snmp-rules' || echo '--disable-snmp-agent') |
116 |
+} |
117 |
+ |
118 |
+src_compile() { |
119 |
+ emake ARCH="$(tc-arch-kernel)" CC="$(tc-getCC)" all |
120 |
+} |
121 |
+ |
122 |
+src_install() { |
123 |
+ linux-mod_src_install |
124 |
+ exeinto "${IPT_LIB}" |
125 |
+ doexe libipt_NETFLOW.so |
126 |
+ use snmp && emake DESTDIR="${D}" SNMPTGSO="/usr/$(get_libdir)/snmp/dlmod/snmp_NETFLOW.so" sinstall |
127 |
+ doheader ipt_NETFLOW.h |
128 |
+ dodoc README* |
129 |
+} |