Update net/tcpdump to version 4.9.3
[dports.git] / net / tcpdump / Makefile
1 # Created by: Bruce M Simpson <bms@FreeBSD.org>
2 # $FreeBSD$
3
4 PORTNAME=       tcpdump
5 PORTVERSION=    4.9.3
6 CATEGORIES=     net
7 MASTER_SITES=   http://www.tcpdump.org/release/
8
9 MAINTAINER=     garga@FreeBSD.org
10 COMMENT=        Ubiquitous network traffic analysis tool
11
12 LICENSE=        BSD3CLAUSE
13 LICENSE_FILE=   ${WRKSRC}/LICENSE
14
15 LIB_DEPENDS=    libpcap.so.1:net/libpcap
16
17 USES=           gmake
18
19 GNU_CONFIGURE=  yes
20 UNPRIV_USER?=   tcpdump
21 CHROOTDIR?=     /var/run/tcpdump
22
23 OPTIONS_DEFINE= CRYPTO SMB SMI USER CHROOT
24 OPTIONS_DEFAULT=        CRYPTO SMB SMI
25
26 CRYPTO_DESC=    Support IPSEC and TCPMD5
27 # This one is intentionally worded this way because the default
28 # description implies that tcpdump would not capture SMB, which
29 # is not true. It will just not print it if this option is off.
30 SMB_DESC=       Support printing SMB information
31 SMI_DESC=       Allow MIBs to be loaded on the fly
32 USER_DESC=      Drop privileges to dedicated user
33 CHROOT_DESC=    Chroot to /var/run/tcpdump (set CHROOTDIR to change)
34
35 CRYPTO_USES=            ssl
36 CRYPTO_CONFIGURE_WITH=  crypto
37 SMB_CONFIGURE_ENABLE=   smb
38 SMI_CONFIGURE_WITH=     smi
39 SMI_LIB_DEPENDS=        libsmi.so:net-mgmt/libsmi
40 USER_CONFIGURE_ON=      --with-user=${UNPRIV_USER}
41 USER_VARS=              USERS=${UNPRIV_USER} GROUPS=${UNPRIV_USER}
42 CHROOT_CONFIGURE_ON=    --with-chroot=${CHROOTDIR}
43
44 PLIST_FILES=    sbin/tcpdump \
45                 man/man1/tcpdump.1.gz
46
47 post-patch:
48         @${REINPLACE_CMD} -e 's,sys/capability.h,sys/capsicum.h,' \
49                 ${WRKSRC}/tcpdump.c
50
51 post-configure:
52         @${REINPLACE_CMD} -e "s,\./\.\./${LIBPCAP_FORCE_VER}/libpcap\.a,${LOCALBASE}/lib/libpcap.so.1," \
53                 ${WRKSRC}/Makefile
54
55 do-install:
56         ${INSTALL_PROGRAM} ${WRKSRC}/tcpdump ${STAGEDIR}/${PREFIX}/sbin
57         ${INSTALL_MAN} ${WRKSRC}/tcpdump.1 ${STAGEDIR}/${MAN1PREFIX}/man/man1
58
59 .include <bsd.port.mk>