net-analyzer/barnyard2: fix SRC_URI, HOMEPAGE, EAPI7, improve ebuild.
authorMichael Mair-Keimberger <m.mairkeimberger@gmail.com>
Fri, 17 Aug 2018 19:15:38 +0000 (21:15 +0200)
committerPatrice Clement <monsieurp@gentoo.org>
Thu, 8 Nov 2018 22:51:11 +0000 (23:51 +0100)
Closes: https://bugs.gentoo.org/663910
Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/9603
Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
net-analyzer/barnyard2/Manifest
net-analyzer/barnyard2/barnyard2-1.9-r1.ebuild [new file with mode: 0644]

index 19f506877e829bdaee87d9afade085a823596b7f..d7670b3accd9fccbc65f86d62fe87468f0239096 100644 (file)
@@ -1 +1,2 @@
+DIST barnyard2-1.9-r1.tar.gz 344672 BLAKE2B 720d55170eaf66d2fac7a73990f00dab6faf27c5fcfbcd2f3fa5bad8fa028880fc257a78b60660eaaa5cea3cd8ab04aea2ad173d2135757d7a1f93a80e049d06 SHA512 eb10e4333e862ba6d708e7956b86f9da5da8c52b2756724e821ac5f5ba064791cf84125942bf76e7c563f62c83558aff90219ccc694884e213f6571428849666
 DIST barnyard2-1.9.tar.gz 652879 BLAKE2B 958c926b26ff81c2baaf6993c1eafb10b48d1dc570b885f20f5893d64a56176f39ed5a872fb326d24b699406a0e60bbd1347df56612b5b85148505c72f6544ed SHA512 441a5751b28fd5c0aca73a78a58219a6ce58393e15bf735ae012719d1180e8e58a91d4170fe5c623bfe83de8ca0c04fb6975c8c7d5b6421ceedbf2023b44e72a
diff --git a/net-analyzer/barnyard2/barnyard2-1.9-r1.ebuild b/net-analyzer/barnyard2/barnyard2-1.9-r1.ebuild
new file mode 100644 (file)
index 0000000..8bd23af
--- /dev/null
@@ -0,0 +1,76 @@
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools
+
+DESCRIPTION="Parser for Snort unified/unified2 files"
+HOMEPAGE="https://github.com/firnsy/barnyard2 https://firnsy.com/projects"
+SRC_URI="https://github.com/firnsy/barnyard2/archive/v2-${PV}.tar.gz -> ${PF}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug gre mpls mysql odbc postgres static"
+
+DEPEND="net-libs/libpcap
+       mysql? ( virtual/mysql )
+       odbc? ( dev-db/unixODBC )
+       postgres? ( dev-db/postgresql:*[server] )"
+RDEPEND="${DEPEND}"
+
+DOCS="RELEASE.NOTES etc/barnyard2.conf doc/README* schemas/create_*"
+
+S="${WORKDIR}/${PN}-2-${PV}"
+
+src_prepare() {
+       default
+       sed -i -e "s:^#config interface:config interface:" \
+               "etc/barnyard2.conf" || die
+       sed -i -e "s:^output alert_fast:#output alert_fast:" \
+               "etc/barnyard2.conf" || die
+
+       AT_M4DIR="m4" eautoreconf
+}
+
+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
+}
+
+src_install () {
+       default
+
+       newconfd "${FILESDIR}/barnyard2.confd" barnyard2
+       newinitd "${FILESDIR}/barnyard2.initd" barnyard2
+
+       dodir /etc/barnyard2 \
+               /var/log/snort \
+               /var/log/snort/archive \
+               /var/log/barnyard2
+
+       keepdir /var/log/barnyard2
+       keepdir /var/log/snort/archive
+
+       rm "${D}"/etc/barnyard2.conf || 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}."
+}