1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-26 05:02:18 +00:00
freebsd-ports/net/ngrep/Makefile
2013-10-08 06:20:34 +00:00

68 lines
1.5 KiB
Makefile

# Created by: David O'Brien (obrien@NUXI.com)
# $FreeBSD$
PORTNAME= ngrep
PORTVERSION= 1.45
PORTREVISION= 1
CATEGORIES= net security
MASTER_SITES= SF
MAINTAINER= edwin@mavetju.org
COMMENT= Network grep
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_BZIP2= yes
USES= gmake
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --disable-pcap-restart
MAKE_JOBS_UNSAFE= yes
OPTIONS_DEFINE= PCRE PORTS_PCAP IPV6 DOCS
OPTIONS_DEFAULT= PCRE IPV6
PCRE_DESC= Use PCRE instead of GNU regex
PORTS_PCAP_DESC= Use ports PCAP instead of system PCAP
MAN8= ngrep.8
PLIST_FILES= bin/ngrep
PORTDOCS= CHANGES.txt CREDITS.txt INSTALL.txt LICENSE.txt \
README.txt REGEX.txt
NO_STAGE= yes
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MPCRE}
CONFIGURE_ARGS+= --enable-pcre
.endif
.if ${PORT_OPTIONS:MPORTS_PCAP}
CONFIGURE_ARGS+= --with-pcap-includes=${LOCALBASE}/include
BUILD_DEPENDS+= ${LOCALBASE}/lib/libpcap.a:${PORTSDIR}/net/libpcap
.else
CONFIGURE_ARGS+= --with-pcap-includes=/usr/include
.endif
.if ${PORT_OPTIONS:MIPV6}
CONFIGURE_ARGS+= --enable-ipv6
.endif
post-patch:
.if ${PORT_OPTIONS:MPORTS_PCAP}
@${REINPLACE_CMD} -e "s|-lpcap|${LOCALBASE}/lib/libpcap.a|g" \
${WRKSRC}/Makefile.in ${WRKSRC}/configure
.endif
post-install:
.if ${PORT_OPTIONS:MDOCS}
@${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.mk>