1 # New ports collection makefile for: tcpdump
2 # Date created: 10 December 2003
3 # Whom: Bruce M Simpson <bms@FreeBSD.org>
5 # $FreeBSD: ports/net/tcpdump/Makefile,v 1.33 2012/11/17 06:00:22 svnexp Exp $
11 MASTER_SITES= http://www.tcpdump.org/release/
13 MAINTAINER= wxs@FreeBSD.org
14 COMMENT= Ubiquitous network traffic analysis tool
16 LIB_DEPENDS= pcap:${PORTSDIR}/net/libpcap
23 CHROOTDIR?= /var/run/tcpdump
25 OPTIONS_DEFINE= CRYPTO IPV6 SMB SMI USER CHROOT
26 OPTIONS_DEFAULT= CRYPTO IPV6 SMB SMI
28 CRYPTO_DESC= Support IPSEC and TCPMD5
29 # This one is intentionally worded this way because the default
30 # description implies that tcpdump would not capture SMB, which
31 # is not true. It will just not print it if this option is off.
32 SMB_DESC= Support printing SMB information
33 SMI_DESC= Allow MIBs to be loaded on the fly
34 USER_DESC= Drop privileges to nobody
35 CHROOT_DESC= Chroot to /var/run/tcpdump (set CHROOTDIR to change)
37 .include <bsd.port.options.mk>
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+= smi:${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>
73 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 ${PREFIX}/sbin
80 ${INSTALL_MAN} ${WRKSRC}/tcpdump.1 ${MAN1PREFIX}/man/man1
82 .include <bsd.port.post.mk>