# HG changeset patch # User Eric Joseph-Alexandre # Date 1323938590 -3600 # Node ID 2796cc564a9538d2dda9b1f7f6d570402e29ebcd # Parent 956ac96b4a1b85adfe5d81e59157f81467416a04 Add: barnyard2 diff -r 956ac96b4a1b -r 2796cc564a95 barnyard2/receipt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/barnyard2/receipt Thu Dec 15 09:43:10 2011 +0100 @@ -0,0 +1,52 @@ +# SliTaz package receipt. + +PACKAGE="barnyard2" +VERSION="1.9" +CATEGORY="system" +SHORT_DESC="Output spool reader for Snort" +MAINTAINER="erjo@slitaz.org" +WEB_SITE="http://www.securixlive.com/barnyard2/" +TARBALL="$PACKAGE-$VERSION.tar.gz" +WGET_URL="http://www.securixlive.com/download/barnyard2/$TARBALL" + +DEPENDS="libpcap" +BUILD_DEPENDS="libpcap-dev" + +# Rules to configure and make the package. +compile_rules() +{ + cd $src + ./configure --sysconfdir=/etc/barnyard2 $CONFIGURE_ARGS && make && make install +} + +# Rules to gen a SliTaz package suitable for Tazpkg. +genpkg_rules() +{ + + cp -a $install/* $fs + + mkdir -p /var/log/barnyard2 +} + +# Post install commands +post_install() +{ + echo "Processing post install commands..." + + # addgroup snort if needed + if ! grep -q 'snort:' $1/etc/group; then + echo -n "Adding group Snort..." + chroot $1/ /bin/addgroup snort + status + fi + # adduser snort if needed + if ! grep -q 'snort:' $1/etc/passwd; then + echo -n "Adding user Snort..." + chroot $1/ /bin/adduser -s /bin/false -h /dev/null \ + -g "Snort Daemon user" -H -D -S -G snort snort + status + fi + + chroot $1/ chown snort.snort /var/log/barnyard2 +} +