summaryrefslogtreecommitdiff
path: root/net-analyzer/barnyard2
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2012-09-11 18:20:59 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2012-09-11 18:20:59 +0300
commit2d7d250662cb735cc2c22c78f6b8cec1b3c282ce (patch)
treeaaffc96336c51b98357f3234d2f386e75fc6b0ff /net-analyzer/barnyard2
parente543b01583b453ed3df227c351d88ad31db5d6b2 (diff)
modified: media-video/ffmpeg/ffmpeg-9999.ebuild
new file: net-analyzer/barnyard2/barnyard2-9999.ebuild new file: net-analyzer/barnyard2/files/barnyard2.confd new file: net-analyzer/barnyard2/files/barnyard2.initd new file: net-analyzer/barnyard2/files/makefile.patch deleted: net-analyzer/snort/files deleted: net-analyzer/snort/snort-2.8.3.1.ebuild new file: net-analyzer/snort/snort/files/disabledynamic.patch new file: net-analyzer/snort/snort/files/snort.confd new file: net-analyzer/snort/snort/files/snort.confd.2 new file: net-analyzer/snort/snort/files/snort.rc10 new file: net-analyzer/snort/snort/files/snort.rc11 new file: net-analyzer/snort/snort/snort-2.9.3.1.ebuild new file: net-libs/daq/daq-1.1.1.ebuild
Diffstat (limited to 'net-analyzer/barnyard2')
-rw-r--r--net-analyzer/barnyard2/barnyard2-9999.ebuild73
-rw-r--r--net-analyzer/barnyard2/files/barnyard2.confd36
-rw-r--r--net-analyzer/barnyard2/files/barnyard2.initd30
-rw-r--r--net-analyzer/barnyard2/files/makefile.patch9
4 files changed, 148 insertions, 0 deletions
diff --git a/net-analyzer/barnyard2/barnyard2-9999.ebuild b/net-analyzer/barnyard2/barnyard2-9999.ebuild
new file mode 100644
index 0000000..499ab16
--- /dev/null
+++ b/net-analyzer/barnyard2/barnyard2-9999.ebuild
@@ -0,0 +1,73 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/barnyard2/barnyard2-1.9.ebuild,v 1.2 2011/04/02 12:54:23 ssuominen Exp $
+
+EAPI="2"
+
+inherit git-2 autotools eutils
+
+
+DESCRIPTION="Parser for Snort unified/unified2 files"
+HOMEPAGE="http://www.securixlive.com/barnyard2/"
+EGIT_REPO_URI="git://github.com/binf/barnyard2.git"
+EGIT_BRANCH="stable"
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="static debug gre mpls mysql odbc postgres"
+
+DEPEND="net-libs/libpcap
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql-server )
+ odbc? ( dev-db/unixODBC )"
+RDEPEND="${DEPEND}"
+
+src_prepare() {
+ sed -i -e "s:^#config interface:config interface:" \
+ "${WORKDIR}/${P}/etc/barnyard2.conf" || die
+ sed -i -e "s:^output alert_fast:#output alert_fast:" \
+ "${WORKDIR}/${P}/etc/barnyard2.conf" || die
+ epatch "${FILESDIR}/makefile.patch"
+ ./autogen.sh
+ elibtoolize
+}
+
+src_configure() {
+ econf \
+ $(use_enable !static shared) \
+ $(use_enable static) \
+ $(use_enable debug) \
+ $(use_enable gre) \
+ $(use_enable mpls) \
+ $(use_with mysql) \
+ $(use_with odbc) \
+ $(use_with postgres postgresql) \
+ --disable-ipv6 \
+ --disable-prelude \
+ --disable-mysql-ssl-support \
+ --disable-aruba \
+ --without-tcl \
+ --without-oracle || die
+
+ emake || die
+}
+
+src_install () {
+ make DESTDIR="${D}" install || die
+ newconfd "${FILESDIR}/barnyard2.confd" barnyard2 || die
+ newinitd "${FILESDIR}/barnyard2.initd" barnyard2 || die
+ dodir /etc/barnyard2 \
+ /var/log/snort \
+ /var/log/snort/archive \
+ /var/log/barnyard2 || die
+ dodoc RELEASE.NOTES \
+ etc/barnyard2.conf \
+ doc/README* \
+ schemas/create_* || die
+}
+
+pkg_postinst() {
+ elog "Configuration options can be set in /etc/conf.d/barnyard2."
+ elog
+ elog "An example configuration file can be found in /usr/share/doc/${PF}."
+}
diff --git a/net-analyzer/barnyard2/files/barnyard2.confd b/net-analyzer/barnyard2/files/barnyard2.confd
new file mode 100644
index 0000000..d114f82
--- /dev/null
+++ b/net-analyzer/barnyard2/files/barnyard2.confd
@@ -0,0 +1,36 @@
+# Config file for /etc/init.d/barnyard2
+
+# This file only contains variables needed by the init.d script.
+# All other configuration options are located in the barnyard2.conf file
+
+# This should be the first part of the unified/unified2 log file name (without the time stamp)
+# Ex. If you log files look like this 'snort.unified2.1239801645' then you would use 'snort.unified2'
+SPOOL_FILE="snort.unified2"
+
+# Location of your unified/unified2 log files
+SPOOL_DIR="/var/log/snort"
+
+# Directory to log to
+LOG_DIR="/var/log/barnyard2"
+
+# This MUST match what you set for "config interface:" in your barnyard2.conf
+# If you do not set this correctly then Barnyard2 will not stop when you do a
+# "/etc/init.d/barnyard2 stop"
+INTERFACE="eth0"
+
+# You probably don't want to change this, but in case you do
+PID_FILE="barnyard2_${INTERFACE}.pid"
+PID_PATH="/var/run"
+
+# The waldo file is located in the SPOOL_DIR to support multipule instances of barnyard2
+WALDO_FILE="${SPOOL_DIR}/barnyard2.waldo"
+CONF="/etc/barnyard2/barnyard2.conf"
+
+# Location of the archive directory if you choose to use it.
+# The ARCHIVE_DIR is located in the SPOOL_DIR to support multipule instances of barnyard2
+#ARCHIVE_DIR="${SPOOL_DIR}/archive"
+
+# This pulls in the options above
+BARNYARD_OPTS="-D -c ${CONF} -d ${SPOOL_DIR} -w ${WALDO_FILE} -f ${SPOOL_FILE} -l ${LOG_DIR}"
+# Or with an archive directory
+#BARNYARD_OPTS="-D -c ${CONF} -d ${SPOOL_DIR} -w ${WALDO_FILE} -f ${LOG_FILE} -l ${LOG_DIR} -a ${ARCHIVE_DIR}"
diff --git a/net-analyzer/barnyard2/files/barnyard2.initd b/net-analyzer/barnyard2/files/barnyard2.initd
new file mode 100644
index 0000000..4d0a338
--- /dev/null
+++ b/net-analyzer/barnyard2/files/barnyard2.initd
@@ -0,0 +1,30 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-analyzer/barnyard2/files/barnyard2.initd,v 1.1 2010/03/16 21:25:54 patrick Exp $
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if [ ! -e ${CONF} ] ; then
+ eerror "You need a configuration file to run barnyard2"
+ eerror "There is an example config in /etc/snort/barnyard2.conf.distrib"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting barnyard2"
+ start-stop-daemon --start --quiet --exec /usr/bin/barnyard2 \
+ -- --pid-path ${PID_PATH} --nolock-pidfile ${BARNYARD_OPTS} >/dev/null 2>&1
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping barnyard2"
+ start-stop-daemon --stop --quiet --pidfile ${PID_PATH}/${PID_FILE}
+ eend $?
+}
diff --git a/net-analyzer/barnyard2/files/makefile.patch b/net-analyzer/barnyard2/files/makefile.patch
new file mode 100644
index 0000000..ce04a25
--- /dev/null
+++ b/net-analyzer/barnyard2/files/makefile.patch
@@ -0,0 +1,9 @@
+diff -Naur work/barnyard2-9999/etc/Makefile.am work2/barnyard2-9999/etc/Makefile.am
+--- work/barnyard2-9999/etc/Makefile.am 2012-09-11 18:07:05.924046621 +0300
++++ work2/barnyard2-9999/etc/Makefile.am 2012-09-11 18:08:23.547382989 +0300
+@@ -4,4 +4,4 @@
+ EXTRA_DIST = barnyard2.conf
+
+ install-data-am:
+- test -e $(sysconfdir)/barnyard2.conf || install -m 600 $(top_srcdir)/etc/barnyard2.conf $(sysconfdir)
++ echo "removed"