diff options
author | Matthew Brewer <tomboy64@sina.cn> | 2016-03-11 15:14:18 +0100 |
---|---|---|
committer | Ian Delaney <idella4@gentoo.org> | 2016-03-19 19:19:20 +0800 |
commit | b802dd69107a7765fd6094f18a65060e12746eee (patch) | |
tree | 3f50eae8754d613282d94333e8d50a6bb0b14477 /net-analyzer | |
parent | net-analyzer/ipsumdump: initial ebuild, version 1.85 (diff) | |
download | gentoo-b802dd69107a7765fd6094f18a65060e12746eee.tar.gz gentoo-b802dd69107a7765fd6094f18a65060e12746eee.tar.bz2 gentoo-b802dd69107a7765fd6094f18a65060e12746eee.zip |
net-analyzer/bro: initial ebuild, version 2.4.1
Bro is a highly configurable network analysis framework and IDS.
Package-Manager: portage-2.2.27
RepoMan-Options: --ignore-arches
Closes: https://github.com/gentoo/gentoo/pull/1069
Diffstat (limited to 'net-analyzer')
-rw-r--r-- | net-analyzer/bro/Manifest | 1 | ||||
-rw-r--r-- | net-analyzer/bro/bro-2.4.1.ebuild | 78 | ||||
-rw-r--r-- | net-analyzer/bro/files/bro-2.4.1-fix-python-install-dir.patch | 37 | ||||
-rw-r--r-- | net-analyzer/bro/files/bro-2.4.1-remove-unnecessary-remove.patch | 20 | ||||
-rw-r--r-- | net-analyzer/bro/metadata.xml | 29 |
5 files changed, 165 insertions, 0 deletions
diff --git a/net-analyzer/bro/Manifest b/net-analyzer/bro/Manifest new file mode 100644 index 000000000000..f260885d7079 --- /dev/null +++ b/net-analyzer/bro/Manifest @@ -0,0 +1 @@ +DIST bro-2.4.1.tar.gz 15010455 SHA256 d8b99673a5024630f6bae820c4f8c3ca9029f1167f9e5729c914c66e1fc7c8f6 SHA512 4f7bf6c037fe7b16214830d2dba9f7abffd853f66030aa710fb9f174a475f8cd27d8de6bacf965f142f942a42093ceb78dcd8cbcedac6fbcfdd65ac07b3dd410 WHIRLPOOL 545450119846f28dcca38429d1ba8c21f3da9c3f4d5fac6e4797143a401b789f7b171980fec046d4333c820858e74d0a89ea3e614c9f2ceb4c3690b5582f1be7 diff --git a/net-analyzer/bro/bro-2.4.1.ebuild b/net-analyzer/bro/bro-2.4.1.ebuild new file mode 100644 index 000000000000..538988008e86 --- /dev/null +++ b/net-analyzer/bro/bro-2.4.1.ebuild @@ -0,0 +1,78 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 ) +inherit cmake-utils python-single-r1 + +DESCRIPTION="The Bro Network Security Monitor" +HOMEPAGE="https://www.bro.org" +SRC_URI="https://www.bro.org/downloads/release/${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+broccoli +broctl broker curl debug geoip ipv6 jemalloc mta +python -ruby tcmalloc static-libs +tools" + +RDEPEND="app-shells/bash:0 + dev-libs/openssl:0 + net-analyzer/ipsumdump + ipv6? ( net-analyzer/ipsumdump[ipv6] ) + net-dns/bind-tools + net-libs/libpcap + sys-libs/zlib + broker? ( =dev-libs/actor-framework-0.13.2* ) + curl? ( net-misc/curl ) + geoip? ( dev-libs/geoip ) + jemalloc? ( dev-libs/jemalloc ) + mta? ( virtual/mta ) + python? ( ${PYTHON_DEPS} ) + ruby? ( >=dev-lang/ruby-1.8:= ) + tcmalloc? ( dev-util/google-perftools )" +DEPEND="${RDEPEND} + >=dev-lang/swig-3.0.3 + dev-lang/perl" + +REQUIRED_USE="broker? ( python ) + broctl? ( python ) + python? ( ${PYTHON_REQUIRED_USE} )" + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + +src_prepare() { + eapply "${FILESDIR}/bro-2.4.1-remove-unnecessary-remove.patch" + eapply "${FILESDIR}/bro-2.4.1-fix-python-install-dir.patch" + eapply_user +} + +src_configure() { + local mycmakeargs=( + -DENABLE_DEBUG=$(usex debug true false) + -DENABLE_JEMALLOC=$(usex jemalloc true false) + -DDISABLE_PERFTOOLS=$(usex tcmalloc false true) + -DENABLE_BROKER=$(usex broker true false) + -DENABLE_CXX11=$(usex broker true false) + -DBROKER_PYTHON_PREFIX="/usr" + -DLIBCAF_INCLUDE_DIR_CORE="/usr/include/" + -DLIBCAF_INCLUDE_DIR_IO="/usr/include/" + -DLIBCAF_ROOT_DIR="/usr" + -DENABLE_STATIC=$(usex static-libs true false) + -DINSTALL_BROCCOLI=$(usex broccoli true false) + -DINSTALL_BROCTL=$(usex broctl true false) + -DINSTALL_AUX_TOOLS=$(usex tools true false) + -DENABLE_MOBILE_IPV6=$(usex ipv6 true false) + -DDISABLE_RUBY_BINDINGS=$(usex ruby false true) + -DDISABLE_PYTHON_BINDINGS=$(usex python false true) + -DBRO_LOG_DIR="/var/log/bro/" + -DBRO_SPOOL_DIR="/var/spool/bro/" + -DBRO_ETC_INSTALL_DIR="/etc/bro/" + -DINSTALL_LIB_DIR="/usr/$(get_libdir)" + -DPY_MOD_INSTALL_DIR="$(python_get_sitedir)" + ) + + cmake-utils_src_configure +} diff --git a/net-analyzer/bro/files/bro-2.4.1-fix-python-install-dir.patch b/net-analyzer/bro/files/bro-2.4.1-fix-python-install-dir.patch new file mode 100644 index 000000000000..66d41ed4f47e --- /dev/null +++ b/net-analyzer/bro/files/bro-2.4.1-fix-python-install-dir.patch @@ -0,0 +1,37 @@ +--- a/aux/broker/bindings/python/CMakeLists.txt 2016-03-17 23:26:42.707456012 +0100 ++++ b/aux/broker/bindings/python/CMakeLists.txt 2016-03-17 23:28:27.714453166 +0100 +@@ -52,19 +52,21 @@ + swig_add_module(pybroker python pybroker.i) + swig_link_libraries(pybroker ${libbroker} ${PYTHON_LIBRARIES}) + +-if ( BROKER_PYTHON_PREFIX ) +- set(pyver ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) +- set(PY_MOD_INSTALL_DIR +- ${BROKER_PYTHON_PREFIX}/lib/python${pyver}/site-packages) +-elseif ( BROKER_PYTHON_HOME ) +- set(PY_MOD_INSTALL_DIR ${BROKER_PYTHON_HOME}/lib/python) +-else () +- execute_process(COMMAND ${PYTHON_EXECUTABLE} -c +- "from distutils.sysconfig import get_python_lib; print get_python_lib()" +- OUTPUT_VARIABLE PYTHON_SITE_PACKAGES +- OUTPUT_STRIP_TRAILING_WHITESPACE) +- set(PY_MOD_INSTALL_DIR ${PYTHON_SITE_PACKAGES}) +-endif () ++if ( NOT PY_MOD_INSTALL_DIR ) ++ if ( BROKER_PYTHON_PREFIX ) ++ set(pyver ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}) ++ set(PY_MOD_INSTALL_DIR ++ ${BROKER_PYTHON_PREFIX}/lib/python${pyver}/site-packages) ++ elseif ( BROKER_PYTHON_HOME ) ++ set(PY_MOD_INSTALL_DIR ${BROKER_PYTHON_HOME}/lib/python) ++ else () ++ execute_process(COMMAND ${PYTHON_EXECUTABLE} -c ++ "from distutils.sysconfig import get_python_lib; print get_python_lib()" ++ OUTPUT_VARIABLE PYTHON_SITE_PACKAGES ++ OUTPUT_STRIP_TRAILING_WHITESPACE) ++ set(PY_MOD_INSTALL_DIR ${PYTHON_SITE_PACKAGES}) ++ endif ( BROKER_PYTHON_PREFIX ) ++endif ( NOT PY_MOD_INSTALL_DIR ) + + message(STATUS "Python bindings will be built and installed to: " + ${PY_MOD_INSTALL_DIR}) diff --git a/net-analyzer/bro/files/bro-2.4.1-remove-unnecessary-remove.patch b/net-analyzer/bro/files/bro-2.4.1-remove-unnecessary-remove.patch new file mode 100644 index 000000000000..e4803bc7db91 --- /dev/null +++ b/net-analyzer/bro/files/bro-2.4.1-remove-unnecessary-remove.patch @@ -0,0 +1,20 @@ +--- a/src/CMakeLists.txt.old 2016-03-11 20:47:44.652900344 +0100 ++++ b/src/CMakeLists.txt 2016-03-11 20:48:11.665101378 +0100 +@@ -425,10 +425,10 @@ + + # Remove some stale files and scripts that previous Bro versions put in + # place, yet make confuse us now. This makes upgrading easier. +-install(CODE " +- file(REMOVE_RECURSE +- ${BRO_SCRIPT_INSTALL_PATH}/base/frameworks/logging/writers/dataseries.bro +- ${BRO_SCRIPT_INSTALL_PATH}/base/frameworks/logging/writers/elasticsearch.bro +- ${BRO_SCRIPT_INSTALL_PATH}/policy/tuning/logs-to-elasticsearch.bro +- ) +-") ++#install(CODE " ++# file(REMOVE_RECURSE ++# ${BRO_SCRIPT_INSTALL_PATH}/base/frameworks/logging/writers/dataseries.bro ++# ${BRO_SCRIPT_INSTALL_PATH}/base/frameworks/logging/writers/elasticsearch.bro ++# ${BRO_SCRIPT_INSTALL_PATH}/policy/tuning/logs-to-elasticsearch.bro ++# ) ++#") diff --git a/net-analyzer/bro/metadata.xml b/net-analyzer/bro/metadata.xml new file mode 100644 index 000000000000..5a0fdfd0e982 --- /dev/null +++ b/net-analyzer/bro/metadata.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>tomboy64@sina.cn</email> + <name>M.B.</name> + <description>Maintainer, assign bugs to him</description> + </maintainer> + <maintainer type="project"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> + <use> + <flag name="broccoli">Enable the Bro Client Communication Library</flag> + <flag name="broctl">An interactive shell for managing Bro installations</flag> + <flag name="broker">Bro's (new) Messaging Library</flag> + <flag name="geoip">Enable support for Maxmind's GeoIP library</flag> + <flag name="ipv6">Support for mobile IPv6</flag> + <flag name="jemalloc">Support for the Jemalloc allocator</flag> + <flag name="mta">Enable Bro to send e-mails</flag> + <flag name="python">Enable Python bindings</flag> + <flag name="ruby">Enable Ruby bindings (deprecated)</flag> + <flag name="tcmalloc">Enable Google's Performance Analysis Tools</flag> + <flag name="tools">Small auxiliary tools for Bro</flag> + </use> + <longdescription lang="en"> + Bro is a powerful network analysis framework that is much different from the typical IDS you may know. + </longdescription> +</pkgmetadata> |