summaryrefslogtreecommitdiff
path: root/system/watchdog/watchdog.SlackBuild
diff options
context:
space:
mode:
authorMenno E. Duursma <druiloor@zonnet.nl>2010-05-11 19:46:45 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-11 19:46:45 +0200
commit50429056150db116ab36557821d18a3bfd197c44 (patch)
treec1c524a379b2d21383db4215e44545532ec48ebe /system/watchdog/watchdog.SlackBuild
parent337709e77376bec94f384e510b21b4398be6f2df (diff)
downloadslackbuilds-50429056150db116ab36557821d18a3bfd197c44.tar.gz
system/watchdog: Updated for version 5.3.1
Diffstat (limited to 'system/watchdog/watchdog.SlackBuild')
-rw-r--r--system/watchdog/watchdog.SlackBuild20
1 files changed, 13 insertions, 7 deletions
diff --git a/system/watchdog/watchdog.SlackBuild b/system/watchdog/watchdog.SlackBuild
index 6c4b326445..ae901d5401 100644
--- a/system/watchdog/watchdog.SlackBuild
+++ b/system/watchdog/watchdog.SlackBuild
@@ -3,14 +3,12 @@
# Slackware build script for watchdog
# Written by Menno E. Duursma <druiloor@zonnet.nl>
-# Exit on most errors
-set -e
-
PRGNAM=watchdog
-VERSION=5.3.1
+VERSION=5.4
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -22,17 +20,19 @@ elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
fi
+set -e # Exit on most errors
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xzvf $CWD/${PRGNAM}_${VERSION}.tar.gz
+tar xvf $CWD/${PRGNAM}-${VERSION}.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
# Apply the Slackware support scripts patch
-cat $CWD/$PRGNAM-$VERSION-slackware.diff | patch -p1 --verbose
+patch -p1 < $CWD/$PRGNAM-$VERSION-slackware.diff
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
@@ -59,7 +59,7 @@ cp -a [A-Z][A-Z]* ChangeLog examples $PKG/usr/doc/$PRGNAM-$VERSION
cp -a debian/README.debian $PKG/usr/doc/$PRGNAM-$VERSION
# Also, include the SlackBuild script in the documentation directory
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README.SBo
# Move config to .new; let doinst.sh handle it further
mv $PKG/etc/$PRGNAM.conf $PKG/etc/$PRGNAM.conf.new
@@ -74,3 +74,9 @@ cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+
+# Clean up the extra stuff:
+if [ "$1" = "--cleanup" ]; then
+ rm -rf $TMP/$PRGNAM-$VERSION
+ rm -rf $PKG
+fi