1 # Created by: Bruce M Simpson <bms@FreeBSD.org>
2 # $FreeBSD: net/tcpdump/Makefile 324744 2013-08-14 22:35:50Z ak $
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>
33 # The --without-crypto flag needs to be explicitly specified. The
34 # configure script gets confused if you specify --with-crypto and
35 # thinks this means you *don't* want crypto.
37 .if ${PORT_OPTIONS:MCRYPTO}
40 CONFIGURE_ARGS+= --without-crypto
43 .if ${PORT_OPTIONS:MIPV6}
44 CONFIGURE_ARGS+= --enable-ipv6
47 .if empty(PORT_OPTIONS:MSMB)
48 CONFIGURE_ARGS+= --disable-smb
51 .if ${PORT_OPTIONS:MSMI}
52 LIB_DEPENDS+= smi:${PORTSDIR}/net-mgmt/libsmi
54 CONFIGURE_ARGS+= --disable-smi
57 .if ${PORT_OPTIONS:MUSER}
58 CONFIGURE_ARGS+= --with-user=${UNPRIV_USER}
61 .if ${PORT_OPTIONS:MCHROOT}
62 CONFIGURE_ARGS+= --with-chroot=${CHROOTDIR}
65 .include <bsd.port.pre.mk>
68 PLIST_FILES= sbin/tcpdump
71 @${REINPLACE_CMD} -e "s,\./\.\./${LIBPCAP_FORCE_VER}/libpcap\.a,${LOCALBASE}/lib/libpcap.so.1," ${WRKSRC}/Makefile
74 ${INSTALL_PROGRAM} ${WRKSRC}/tcpdump ${PREFIX}/sbin
75 ${INSTALL_MAN} ${WRKSRC}/tcpdump.1 ${MAN1PREFIX}/man/man1
77 .include <bsd.port.post.mk>