summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDustin Polke <dustin.polke@uni-siegen.de>2011-03-19 12:09:35 +0100
committerDustin Polke <dustin.polke@uni-siegen.de>2011-03-19 12:09:35 +0100
commitacc76401681e579632c1cb90817ff4d7c83ae649 (patch)
treedfb658b03c8945ebd5e08944042b708e57deb3ce /net-analyzer/tcpreplay/tcpreplay-3.4.4-r1.ebuild
parent[dev-tex/nfssext-cfr] Drop ebuilds; they are now included in texlive-2010. (diff)
downloadDuPol-acc76401681e579632c1cb90817ff4d7c83ae649.tar.gz
DuPol-acc76401681e579632c1cb90817ff4d7c83ae649.tar.bz2
DuPol-acc76401681e579632c1cb90817ff4d7c83ae649.zip
[net-analyzer/tcpreplay] Fix test failure in 3.4.4-r1.
Copy of 3.4.4-r1.ebuild,v 1.2 from portage; Fix quoting; Add variables to set nic to be used for tests.
Diffstat (limited to 'net-analyzer/tcpreplay/tcpreplay-3.4.4-r1.ebuild')
-rw-r--r--net-analyzer/tcpreplay/tcpreplay-3.4.4-r1.ebuild64
1 files changed, 64 insertions, 0 deletions
diff --git a/net-analyzer/tcpreplay/tcpreplay-3.4.4-r1.ebuild b/net-analyzer/tcpreplay/tcpreplay-3.4.4-r1.ebuild
new file mode 100644
index 0000000..ee289fa
--- /dev/null
+++ b/net-analyzer/tcpreplay/tcpreplay-3.4.4-r1.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/tcpreplay/tcpreplay-3.4.4-r1.ebuild,v 1.2 2011/03/14 19:18:36 hwoarang Exp $
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="replay saved tcpdump or snoop files at arbitrary speeds"
+HOMEPAGE="http://tcpreplay.synfin.net/"
+SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 ~sparc ~x86"
+IUSE="debug pcapnav +tcpdump"
+
+DEPEND="
+ >=sys-devel/autogen-5.9.8
+ dev-libs/libdnet
+ >=net-libs/libpcap-0.9
+ tcpdump? ( net-analyzer/tcpdump )
+ pcapnav? ( net-libs/libpcapnav )"
+
+RDEPEND="${DEPEND}"
+
+: ${TCPREPLAY_NIC:="eth0"}
+: ${TCPREPLAY_NIC2:="$TCPREPLAY_NIC}"}
+
+src_prepare() {
+ echo "We don't use bundled libopts" > libopts/options.h
+ epatch "${FILESDIR}"/${P}-crash.patch
+}
+
+src_configure() {
+ # By default it uses static linking. Avoid that, bug 252940
+ econf --enable-shared \
+ --disable-local-libopts \
+ --with-testnic="${TCPREPLAY_NIC}" \
+ --with-testnic2="${TCPREPLAY_NIC2}" \
+ $(use_with tcpdump tcpdump /usr/sbin/tcpdump) \
+ $(use_with pcapnav pcapnav-config /usr/bin/pcapnav-config) \
+ $(use_enable debug)
+}
+
+src_test() {
+ if [[ ! ${EUID} -eq 0 ]]; then
+ ewarn "Some tests were disabled due to FEATURES=userpriv"
+ ewarn "To run all tests issue the following command as root:"
+ ewarn " # make -C ${S}/test"
+ make -C test tcpprep || die "self test failed - see ${S}/test/test.log"
+ else
+ make test || {
+ ewarn "Note, that some tests require an iface to be UP. The" ;
+ ewarn "default setting is eth0. A different iface can be used by" ;
+ ewarn "setting 'TCPREPLAY_NIC' and 'TCPREPLAY_NIC2 variables." ;
+ die "self test failed - see ${S}/test/test.log" ; }
+ fi
+}
+
+src_install() {
+ make DESTDIR="${D}" install || die
+ dodoc README docs/{CHANGELOG,CREDIT,HACKING,TODO} || die
+}