summaryrefslogtreecommitdiff
path: root/system/preload/preload.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/preload/preload.SlackBuild')
-rw-r--r--system/preload/preload.SlackBuild40
1 files changed, 27 insertions, 13 deletions
diff --git a/system/preload/preload.SlackBuild b/system/preload/preload.SlackBuild
index 58673bc679..aa32d58ebd 100644
--- a/system/preload/preload.SlackBuild
+++ b/system/preload/preload.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for preload
-# Copyright 2008 Robby Workman Northport, Alabama (USA)
+# Copyright 2008,2009 Robby Workman Northport, Alabama (USA)
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,9 +23,9 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=preload
-VERSION=0.4
+VERSION=0.6.3
ARCH=${ARCH:-i486}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -35,6 +35,8 @@ OUTPUT=${OUTPUT:-/tmp}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi
@@ -59,16 +61,28 @@ CFLAGS="$SLKCFLAGS" \
--prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSON \
--build=$ARCH-slackware-linux
-make
-make install DESTDIR=$PKG
+make \
+ pkgdocdir=/usr/doc/$PRGNAM-$VERSION
+make install \
+ pkgdocdir=/usr/doc/$PRGNAM-$VERSION \
+ DESTDIR=$PKG
( cd $PKG
- find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
- find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null
)
+# Create the lockfile directory
+# We'll use /var/run/preload instead of /var/lock/subsys, so that a stale
+# lockfile hanging around won't keep preload from starting on boot
+mkdir -p $PKG/var/run/preload
+
# Let's not clobber things that might already exist
mv $PKG/etc/preload.conf $PKG/etc/preload.conf.new
mv $PKG/etc/logrotate.d/preload $PKG/etc/logrotate.d/preload.new
@@ -76,15 +90,15 @@ mv $PKG/etc/logrotate.d/preload $PKG/etc/logrotate.d/preload.new
# Add an init script (in noclobber mode)
install -m 0755 $CWD/rc.preload $PKG/etc/rc.d/rc.preload.new
+# Let's not overwrite an already existing logfile or state file
+rm -f $PKG/var/log/preload.log $PKG/var/lib/preload/preload.state
+
# Kill some things we don't need or can't use
rm -rf $PKG/etc/sysconfig $PKG/etc/rc.d/init.d
-# This requires 'help2man' in order to build a proper man page, so we cheated.
-gzip -9c $CWD/preload.8 > $PKG/usr/man/man8/preload.8.gz
-
-mv $PKG/usr/share/doc $PKG/usr ; rmdir $PKG/usr/share
-cp -a AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
- $PKG/usr/doc/$PRGNAM-$VERSION/$DOC
+cp -a \
+ AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION/$DOC
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install