summaryrefslogtreecommitdiff
path: root/net-analyzer/barnyard
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-02-10 15:40:27 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-02-10 15:40:27 +0000
commit6bc2e4d7c5906e46a8f275a876ead6ec41aca5bb (patch)
treecee0a97398040001220ece3cd48c3d568bcddb4a /net-analyzer/barnyard
parent1db00cc6e94b90c08090bb5b8c406622946c4ae5 (diff)
gentoo resync : 10.02.2019
Diffstat (limited to 'net-analyzer/barnyard')
-rw-r--r--net-analyzer/barnyard/Manifest1
-rw-r--r--net-analyzer/barnyard/barnyard-0.2.0-r5.ebuild92
2 files changed, 93 insertions, 0 deletions
diff --git a/net-analyzer/barnyard/Manifest b/net-analyzer/barnyard/Manifest
index 1878722624d0..d268f1fd00a7 100644
--- a/net-analyzer/barnyard/Manifest
+++ b/net-analyzer/barnyard/Manifest
@@ -4,4 +4,5 @@ AUX barnyard.rc6 620 BLAKE2B 7b59c2919d04b236e817fbe43baded639a5b918718585e07b73
DIST barnyard-0.2.0-patches.tar.bz2 12911 BLAKE2B 06215ec8cc8c2fb7ff8e57cfd2f02456180263778722001442faf8f32445fc7fa7fc0da5d00644dbf239949d5e02dd76025428c14c6c1bae8b6565ddf6edf08a SHA512 e8e5243d49b71dd76e3274e27116f99ea6c674983cb18499889c9d27a83740a6b17aa6d30c8a9acdb46103da8314679f4eba8bf1cd252d7fb6b8a34afac46b21
DIST barnyard-0.2.0.tar.gz 161543 BLAKE2B 07f5fa6b2e01e1b421ea772b8ea0c72b6c8f66569caf176a57d3f4fce438c2dd4b2a8a61dddc4faf27c85b15d002205f1cc3627fe88d523fd25d716cc78747e7 SHA512 73424acf2e0c620b2f8f2f407d74812f7740234ce523e37557273998108c131311fffb16cfc2cea0f652d6b21072431081bad35b045f5654e2245786d27568e6
EBUILD barnyard-0.2.0-r3.ebuild 2276 BLAKE2B 13709a28f6664cd2468cdc56f0a88db1799c4f94fdd94c49fd4111e58070e352ab18b4e90bc20649a9df2ce64eeaf25fcb603795ffd3f4f2268b26a561684e7b SHA512 1067a1255a39adec1c37a5a0067b527ac281b939b5577def41e0a558002b46279562d104e5c807719ce10adc91a8fc194f950548bf99c08f43670527886c6cfe
+EBUILD barnyard-0.2.0-r5.ebuild 2171 BLAKE2B 90208ec91836b57f7d597754642db285c497dcbab56c036b3083b889758559c0fe04938cadc63ae7d730f007ff504afc81407479f16c866f83ef6e5f0ea084b4 SHA512 0874cebfb8d2cce7226744e97dcf8f6c2329b2eaf58c2b71e7d65e407dc20b8b1bddd462ce20c9dcbc29acc0816be34cd9260b20725f4204a16b2cb782e8ec3a
MISC metadata.xml 541 BLAKE2B ddc79b316fd21ac343ddffc0d8d38970583f9cf99d36504a7a55379dadcd32a1e9d3033de894a5a9a26e4d3c4fb42cc69f387c7e55931f4c5c7e0c1d262b0124 SHA512 7a936ec510957c8fb449857a12ff6c54b7498657af33244fcd0759c0786adc9523fda42e6a5e46b0a36c57144f9a2dc2d4179624b1fa700fac53fe83d0d73b1a
diff --git a/net-analyzer/barnyard/barnyard-0.2.0-r5.ebuild b/net-analyzer/barnyard/barnyard-0.2.0-r5.ebuild
new file mode 100644
index 000000000000..5d369ae6705d
--- /dev/null
+++ b/net-analyzer/barnyard/barnyard-0.2.0-r5.ebuild
@@ -0,0 +1,92 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Fast output system for Snort"
+HOMEPAGE="https://sourceforge.net/projects/barnyard"
+SRC_URI="
+ mirror://sourceforge/barnyard/barnyard-${PV/_/-}.tar.gz
+ mirror://gentoo/${P}-patches.tar.bz2"
+
+SLOT="0"
+LICENSE="QPL GPL-2"
+KEYWORDS="~amd64 -sparc ~x86"
+IUSE="mysql postgres sguil"
+
+DEPEND="
+ net-libs/libpcap
+ mysql? ( dev-db/mysql-connector-c:0= )
+ postgres? ( dev-db/postgresql:*[server] )
+ sguil? ( dev-lang/tcl:0 )"
+RDEPEND="${DEPEND}
+ net-analyzer/snort"
+
+S="${WORKDIR}/${P/_/-}"
+
+DOCS="AUTHORS README docs/*"
+
+src_prepare() {
+ default
+ eapply "${FILESDIR}/barnyard.64bit.diff"
+ if use sguil ; then
+ eapply "${WORKDIR}/${PV}-sguil_files.patch"
+ eapply "${WORKDIR}/${PV}-configure-in.patch"
+ cd "${S}/src/output-plugins" || die
+ eapply "${WORKDIR}/${PV}-op_plugbase.c.patch"
+ cd "${S}" || die
+ fi
+ eautoreconf
+}
+
+src_configure() {
+ local myconf
+ if use sguil ; then
+ myconf="--enable-tcl"
+ fi
+
+ econf \
+ ${myconf} \
+ --sysconfdir=/etc/snort \
+ $(use_enable postgres) \
+ $(use_enable mysql)
+}
+
+src_install () {
+ default
+
+ keepdir /var/log/snort
+ keepdir /var/log/snort/archive
+
+ insinto /etc/snort
+ newins etc/barnyard.conf barnyard.conf
+ newconfd "${FILESDIR}"/barnyard.confd barnyard
+ newinitd "${FILESDIR}"/barnyard.rc6 barnyard
+
+ if use sguil ; then
+ sed -i -e "/config hostname:/s%snorthost%$(hostname)%" \
+ -e "/config interface/s:fxp0:eth0:" \
+ -e "s:output alert_fast:#output alert_fast:" \
+ -e "s:output log_dump:#output log_dump:" \
+ "${D}/etc/snort/barnyard.conf" || die "sed failed"
+
+ sed -i -e s:/var/log/snort:/var/lib/sguil/$(hostname): \
+ -e s:/var/run/barnyard.pid:/var/run/sguil/barnyard.pid: \
+ "${D}/etc/conf.d/barnyard" || die "sed failed"
+
+ sed -i -e "/start-stop-daemon --start/s:--exec:-c sguil --exec:" \
+ "${D}/etc/init.d/barnyard" || die "sed failed"
+ fi
+}
+
+pkg_postinst() {
+ if use sguil ; then
+ elog
+ elog "Make sure to edit /etc/snort/barnyard.conf and uncomment the"
+ elog "sguil section along with supplying the appropriate database"
+ elog "information."
+ elog
+ fi
+}