1 # Created by: Bruce M Simpson <bms@FreeBSD.org>
7 MASTER_SITES= http://www.tcpdump.org/release/
9 MAINTAINER= garga@FreeBSD.org
10 COMMENT= Ubiquitous network traffic analysis tool
14 LIB_DEPENDS= libpcap.so:${PORTSDIR}/net/libpcap
20 CHROOTDIR?= /var/run/tcpdump
22 OPTIONS_DEFINE= CRYPTO IPV6 SMB SMI USER CHROOT
23 OPTIONS_DEFAULT= CRYPTO IPV6 SMB SMI
25 CRYPTO_DESC= Support IPSEC and TCPMD5
26 # This one is intentionally worded this way because the default
27 # description implies that tcpdump would not capture SMB, which
28 # is not true. It will just not print it if this option is off.
29 SMB_DESC= Support printing SMB information
30 SMI_DESC= Allow MIBs to be loaded on the fly
31 USER_DESC= Drop privileges to nobody
32 CHROOT_DESC= Chroot to /var/run/tcpdump (set CHROOTDIR to change)
34 .include <bsd.port.options.mk>
36 CONFIGURE_ARGS+= --enable-pcap_setdirection --with-pcap_setdirection
38 # The --without-crypto flag needs to be explicitly specified. The
39 # configure script gets confused if you specify --with-crypto and
40 # thinks this means you *don't* want crypto.
42 .if ${PORT_OPTIONS:MCRYPTO}
45 CONFIGURE_ARGS+= --without-crypto
48 .if ${PORT_OPTIONS:MIPV6}
49 CONFIGURE_ARGS+= --enable-ipv6
52 .if empty(PORT_OPTIONS:MSMB)
53 CONFIGURE_ARGS+= --disable-smb
56 .if ${PORT_OPTIONS:MSMI}
57 LIB_DEPENDS+= libsmi.so:${PORTSDIR}/net-mgmt/libsmi
59 CONFIGURE_ARGS+= --disable-smi
62 .if ${PORT_OPTIONS:MUSER}
63 CONFIGURE_ARGS+= --with-user=${UNPRIV_USER}
66 .if ${PORT_OPTIONS:MCHROOT}
67 CONFIGURE_ARGS+= --with-chroot=${CHROOTDIR}
70 .include <bsd.port.pre.mk>
72 PLIST_FILES= sbin/tcpdump \
76 @${REINPLACE_CMD} -e "s,\./\.\./${LIBPCAP_FORCE_VER}/libpcap\.a,${LOCALBASE}/lib/libpcap.so.1," ${WRKSRC}/Makefile
79 ${INSTALL_PROGRAM} ${WRKSRC}/tcpdump ${STAGEDIR}/${PREFIX}/sbin
80 ${INSTALL_MAN} ${WRKSRC}/tcpdump.1 ${STAGEDIR}/${MAN1PREFIX}/man/man1
82 .include <bsd.port.post.mk>