diff options
author | wxs <wxs@FreeBSD.org> | 2012-01-15 11:15:02 +0800 |
---|---|---|
committer | wxs <wxs@FreeBSD.org> | 2012-01-15 11:15:02 +0800 |
commit | 9f0878579e770b52a9774a435e9ef06cc0820f0c (patch) | |
tree | 2c452a26e0b0fb7ae93068dac074ba4ccfcbf1e1 /net/tcpdump | |
parent | 4eaffc5b3d3b072edacb9ee86c9a88e1c6b4ba60 (diff) | |
download | freebsd-ports-gnome-9f0878579e770b52a9774a435e9ef06cc0820f0c.tar.gz freebsd-ports-gnome-9f0878579e770b52a9774a435e9ef06cc0820f0c.tar.zst freebsd-ports-gnome-9f0878579e770b52a9774a435e9ef06cc0820f0c.zip |
- Update to 4.2.1.
- Switch to using OPTIONS.
- Make libsmi optional.
- Add support for chroot and dropping privileges.
- Use pcap-config to find the right libpcap, no need to do the symlink farm.
Diffstat (limited to 'net/tcpdump')
-rw-r--r-- | net/tcpdump/Makefile | 70 | ||||
-rw-r--r-- | net/tcpdump/distinfo | 4 |
2 files changed, 34 insertions, 40 deletions
diff --git a/net/tcpdump/Makefile b/net/tcpdump/Makefile index 671185465caa..bead9eec13cd 100644 --- a/net/tcpdump/Makefile +++ b/net/tcpdump/Makefile @@ -6,28 +6,30 @@ # PORTNAME= tcpdump -PORTVERSION= 4.1.1 +PORTVERSION= 4.2.1 CATEGORIES= net ipv6 MASTER_SITES= http://www.tcpdump.org/release/ MAINTAINER= wxs@FreeBSD.org COMMENT= Ubiquitous network traffic analysis tool -LIB_DEPENDS= pcap.1:${PORTSDIR}/net/libpcap \ - smi.2:${PORTSDIR}/net-mgmt/libsmi +LIB_DEPENDS= pcap.1:${PORTSDIR}/net/libpcap GNU_CONFIGURE= yes USE_GMAKE= yes MAKE_JOBS_SAFE= 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 +OPTIONS= CRYPTO "Support IPSEC and TCPMD5" On \ + IPV6 "Support IPV6" On \ + SMB "Support SMB printer" On \ + SMI "Allow MIBs to be loaded on the fly" On \ + USER "Drop privileges to nobody" Off \ + CHROOT "Chroot support" Off +UNPRIV_USER?= nobody +CHROOTDIR?= /var/run/tcpdump + +.include <bsd.port.options.mk> # 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. @@ -35,43 +37,35 @@ MAKE_JOBS_SAFE= yes .if defined(WITHOUT_CRYPTO) CONFIGURE_ARGS+= --without-crypto .else -USE_OPENSSL= defined +USE_OPENSSL= yes .endif -.if !defined(WITHOUT_IPV6) +.if defined(WITH_IPV6) CONFIGURE_ARGS+= --enable-ipv6 .endif +.if defined(WITHOUT_SMB) CONFIGURE_ARGS+= --disable-smb +.endif -MAN1= tcpdump.1 -PLIST_FILES= sbin/tcpdump +.if defined(WITHOUT_SMI) +CONFIGURE_ARGS+= --disable-smi +.else +LIB_DEPENDS+= smi.2:${PORTSDIR}/net-mgmt/libsmi +.endif -# -# 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" +.if defined(WITH_USER) +CONFIGURE_ARGS+= --with-user=${UNPRIV_USER} +.endif -LIBPCAP_FORCE_VER= libpcap-1.1 -LOCALPCAPFILES= include/pcap.h include/pcap-namedb.h include/pcap-bpf.h \ - include/pcap lib/libpcap.a lib/libpcap.so -WRKPCAPDIR= ${WRKDIR}/${LIBPCAP_FORCE_VER} +.if defined(WITH_CHROOT) +CONFIGURE_ARGS+= --with-chroot=${CHROOTDIR} +.endif + +.include <bsd.port.pre.mk> -pre-configure: - @${MKDIR} ${WRKPCAPDIR} -.for i in ${LOCALPCAPFILES} - @${LN} -s ${LOCALBASE}/$i ${WRKPCAPDIR} -.endfor +MAN1= tcpdump.1 +PLIST_FILES= sbin/tcpdump post-configure: @${REINPLACE_CMD} -e "s,\./\.\./${LIBPCAP_FORCE_VER}/libpcap\.a,${LOCALBASE}/lib/libpcap.so.1," ${WRKSRC}/Makefile @@ -80,4 +74,4 @@ do-install: ${INSTALL_PROGRAM} ${WRKSRC}/tcpdump ${PREFIX}/sbin ${INSTALL_MAN} ${WRKSRC}/tcpdump.1 ${MAN1PREFIX}/man/man1 -.include <bsd.port.mk> +.include <bsd.port.post.mk> diff --git a/net/tcpdump/distinfo b/net/tcpdump/distinfo index 1dd5cf5579a9..bff03c61746b 100644 --- a/net/tcpdump/distinfo +++ b/net/tcpdump/distinfo @@ -1,2 +1,2 @@ -SHA256 (tcpdump-4.1.1.tar.gz) = e6cd4bbd61ec7adbb61ba8352c4b4734f67b8caaa845d88cb826bc0b9f1e7f0a -SIZE (tcpdump-4.1.1.tar.gz) = 1587392 +SHA256 (tcpdump-4.2.1.tar.gz) = 5457e9a61e86efe62e88bc621903c2d1ab08dd688e9ac839c7bc2513ee4f9bff +SIZE (tcpdump-4.2.1.tar.gz) = 887476 |