summaryrefslogtreecommitdiffstats
path: root/system/rkhunter/rkhunter.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/rkhunter/rkhunter.SlackBuild')
-rw-r--r--system/rkhunter/rkhunter.SlackBuild20
1 files changed, 15 insertions, 5 deletions
diff --git a/system/rkhunter/rkhunter.SlackBuild b/system/rkhunter/rkhunter.SlackBuild
index 07f9300a41..999340ebbf 100644
--- a/system/rkhunter/rkhunter.SlackBuild
+++ b/system/rkhunter/rkhunter.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for Rootkit Hunter
@@ -6,10 +6,13 @@
# Was maintained by Mr. B-o-B <mr dot chew dot baka at gmail dot com>
# Currently maintained by Gerardo Zamudio <gerardo.zamudio@linux.com>
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=rkhunter
VERSION=${VERSION:-1.4.6}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -19,13 +22,20 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
@@ -71,4 +81,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE