1 |
commit: e1c3326f84baa1e2050df2653cc37736d2a64796 |
2 |
Author: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Feb 3 16:49:11 2019 +0000 |
4 |
Commit: Jeroen Roovers <jer <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Feb 3 16:52:03 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e1c3326f |
7 |
|
8 |
net-analyzer/tcpreplay: Live ebuild |
9 |
|
10 |
Package-Manager: Portage-2.3.59, Repoman-2.3.12 |
11 |
Signed-off-by: Jeroen Roovers <jer <AT> gentoo.org> |
12 |
|
13 |
net-analyzer/tcpreplay/tcpreplay-999999.ebuild | 73 ++++++++++++++++++++++++++ |
14 |
1 file changed, 73 insertions(+) |
15 |
|
16 |
diff --git a/net-analyzer/tcpreplay/tcpreplay-999999.ebuild b/net-analyzer/tcpreplay/tcpreplay-999999.ebuild |
17 |
new file mode 100644 |
18 |
index 00000000000..36c173f66f5 |
19 |
--- /dev/null |
20 |
+++ b/net-analyzer/tcpreplay/tcpreplay-999999.ebuild |
21 |
@@ -0,0 +1,73 @@ |
22 |
+# Copyright 1999-2019 Gentoo Authors |
23 |
+# Distributed under the terms of the GNU General Public License v2 |
24 |
+ |
25 |
+EAPI=7 |
26 |
+inherit autotools flag-o-matic git-r3 |
27 |
+ |
28 |
+DESCRIPTION="utilities for editing and replaying previously captured network traffic" |
29 |
+HOMEPAGE="http://tcpreplay.appneta.com/ https://github.com/appneta/tcpreplay" |
30 |
+LICENSE="BSD GPL-3" |
31 |
+EGIT_REPO_URI="https://github.com/appneta/tcpreplay" |
32 |
+ |
33 |
+SLOT="0" |
34 |
+KEYWORDS="" |
35 |
+IUSE="debug pcapnav +tcpdump" |
36 |
+ |
37 |
+DEPEND=" |
38 |
+ >=sys-devel/autogen-5.18.4[libopts] |
39 |
+ dev-libs/libdnet |
40 |
+ >=net-libs/libpcap-0.9 |
41 |
+ tcpdump? ( net-analyzer/tcpdump ) |
42 |
+ pcapnav? ( net-libs/libpcapnav ) |
43 |
+" |
44 |
+RDEPEND="${DEPEND}" |
45 |
+DOCS=( |
46 |
+ docs/{CHANGELOG,CREDIT,HACKING,TODO} |
47 |
+) |
48 |
+PATCHES=( |
49 |
+ "${FILESDIR}"/${PN}-4.3.0-enable-pcap_findalldevs.patch |
50 |
+) |
51 |
+ |
52 |
+S=${WORKDIR}/${P/_/-} |
53 |
+ |
54 |
+src_prepare() { |
55 |
+ default |
56 |
+ |
57 |
+ sed -i \ |
58 |
+ -e 's|#include <dnet.h>|#include <dnet/eth.h>|g' \ |
59 |
+ src/common/sendpacket.c || die |
60 |
+ sed -i \ |
61 |
+ -e 's|@\([A-Z_]*\)@|$(\1)|g' \ |
62 |
+ -e '/tcpliveplay_CFLAGS/s|$| $(LDNETINC)|g' \ |
63 |
+ -e '/tcpliveplay_LDADD/s|$| $(LDNETLIB)|g' \ |
64 |
+ src/Makefile.am || die |
65 |
+ |
66 |
+ eautoreconf |
67 |
+} |
68 |
+ |
69 |
+src_configure() { |
70 |
+ # By default it uses static linking. Avoid that, bug 252940 |
71 |
+ econf \ |
72 |
+ $(use_enable debug) \ |
73 |
+ $(use_with pcapnav pcapnav-config /usr/bin/pcapnav-config) \ |
74 |
+ $(use_with tcpdump tcpdump /usr/sbin/tcpdump) \ |
75 |
+ --disable-local-libopts \ |
76 |
+ --enable-dynamic-link \ |
77 |
+ --enable-shared \ |
78 |
+ --with-libdnet \ |
79 |
+ --with-testnic2=lo \ |
80 |
+ --with-testnic=lo |
81 |
+} |
82 |
+ |
83 |
+src_test() { |
84 |
+ if [[ ! ${EUID} -eq 0 ]]; then |
85 |
+ ewarn "Some tests will be disabled due to FEATURES=userpriv" |
86 |
+ ewarn "To run all tests issue the following command as root:" |
87 |
+ ewarn " # make -C ${S}/test" |
88 |
+ emake -j1 -C test tcpprep || die "self test failed - see ${S}/test/test.log" |
89 |
+ else |
90 |
+ emake -j1 test || { |
91 |
+ ewarn "Note that some tests require eth0 iface to be up." ; |
92 |
+ die "self test failed - see ${S}/test/test.log" ; } |
93 |
+ fi |
94 |
+} |