system/samhain: Fix building on x86_64, removed bashisms.

Thanks to Richard Scott Smith for the hints on optimizations

Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
This commit is contained in:
Matteo Bernardini 2013-11-22 13:21:44 +01:00 committed by Robby Workman
parent 7af2bf5b1a
commit bbe8c0a708

View file

@ -24,7 +24,7 @@
PRGNAM=samhain
VERSION=${VERSION:-3.1.0}
BUILD=${BUILD:-1}
BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
if [ -z "$ARCH" ]; then
@ -47,7 +47,7 @@ elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
SLKCFLAGS="-O1 -fPIC"
LIBDIRSUFFIX="64"
else
SLKCFLAGS="-O2"
@ -59,7 +59,7 @@ set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -f $PRGNAM-$VERSION.tar.gz{,.asc}
rm -f $PRGNAM-$VERSION.tar.gz $PRGNAM-$VERSION.tar.gz.asc
tar xvf $CWD/$PRGNAM-current.tar.gz
rm -rf $PRGNAM-$VERSION
tar xvf $PRGNAM-$VERSION.tar.gz
@ -87,7 +87,7 @@ make install DESTDIR=$PKG
mv $PKG/etc/samhainrc $PKG/etc/samhainrc.new
# No need for /var/log and /var/run directories here
rmdir $PKG/var/{log,run}
rmdir $PKG/var/log $PKG/var/run
find $PKG/usr/man -type f -exec gzip -9 {} \;
for i in $( find $PKG/usr/man -type l ) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done