blob: f995d31b465d6e5eff93c8999d61790775d5ece2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
# New ports collection makefile for: tcpdump
# Date created: 10 December 2003
# Whom: Bruce M Simpson <bms@FreeBSD.org>
#
# $FreeBSD$
#
PORTNAME= tcpdump
PORTVERSION= 4.0.0
CATEGORIES= net ipv6
MASTER_SITES= http://www.tcpdump.org/release/
DISTNAME= ${PORTNAME}-${PORTVERSION}
MAINTAINER= wxs@FreeBSD.org
COMMENT= Ubiquitous network traffic analysis tool
LIB_DEPENDS= pcap.3:${PORTSDIR}/net/libpcap \
smi.2:${PORTSDIR}/net-mgmt/libsmi
GNU_CONFIGURE= yes
USE_GMAKE= yes
# Compilation Options
#
# User-definable switches:
# WITHOUT_CRYPTO Build without IPSEC or TCPMD5 decryption.
# WITHOUT_IPV6 Build without IPV6 support.
#
# Defaults: WITH_CRYPTO WITH_IPV6
# The --without-crypto flag needs to be explicitly specified. The
# configure script gets confused if you specify --with-crypto and
# thinks this means you *don't* want crypto.
#
.if defined(WITHOUT_CRYPTO)
CONFIGURE_ARGS+= --without-crypto
.else
USE_OPENSSL= defined
.endif
.if !defined(WITHOUT_IPV6)
CONFIGURE_ARGS+= --enable-ipv6
.endif
CONFIGURE_ARGS+= --disable-smb
MAN1= tcpdump.1
PLIST_FILES= sbin/tcpdump
#
# Force the use of the shared library from the libpcap port.
# Don't rely on pcap-config, it is still not ready for prime time.
#
# When building tcpdump against a particular pcap version, it expects to
# find a built, untarred source tree in the parent of the work tree.
# Build a symlink farm which points to the installed versions of the
# required files, in order to produce the files it wants without
# requiring that the libpcap distfile be untarred.
# Furthermore, tcpdump's aclocal.m4 only looks for the static version
# of this library, so we need to perform another substitution.
#
CFLAGS+= "-I${LOCALBASE}/include"
LDFLAGS+= "-L${LOCALBASE}/lib"
.include <bsd.port.pre.mk>
LIBPCAP_FORCE_VER= libpcap-1.0.0
LOCALPCAPFILES= include/pcap.h include/pcap-namedb.h include/pcap-bpf.h \
include/pcap lib/libpcap.a
WRKPCAPDIR= ${WRKDIR}/${LIBPCAP_FORCE_VER}
pre-configure:
@${MKDIR} ${WRKPCAPDIR}
.for i in ${LOCALPCAPFILES}
@${LN} -s ${LOCALBASE}/$i ${WRKPCAPDIR}
.endfor
post-configure:
@${REINPLACE_CMD} -e "s,\./\.\./${LIBPCAP_FORCE_VER}/libpcap\.a,${LOCALBASE}/lib/libpcap.so.3," ${WRKSRC}/Makefile
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/tcpdump ${PREFIX}/sbin
${INSTALL_MAN} ${WRKSRC}/tcpdump.1 ${MAN1PREFIX}/man/man1
.include <bsd.port.post.mk>
|