1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 DESCRIPTION="Parser for Snort unified/unified2 files"
9 HOMEPAGE="https://github.com/firnsy/barnyard2 https://firnsy.com/projects"
10 SRC_URI="https://github.com/firnsy/barnyard2/archive/v2-${PV}.tar.gz -> ${P}-github.tar.gz"
14 KEYWORDS="~amd64 ~x86"
15 IUSE="debug gre mpls mysql odbc postgres static"
17 DEPEND="net-libs/libpcap
18 mysql? ( dev-db/mysql-connector-c:0= )
19 odbc? ( dev-db/unixODBC )
20 postgres? ( dev-db/postgresql:*[server] )"
23 DOCS="RELEASE.NOTES etc/barnyard2.conf doc/README* schemas/create_*"
25 S="${WORKDIR}/${PN}-2-${PV}"
29 sed -i -e "s:^#config interface:config interface:" \
30 "etc/barnyard2.conf" || die
31 sed -i -e "s:^output alert_fast:#output alert_fast:" \
32 "etc/barnyard2.conf" || die
34 AT_M4DIR="m4" eautoreconf
39 $(use_enable !static shared) \
40 $(use_enable static) \
46 $(use_with postgres postgresql) \
49 --disable-mysql-ssl-support \
58 newconfd "${FILESDIR}/barnyard2.confd" barnyard2
59 newinitd "${FILESDIR}/barnyard2.initd" barnyard2
62 keepdir /var/log/barnyard2
63 keepdir /var/log/snort/archive
65 rm "${D}"/etc/barnyard2.conf || die
69 elog "Configuration options can be set in /etc/conf.d/barnyard2."
71 elog "An example configuration file can be found in /usr/share/doc/${PF}."