PORTNAME=	tcpreplay
DISTVERSION=	4.5.2
CATEGORIES=	net-mgmt
MASTER_SITES=	https://github.com/appneta/${PORTNAME}/releases/download/v${DISTVERSION}/

MAINTAINER=	ports@MidnightBSD.org
COMMENT=	Tool to replay saved packet capture files
WWW=		https://github.com/appneta/tcpreplay

LICENSE=	gpl3
LICENSE_FILE=	${WRKSRC}/docs/LICENSE

LIB_DEPENDS=	libdnet.so:net/libdnet

USES=		cpe gmake libtool pkgconfig tar:xz
CPE_VENDOR=	broadcom

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--disable-libopts-install \
		--program-transform-name='s|.*\(tcp.*\)|\1|'

TEST_TARGET=	test

OPTIONS_DEFINE=			LIBPCAP_PORTS
LIBPCAP_PORTS_DESC=		Build with net/libpcap instead of from the base OS
# needs .so version (see: 262976)
LIBPCAP_PORTS_LIB_DEPENDS=	libpcap.so.1:net/libpcap
LIBPCAP_PORTS_CONFIGURE_OFF=	--with-libpcap=/usr/lib

.include <bsd.port.mk>
