2012-10-16 06:41:41 +00:00
|
|
|
# Created by: David O'Brien <obrien@FreeBSD.org>
|
1999-08-31 01:53:22 +00:00
|
|
|
# $FreeBSD$
|
1998-03-02 10:35:04 +00:00
|
|
|
|
2000-04-09 18:34:06 +00:00
|
|
|
PORTNAME= bro
|
2012-12-03 05:20:38 +00:00
|
|
|
PORTVERSION= 2.1
|
2013-10-19 13:24:59 +00:00
|
|
|
PORTREVISION= 3
|
2000-06-02 03:18:54 +00:00
|
|
|
CATEGORIES= security
|
2012-12-03 05:20:38 +00:00
|
|
|
MASTER_SITES= http://www.bro-ids.org/downloads/release/
|
1998-03-02 10:35:04 +00:00
|
|
|
|
2013-01-10 02:29:44 +00:00
|
|
|
MAINTAINER= leres@ee.lbl.gov
|
2012-10-16 06:41:41 +00:00
|
|
|
COMMENT= System for detecting network intruders in real-time
|
1998-03-16 10:27:31 +00:00
|
|
|
|
2012-09-18 07:50:34 +00:00
|
|
|
BUILD_DEPENDS= bison:${PORTSDIR}/devel/bison \
|
|
|
|
swig:${PORTSDIR}/devel/swig13
|
2012-09-12 08:09:18 +00:00
|
|
|
LIB_DEPENDS= GeoIP:${PORTSDIR}/net/GeoIP
|
2012-02-11 22:27:42 +00:00
|
|
|
|
2013-10-16 22:56:27 +00:00
|
|
|
USES= cmake:outsource perl5
|
|
|
|
USE_PYTHON= yes
|
|
|
|
|
|
|
|
SUB_FILES= pkg-message
|
|
|
|
NO_MTREE= yes
|
|
|
|
|
|
|
|
.if defined(BRO_PREFIX)
|
|
|
|
PREFIX=${BRO_PREFIX}
|
|
|
|
PLIST_SUB+= CLEANUP_PREFIX=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= CLEANUP_PREFIX="@comment "
|
|
|
|
.endif
|
|
|
|
CMAKE_ARGS+= -D CMAKE_INSTALL_PREFIX:PATH=${PREFIX} \
|
|
|
|
-D BRO_ROOT_DIR:PATH=${PREFIX} \
|
|
|
|
-D PY_MOD_INSTALL_DIR:PATH=${PREFIX}/lib/broctl \
|
|
|
|
-D BRO_SCRIPT_INSTALL_PATH:PATH=${PREFIX}/share/bro \
|
|
|
|
-D BRO_ETC_INSTALL_DIR:PATH=${PREFIX}/etc \
|
|
|
|
-D ENABLE_PERFTOOLS:BOOL=false \
|
|
|
|
-D ENABLE_PERFTOOLS_DEBUG:BOOL=false \
|
|
|
|
-D BinPAC_SKIP_INSTALL:BOOL=true \
|
|
|
|
-D INSTALL_AUX_TOOLS:BOOL=true \
|
|
|
|
-D BUILD_SHARED_LIBS:BOOL=true
|
|
|
|
|
|
|
|
OPTIONS_DEFINE= BROCCOLI BROCTL DEBUG IPSUMDUMP LBL_CF LBL_HF PERFTOOLS
|
|
|
|
OPTIONS_DEFAULT=BROCCOLI BROCTL IPSUMDUMP LBL_CF LBL_HF
|
2008-05-14 19:53:00 +00:00
|
|
|
|
2012-12-03 05:20:38 +00:00
|
|
|
BROCCOLI_DESC= Build support for libbroccoli communications
|
2013-10-16 22:56:27 +00:00
|
|
|
BROCTL_DESC= Build BroControl support (requires BROCCOLI)
|
|
|
|
DEBUG_DESC= Compile in debugging mode
|
|
|
|
IPSUMDUMP_DESC= Enables traffic summaries
|
|
|
|
LBL_CF_DESC= Unix time to formated time/date filter support
|
|
|
|
LBL_HF_DESC= Address to hostname filter support
|
|
|
|
PERFTOOLS_DESC= Use Perftools to improve memory & CPU usage
|
|
|
|
|
2012-09-12 08:09:18 +00:00
|
|
|
OPTIONS_EXCLUDE=NLS DOCS
|
|
|
|
|
2013-09-20 22:55:24 +00:00
|
|
|
NO_STAGE= yes
|
2012-09-12 08:09:18 +00:00
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2012-12-03 05:20:38 +00:00
|
|
|
.if ${PORT_OPTIONS:MBROCCOLI}
|
2013-10-16 22:56:27 +00:00
|
|
|
LIB_DEPENDS+= broccoli:${PORTSDIR}/security/broccoli
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MBROCTL}
|
|
|
|
.if empty(PORT_OPTIONS:MBROCCOLI)
|
|
|
|
IGNORE= the BROCTL option requires BROCCOLI
|
|
|
|
.endif
|
|
|
|
.if empty(PORT_OPTIONS:MIPSUMDUMP)
|
|
|
|
IGNORE= the BROCTL option requires IPSUMDUMP
|
|
|
|
.endif
|
|
|
|
BUILD_DEPENDS+= bash:${PORTSDIR}/shells/bash
|
|
|
|
RUN_DEPENDS+= bash:${PORTSDIR}/shells/bash
|
|
|
|
PLIST_SUB+= BROCTL=""
|
|
|
|
USE_LDCONFIG= yes
|
|
|
|
CMAKE_ARGS+= -D INSTALL_BROCTL:BOOL=true
|
2012-12-03 05:20:38 +00:00
|
|
|
.else
|
2013-10-16 22:56:27 +00:00
|
|
|
CMAKE_ARGS+= -D INSTALL_BROCTL:BOOL=false
|
|
|
|
PLIST_SUB+= BROCTL="@comment "
|
2012-12-03 05:20:38 +00:00
|
|
|
.endif
|
|
|
|
|
2013-10-16 22:56:27 +00:00
|
|
|
.if ${PORT_OPTIONS:MDEBUG}
|
|
|
|
CMAKE_ARGS+= -D ENABLE_DEBUG:BOOL=true
|
|
|
|
.else
|
|
|
|
CMAKE_ARGS+= -D ENABLE_DEBUG:BOOL=false
|
2012-09-12 08:09:18 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MLBL_HF}
|
|
|
|
RUN_DEPENDS+= hf:${PORTSDIR}/sysutils/lbl-hf
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MLBL_CF}
|
|
|
|
RUN_DEPENDS+= cf:${PORTSDIR}/sysutils/lbl-cf
|
|
|
|
.endif
|
|
|
|
|
2013-10-16 22:56:27 +00:00
|
|
|
.if ${PORT_OPTIONS:MPERFTOOLS}
|
|
|
|
CMAKE_ARGS+= -D ENABLE_PERFTOOLS:BOOL=true
|
|
|
|
RUN_DEPENDS+= pprof:${PORTSDIR}/devel/google-perftools
|
|
|
|
.else
|
|
|
|
CMAKE_ARGS+= -D ENABLE_PERFTOOLS:BOOL=false
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MIPSUMDUMP}
|
|
|
|
BUILD_DEPENDS+= ipsumdump:${PORTSDIR}/net/ipsumdump
|
|
|
|
RUN_DEPENDS+= ipsumdump:${PORTSDIR}/net/ipsumdump
|
2012-09-12 08:09:18 +00:00
|
|
|
.endif
|
1998-03-02 10:35:04 +00:00
|
|
|
|
2013-10-16 22:56:27 +00:00
|
|
|
post-install:
|
|
|
|
.if ${PORT_OPTIONS:MBROCTL}
|
|
|
|
@${MKDIR} ${PREFIX}/logs
|
|
|
|
.for i in broctl.cfg networks.cfg node.cfg
|
|
|
|
@${MKDIR} ${PREFIX}/etc
|
|
|
|
@if [ ! -f ${PREFIX}/etc/${i} ]; then \
|
|
|
|
${CP} ${PREFIX}/etc/${i}.sample ${PREFIX}/etc/${i}; \
|
|
|
|
fi
|
|
|
|
.endfor
|
|
|
|
@${PREFIX}/bin/broctl install
|
|
|
|
.endif
|
|
|
|
@${CAT} ${PKGMESSAGE}
|
2012-11-08 09:49:04 +00:00
|
|
|
|
2012-02-11 22:27:42 +00:00
|
|
|
.include <bsd.port.mk>
|