summaryrefslogtreecommitdiff
path: root/network/suricata/suricata.SlackBuild
diff options
context:
space:
mode:
authorDimitris Zlatanidis <d.zlatanidis@gmail.com>2014-12-17 14:58:47 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2014-12-17 14:58:47 +0700
commitacbaed2e23d9063fdc62b91ce436ed683a51af37 (patch)
tree1f593b2ab154f21828d36dbd23d75ef05a744d1a /network/suricata/suricata.SlackBuild
parentd46d4e3b4879c7980414b406b3b8d6d788acc81f (diff)
downloadslackbuilds-acbaed2e23d9063fdc62b91ce436ed683a51af37.tar.gz
network/suricata: Updated for version 2.0.5.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/suricata/suricata.SlackBuild')
-rw-r--r--network/suricata/suricata.SlackBuild34
1 files changed, 19 insertions, 15 deletions
diff --git a/network/suricata/suricata.SlackBuild b/network/suricata/suricata.SlackBuild
index e670c3bd34..ae255550be 100644
--- a/network/suricata/suricata.SlackBuild
+++ b/network/suricata/suricata.SlackBuild
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=suricata
-VERSION=${VERSION:-1.4.7}
+VERSION=${VERSION:-2.0.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -59,9 +59,6 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT $PKG/etc/$PRGNAM
cd $TMP
-rm -rf rules
-tar xvf $CWD/emerging.rules.tar.gz
-cp -rf rules $PKG/etc/$PRGNAM
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
@@ -70,7 +67,7 @@ find -L . \
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
-o -perm 511 \) -exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
- -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
+ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -83,7 +80,6 @@ CXXFLAGS="$SLKCFLAGS" \
--docdir=/usr/doc/$PRGNAM-$VERSION \
--enable-shared=yes \
--enable-static=no \
- --enable-non-bundled-htp \
--enable-unix-socket \
--build=$ARCH-slackware-linux
@@ -93,16 +89,24 @@ make install DESTDIR=$PKG
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
+# Fix magic-file path
+sed -i 's/magic-file: \/usr\/share\/file\/magic/magic-file: \/etc\/file\/magic.mgc/' suricata.yaml
+
# Install config files
-install -D -m644 classification.config $PKG/etc/suricata/classification.config.new
-install -D -m644 reference.config $PKG/etc/suricata/reference.config.new
-install -D -m644 suricata.yaml $PKG/etc/suricata/suricata.yaml.new
-install -D -m644 threshold.config $PKG/etc/suricata/threshold.config.new
-
-find $PKG -name perllocal.pod \
- -o -name ".packlist" \
- -o -name "*.bs" \
- | xargs rm -f
+CONFIGS="classification.config reference.config suricata.yaml threshold.config"
+for file in $CONFIGS; do
+ install -D -m644 $file $PKG/etc/suricata/${file}.new
+done
+
+# Include the rc.suricata file
+mkdir -p $PKG/etc/rc.d
+install -D -m0644 $CWD/rc.suricata $PKG/etc/rc.d/rc.suricata.new
+
+# Install rules
+install -D -m644 rules/*.rules $PKG/etc/$PRGNAM
+
+# Create directory for logging
+mkdir -p $PKG/var/log/$PRGNAM
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a COPYING ChangeLog LICENSE doc/*.txt $PKG/usr/doc/$PRGNAM-$VERSION