Tweak net/tcpdump version 4.4.0
[dports.git] / net / tcpdump / Makefile
1 # Created by: Bruce M Simpson <bms@FreeBSD.org>
2 # $FreeBSD: net/tcpdump/Makefile 324744 2013-08-14 22:35:50Z ak $
3
4 PORTNAME=       tcpdump
5 PORTVERSION=    4.4.0
6 CATEGORIES=     net ipv6
7 MASTER_SITES=   http://www.tcpdump.org/release/
8
9 MAINTAINER=     wxs@FreeBSD.org
10 COMMENT=        Ubiquitous network traffic analysis tool
11
12 LIB_DEPENDS=    pcap:${PORTSDIR}/net/libpcap
13
14 GNU_CONFIGURE=          yes
15 USE_GMAKE=              yes
16
17 UNPRIV_USER?=   nobody
18 CHROOTDIR?=     /var/run/tcpdump
19
20 OPTIONS_DEFINE= CRYPTO IPV6 SMB SMI USER CHROOT
21 OPTIONS_DEFAULT=        CRYPTO IPV6 SMB SMI
22
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)
31
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.
36 #
37 .if ${PORT_OPTIONS:MCRYPTO}
38 USE_OPENSSL=    yes
39 .else
40 CONFIGURE_ARGS+=        --without-crypto
41 .endif
42
43 .if ${PORT_OPTIONS:MIPV6}
44 CONFIGURE_ARGS+=        --enable-ipv6
45 .endif
46
47 .if empty(PORT_OPTIONS:MSMB)
48 CONFIGURE_ARGS+=        --disable-smb
49 .endif
50
51 .if ${PORT_OPTIONS:MSMI}
52 LIB_DEPENDS+=           smi:${PORTSDIR}/net-mgmt/libsmi
53 .else
54 CONFIGURE_ARGS+=        --disable-smi
55 .endif
56
57 .if ${PORT_OPTIONS:MUSER}
58 CONFIGURE_ARGS+=        --with-user=${UNPRIV_USER}
59 .endif
60
61 .if ${PORT_OPTIONS:MCHROOT}
62 CONFIGURE_ARGS+=        --with-chroot=${CHROOTDIR}
63 .endif
64
65 .include <bsd.port.pre.mk>
66
67 MAN1=           tcpdump.1
68 PLIST_FILES=    sbin/tcpdump
69
70 post-configure:
71         @${REINPLACE_CMD} -e "s,\./\.\./${LIBPCAP_FORCE_VER}/libpcap\.a,${LOCALBASE}/lib/libpcap.so.1," ${WRKSRC}/Makefile
72
73 do-install:
74         ${INSTALL_PROGRAM} ${WRKSRC}/tcpdump ${PREFIX}/sbin
75         ${INSTALL_MAN} ${WRKSRC}/tcpdump.1 ${MAN1PREFIX}/man/man1
76
77 .include <bsd.port.post.mk>