aboutsummaryrefslogtreecommitdiff
path: root/system/watchdog/watchdog.SlackBuild
diff options
context:
space:
mode:
authorMenno Duursma <druiloor@zonnet.nl>2010-05-13 00:42:22 +0200
committerErik Hanson <erik@slackbuilds.org>2010-05-13 00:42:22 +0200
commit816f172bcddc734a6f85a54b3d52087853c770bb (patch)
treec5387bf12452d1301cffd4aa456913bcb3495797 /system/watchdog/watchdog.SlackBuild
parentdf4ccaeb30506449f1c4056ee5690af48ff658c7 (diff)
system/watchdog: Updated for version 5.7
Diffstat (limited to 'system/watchdog/watchdog.SlackBuild')
-rw-r--r--system/watchdog/watchdog.SlackBuild48
1 files changed, 27 insertions, 21 deletions
diff --git a/system/watchdog/watchdog.SlackBuild b/system/watchdog/watchdog.SlackBuild
index ae901d5401707..1b5a8649dcfbf 100644
--- a/system/watchdog/watchdog.SlackBuild
+++ b/system/watchdog/watchdog.SlackBuild
@@ -1,10 +1,15 @@
#!/bin/sh
# Slackware build script for watchdog
-# Written by Menno E. Duursma <druiloor@zonnet.nl>
+
+# Written by Menno Duursma <druiloor@zonnet.nl>
+
+# This program is free software. It comes without any warranty.
+# Granted WTFPL, Version 2, as published by Sam Hocevar. See
+# http://sam.zoy.org/wtfpl/COPYING for more details.
PRGNAM=watchdog
-VERSION=5.4
+VERSION=${VERSION:-5.7}
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -16,8 +21,13 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
fi
set -e # Exit on most errors
@@ -26,26 +36,35 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvf $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
-patch -p1 < $CWD/$PRGNAM-$VERSION-slackware.diff
+patch -p1 --verbose < $CWD/patches/$PRGNAM-$VERSION-slackware.diff
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
- --mandir=/usr/man
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
-# Compile the application and install it into the $PKG directory
make
make install-strip DESTDIR=$PKG
+# Move config to .new; let doinst.sh handle it further
+mv $PKG/etc/$PRGNAM.conf $PKG/etc/$PRGNAM.conf.new
+
+# Add init script too
+mkdir -p $PKG/etc/rc.d
+cat $CWD/rc.$PRGNAM > $PKG/etc/rc.d/rc.$PRGNAM.new
+
# Compress man pages
( cd $PKG/usr/man
find . -type f -exec gzip -9 {} \;
@@ -59,24 +78,11 @@ 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.SBo
-
-# Move config to .new; let doinst.sh handle it further
-mv $PKG/etc/$PRGNAM.conf $PKG/etc/$PRGNAM.conf.new
-
-# Add init script too
-mkdir -p $PKG/etc/rc.d
-cat rc.$PRGNAM.slackware > $PKG/etc/rc.d/rc.$PRGNAM.new
+cat $CWD/README > $PKG/usr/doc/$PRGNAM-$VERSION/README$TAG
mkdir -p $PKG/install
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.tgz
-
-# Clean up the extra stuff:
-if [ "$1" = "--cleanup" ]; then
- rm -rf $TMP/$PRGNAM-$VERSION
- rm -rf $PKG
-fi
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}