diff options
Diffstat (limited to 'system/watchdog/watchdog.SlackBuild')
-rw-r--r-- | system/watchdog/watchdog.SlackBuild | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/system/watchdog/watchdog.SlackBuild b/system/watchdog/watchdog.SlackBuild index 6c4b32644577e..ae901d5401707 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 |