747b5dd95d
v1.45 o fixed bug where setting the snaplen smaller than the minimum necessary to read the full headres would cause garbage to be fed into the pattern matcher o fixed unreported bug in IPv6/TCP packet length calculation o relocated the privilege-dropping routine to be invoked right before entering the packet processing loop, to prevent interference with necessary permissions to read or write dumpfiles/etc. o fixed integer overflow with the snaplen that resulted from an implicit signed/unsigned conversion o minor change to compensate for some broken compiler optimizers o fixed double-free race condition during ngrep termination o reworked packet length calculation in the main processing loop, improving performance and readability o simplified regex build logic in configure and Makefile o updated Win32 version to use config.h for preprocessor definitions instead of the Visual Studio project files, making manual tweaking and config of ngrep for Win32 consistent with *NIX and more obvious o changed third-party Makefiles to properly clean up after themselves o added support for radiotap (IEEE802_11_RADIO) o changed ``-s 0'' invocation to mimic the equivalent of tcpdump
71 lines
1.6 KiB
Makefile
71 lines
1.6 KiB
Makefile
# ex:ts=8
|
|
# Ports collection makefile for: ngrep
|
|
# Date created: Sat Jan 01, 2000
|
|
# Whom: David O'Brien (obrien@NUXI.com)
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= ngrep
|
|
PORTVERSION= 1.45
|
|
CATEGORIES= net security
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}
|
|
DISTNAME= ${PORTNAME}-${PORTVERSION}
|
|
|
|
MAINTAINER= edwin@mavetju.org
|
|
COMMENT= Network grep
|
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
|
USE_BZIP2= yes
|
|
ALL_TARGET= ngrep
|
|
GNU_CONFIGURE= yes
|
|
CONFIGURE_ARGS= --mandir=${PREFIX}/man/ --disable-pcap-restart
|
|
|
|
OPTIONS= PCRE "Use PCRE instead of GNU regex" on \
|
|
PORTS_PCAP "Use ports PCAP instead of system PCAP" off \
|
|
IPV6 "Enable IPv6 support" on
|
|
|
|
MAN8= ngrep.8
|
|
PLIST_FILES= bin/ngrep
|
|
|
|
PORTDOCS= CHANGES.txt CREDITS.txt INSTALL.txt LICENSE.txt \
|
|
README.txt REGEX.txt
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if defined(WITH_PCRE)
|
|
CONFIGURE_ARGS+= --enable-pcre
|
|
.endif
|
|
|
|
.if !defined(WITH_PORTS_PCAP)
|
|
CONFIGURE_ARGS+= --with-pcap-includes=/usr/include
|
|
.else
|
|
CONFIGURE_ARGS+= --with-pcap-includes=${LOCALBASE}/include
|
|
BUILD_DEPENDS+= ${LOCALBASE}/lib/libpcap.a:${PORTSDIR}/net/libpcap
|
|
.endif
|
|
|
|
.if !defined(WITHOUT_IPV6)
|
|
CONFIGURE_ARGS+= --enable-ipv6
|
|
.endif
|
|
|
|
post-patch:
|
|
.if defined(WITH_PORTS_PCAP)
|
|
@${REINPLACE_CMD} -e "s|-lpcap|${LOCALBASE}/lib/libpcap.a|g" \
|
|
${WRKSRC}/Makefile.in ${WRKSRC}/configure
|
|
.endif
|
|
|
|
post-install:
|
|
.if !defined(NOPORTDOCS)
|
|
@${MKDIR} ${DOCSDIR}
|
|
.for file in ${PORTDOCS}
|
|
@if [ -f ${WRKSRC}/${file} ]; then \
|
|
${INSTALL_DATA} ${WRKSRC}/${file} ${DOCSDIR}; \
|
|
else \
|
|
${INSTALL_DATA} ${WRKSRC}/doc/${file} ${DOCSDIR}; \
|
|
fi
|
|
.endfor
|
|
.endif
|
|
|
|
.include <bsd.port.post.mk>
|