SUMMARY="A tool for network monitoring and data acquisition"
DESCRIPTION="
Tcpdump prints out a description of the contents of packets on a \
network interface that match a boolean expression."
HOMEPAGE="http://www.tcpdump.org"
COPYRIGHT="
	1998-2015 The TCPDUMP Project
	1988-1997, 2000 The Regents of the University of California
	2003, 2004 David Young
	1997, 1998 The NetBSD Foundation, Inc.
	2007 Paolo Abeni
	2004 Michael Richardson
	1995-1999 Andrew Tridgell
	2001 Nickolai Zeldovich
	2000-2001 William C. Fenner
	2009 Bert Vermeulen
	2000 Ben Smithurst
	1998-2004 Hannes Gredler
	1997 Yen Yen Lim and North Dakota State University
	2000 Lennert Buytenhek
	1990-1997 John Robert LoVerso
	2001 NETLAB, Temple University
	2001 Protocol Engineering Lab, University of Delaware
	2000 United States Government as represented by the Secretary of the Navy
	2007 Andrey "nording" Chernyak
	2000 Alfredo Andres Omella
	2009 Florian Forster
	2013 Petar Alilovic, Faculty of Electrical Engineering and Computing, University of Zagreb
	2013 Romain Francoise
	2012 Gregory Detal
	2012 Christoph Paasch
	1995-1998, 2001-2002 WIDE Project
"
LICENSE="BSD (3-clause)"
REVISION="1"
SOURCE_URI="http://www.tcpdump.org/release/tcpdump-${portVersion}.tar.gz"
CHECKSUM_SHA256="79b36985fb2703146618d87c4acde3e068b91c553fb93f021a337f175fd10ebe"
PATCHES="tcpdump-$portVersion.patchset"

if [ $effectiveTargetArchitecture = x86_gcc2 ]; then
	PATCHES="tcpdump-$portVersion.gcc2.patchset"
fi

ARCHITECTURES="all"

PROVIDES="
	tcpdump = $portVersion
	cmd:tcpdump
	"
REQUIRES="
	haiku
	lib:libpcap
	"

BUILD_REQUIRES="
	haiku_devel
	devel:libpcap
	"
BUILD_PREREQUIRES="
	cmd:autoconf
	cmd:automake
	cmd:awk
	cmd:gcc
	cmd:make
	cmd:strip
	"

BUILD()
{
	autoreconf -fi
	runConfigure ./configure
	make $jobArgs
}

INSTALL()
{
	make install
	strip $binDir/tcpdump
	rm $binDir/tcpdump.$portVersion
}

TEST()
{
	make check
}
