View | Details | Raw Unified
Collapse All | Expand All

(-) barnyard-0.2.0-r2.ebuild (-12 / +12 lines)
 Lines 2-8    Link Here 
# Distributed under the terms of the GNU General Public License v2
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/barnyard/barnyard-0.2.0-r2.ebuild,v 1.5 2007/05/01 17:40:17 genone Exp $
# $Header: /var/cvsroot/gentoo-x86/net-analyzer/barnyard/barnyard-0.2.0-r2.ebuild,v 1.5 2007/05/01 17:40:17 genone Exp $
inherit eutils
WANT_AUTOMAKE="1.4"
inherit eutils autotools
DESCRIPTION="Fast output system for Snort"
DESCRIPTION="Fast output system for Snort"
HOMEPAGE="http://www.snort.org/dl/barnyard/"
HOMEPAGE="http://www.snort.org/dl/barnyard/"
 Lines 14-23    Link Here 
KEYWORDS="~x86 -sparc"
KEYWORDS="~x86 -sparc"
IUSE="mysql postgres sguil"
IUSE="mysql postgres sguil"
DEPEND="virtual/libc
DEPEND="net-libs/libpcap
	net-libs/libpcap
	postgres? ( >=dev-db/postgresql-7.2 )
	postgres? ( >=dev-db/postgresql-7.2 )
	mysql? ( virtual/mysql )"
	mysql? ( virtual/mysql )
	sguil? ( dev-lang/tcl )"
RDEPEND="${DEPEND}
RDEPEND="${DEPEND}
	net-analyzer/snort"
	net-analyzer/snort"
 Lines 25-31    Link Here 
S="${WORKDIR}/${P/_/-}"
S="${WORKDIR}/${P/_/-}"
src_unpack() {
src_unpack() {
	unpack ${A} && cd "${S}"
	unpack ${A}
	cd "${S}"
	if use sguil ; then
	if use sguil ; then
		epatch "${WORKDIR}/${PV}-sguil_files.patch"
		epatch "${WORKDIR}/${PV}-sguil_files.patch"
 Lines 33-41    Link Here 
		cd "${S}/src/output-plugins"
		cd "${S}/src/output-plugins"
		epatch "${WORKDIR}/${PV}-op_plugbase.c.patch"
		epatch "${WORKDIR}/${PV}-op_plugbase.c.patch"
		cd "${S}"
		cd "${S}"
		ebegin "Recreating configure"
		eautoreconf
		aclocal && autoheader && automake --add-missing --copy \
		&& autoconf || die "recreate configure failed"
	fi
	fi
}
}
 Lines 49-61    Link Here 
		${myconf} \
		${myconf} \
		--sysconfdir=/etc/snort \
		--sysconfdir=/etc/snort \
		$(use_enable postgres) \
		$(use_enable postgres) \
		$(use_enable mysql)|| die "bad ./configure"
		$(use_enable mysql)
	emake || die "compile problem"
	emake || die "compile problem"
}
}
src_install () {
src_install () {
	make DESTDIR=${D} install || die
	make DESTDIR="${D}" install || die
	dodoc docs/*
	dodoc docs/*
	dodoc AUTHORS README
	dodoc AUTHORS README
 Lines 73-86    Link Here 
			"${D}/etc/snort/barnyard.conf" || die "sed failed"
			"${D}/etc/snort/barnyard.conf" || die "sed failed"
	fi
	fi
	newconfd ${FILESDIR}/barnyard.confd barnyard
	newconfd "${FILESDIR}"/barnyard.confd barnyard
	if use sguil ; then
	if use sguil ; then
		sed -i -e s:/var/log/snort:/var/lib/sguil/$(hostname): \
		sed -i -e s:/var/log/snort:/var/lib/sguil/$(hostname): \
		-e s:/var/run/barnyard.pid:/var/run/sguil/barnyard.pid: \
		-e s:/var/run/barnyard.pid:/var/run/sguil/barnyard.pid: \
			"${D}/etc/conf.d/barnyard" || die "sed failed"
			"${D}/etc/conf.d/barnyard" || die "sed failed"
	fi
	fi
	newinitd ${FILESDIR}/barnyard.rc6 barnyard
	newinitd "${FILESDIR}"/barnyard.rc6 barnyard
	if use sguil ; then
	if use sguil ; then
		sed -i -e "/start-stop-daemon --start/s:--exec:-c sguil --exec:" \
		sed -i -e "/start-stop-daemon --start/s:--exec:-c sguil --exec:" \
			"${D}/etc/init.d/barnyard" || die "sed failed"
			"${D}/etc/init.d/barnyard" || die "sed failed"