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