# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
description BRO is a Network Intrusion Detection System
long_description Bro is an open-source, Unix-based Network Intrusion \
Detection System (NIDS) that passively monitors network \
traffic and looks for suspicious activity.
homepage https://www.bro.org/
master_sites ${homepage}downloads/ \
${homepage}downloads/release/ \
${homepage}downloads/archive/
checksums rmd160 9110f1a42613af851e5d802a83d5c83fbc1ebd09 \
sha256 80daea433fa654f2602cf67b19b9121ff6ad57761bad73cc29020c4f490c5f1f \
depends_build path:bin/cmake:cmake \
# use the system-provided flex
path:lib/libssl.dylib:openssl \
configure.cflags-append "${configure.cflags} [get_canonical_archflags cc]"
configure.args --enable-mobile-ipv6 --conf-files-dir=${prefix}/etc/bro --spooldir=${prefix}/var/spool/bro --logdir=${prefix}/var/log/bro
reinplace "s|\${BroBase}/spool|\${BroBase}/var/spool/bro|" ${worksrcpath}/aux/broctl/BroControl/options.py
reinplace "s|\${BroBase}/logs|\${BroBase}/var/log/bro|" ${worksrcpath}/aux/broctl/BroControl/options.py
reinplace "s|{BroBase}/logs|{BroBase}/var/log/bro|" ${worksrcpath}/aux/broctl/doc/broctl.rst
reinplace "s|{BroBase}/spool|{BroBase}/var/spool/bro|" ${worksrcpath}/aux/broctl/doc/broctl.rst
xinstall -d ${destroot}${prefix}/share/examples/${name}
move ${destroot}${prefix}/etc/bro/broccoli.conf ${destroot}${prefix}/share/examples/${name}/
move ${destroot}${prefix}/etc/bro/node.cfg ${destroot}${prefix}/share/examples/${name}/
move ${destroot}${prefix}/etc/bro/networks.cfg ${destroot}${prefix}/share/examples/${name}/
move ${destroot}${prefix}/etc/bro/broctl.cfg ${destroot}${prefix}/share/examples/${name}/
reinplace "s|/usr/bin/python|${prefix}/bin/python2.7|" ${destroot}${prefix}/bin/broctl
reinplace "s|/usr/bin/python|${prefix}/bin/python2.7|" ${destroot}${prefix}/bin/trace-summary
xinstall -d ${destroot}${prefix}/Library/LaunchDaemons/
copy ${filespath}/org.macports.bro.plist ${destroot}${prefix}/Library/LaunchDaemons/
reinplace "s|%%PREFIX%%|${prefix}|g" ${destroot}${prefix}/Library/LaunchDaemons/org.macports.bro.plist
xinstall -d ${destroot}${prefix}/etc/${name}
xinstall -d ${destroot}${prefix}/var/log/${name}
xinstall -d ${destroot}${prefix}/var/spool/${name}
destroot.keepdirs ${destroot}${prefix}/etc/${name} \
${destroot}${prefix}/var/log/${name} \
${destroot}${prefix}/var/spool/${name}
if {![file exists ${prefix}/etc/bro/broccoli.conf]} {
copy ${prefix}/share/examples/${name}/broccoli.conf ${prefix}/etc/bro/broccoli.conf
if {![file exists ${prefix}/etc/bro/node.cfg]} {
copy ${prefix}/share/examples/${name}/node.cfg ${prefix}/etc/bro/node.cfg
if {![file exists ${prefix}/etc/bro/networks.cfg]} {
copy ${prefix}/share/examples/${name}/networks.cfg ${prefix}/etc/bro/networks.cfg
if {![file exists ${prefix}/etc/bro/broctl.cfg]} {
copy ${prefix}/share/examples/${name}/broctl.cfg ${prefix}/etc/bro/broctl.cfg