diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-analyzer/barnyard/barnyard-0.2.0-r3.ebuild | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-analyzer/barnyard/barnyard-0.2.0-r3.ebuild')
-rw-r--r-- | net-analyzer/barnyard/barnyard-0.2.0-r3.ebuild | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/net-analyzer/barnyard/barnyard-0.2.0-r3.ebuild b/net-analyzer/barnyard/barnyard-0.2.0-r3.ebuild new file mode 100644 index 000000000000..922d8fe65e74 --- /dev/null +++ b/net-analyzer/barnyard/barnyard-0.2.0-r3.ebuild @@ -0,0 +1,100 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=2 + +inherit eutils autotools + +DESCRIPTION="Fast output system for Snort" +HOMEPAGE="http://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 + postgres? ( dev-db/postgresql[server] ) + mysql? ( virtual/mysql ) + sguil? ( dev-lang/tcl:0 )" +RDEPEND="${DEPEND} + net-analyzer/snort" + +S="${WORKDIR}/${P/_/-}" + +src_prepare() { + epatch "${FILESDIR}/barnyard.64bit.diff" + if use sguil ; then + epatch "${WORKDIR}/${PV}-sguil_files.patch" + epatch "${WORKDIR}/${PV}-configure-in.patch" + cd "${S}/src/output-plugins" + epatch "${WORKDIR}/${PV}-op_plugbase.c.patch" + cd "${S}" + 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_compile() { + emake || die "compile problem" +} + +src_install () { + + make DESTDIR="${D}" install || die + + dodoc docs/* + dodoc AUTHORS README + + keepdir /var/log/snort + keepdir /var/log/snort/archive + + insinto /etc/snort + newins etc/barnyard.conf barnyard.conf + 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" + fi + + newconfd "${FILESDIR}"/barnyard.confd barnyard + if use sguil ; then + 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" + fi + + newinitd "${FILESDIR}"/barnyard.rc6 barnyard + if use sguil ; then + 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 +} |