aboutsummaryrefslogtreecommitdiff
path: root/system/preload
diff options
context:
space:
mode:
authorRobby Workman <rw@rlworkman.net>2010-05-12 17:45:52 +0200
committerMichiel van Wessem <michiel@slackbuilds.org>2010-05-12 17:45:52 +0200
commit6a1e9b8c8e29ca05677a4fae41d8995aae41e5ff (patch)
tree1f66bbd68be49ab1b1715855fc56093a9782dd73 /system/preload
parent68b3f43978dee08af0353ed8f704100f324ec009 (diff)
system/preload: Updated for version 0.6.3
Diffstat (limited to 'system/preload')
-rw-r--r--system/preload/doinst.sh4
-rw-r--r--system/preload/preload.SlackBuild40
-rw-r--r--system/preload/preload.info8
-rw-r--r--system/preload/rc.preload6
4 files changed, 38 insertions, 20 deletions
diff --git a/system/preload/doinst.sh b/system/preload/doinst.sh
index 3fe2d3f76797..116177f27b99 100644
--- a/system/preload/doinst.sh
+++ b/system/preload/doinst.sh
@@ -18,6 +18,10 @@ if [ -e etc/rc.d/rc.preload ]; then
mv etc/rc.d/rc.preload.new.incoming etc/rc.d/rc.preload.new
fi
+# Create log file and state file if they are not already there
+[ ! -e var/log/preload.log ] && touch var/log/preload.log
+[ ! -e var/lib/preload/preload.state ] && touch var/lib/preload/preload.state
+
config etc/rc.d/rc.preload.new
config etc/preload.conf.new
config etc/logrotate.d/preload.new
diff --git a/system/preload/preload.SlackBuild b/system/preload/preload.SlackBuild
index 58673bc6794c..aa32d58ebd59 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
diff --git a/system/preload/preload.info b/system/preload/preload.info
index 5f385528f4b1..b2a99774dd46 100644
--- a/system/preload/preload.info
+++ b/system/preload/preload.info
@@ -1,8 +1,8 @@
PRGNAM="preload"
-VERSION="0.4"
+VERSION="0.6.3"
HOMEPAGE="http://sourceforge.net/projects/preload"
-DOWNLOAD="http://downloads.sourceforge.net/preload/preload-0.4.tar.gz"
-MD5SUM="9c98bc97ec261925c9a40e5084c9c149"
+DOWNLOAD="http://downloads.sourceforge.net/preload/preload-0.6.3.tar.gz"
+MD5SUM="4ebb8463b3b7a323ad8b7ffe89578f6e"
MAINTAINER="Robby Workman"
EMAIL="rw@rlworkman.net"
-APPROVED="David Somero"
+APPROVED="Michiel"
diff --git a/system/preload/rc.preload b/system/preload/rc.preload
index 73f6e0e838df..efe8802a2fa0 100644
--- a/system/preload/rc.preload
+++ b/system/preload/rc.preload
@@ -10,10 +10,10 @@ free -m | awk '/Mem:/ {exit ($2 >= ('256'))?0:1}' || exit 1
start() {
if [ -x /usr/sbin/preload ]; then
- if [ ! -f /var/lock/subsys/preload ]; then
+ if [ ! -f /var/run/preload/preload.lock ]; then
echo "Starting preload daemon: /usr/sbin/preload "
/usr/sbin/preload $PRELOAD_OPTS && \
- touch /var/lock/subsys/preload
+ touch /var/run/preload/preload.lock
else
echo "/usr/sbin/preload is already running. Exiting."
exit 1
@@ -28,7 +28,7 @@ start() {
stop() {
echo "Stopping preload daemon... "
killall -9 preload
- rm -f /var/lock/subsys/preload
+ rm -f /var/run/preload/preload.lock
}
restart() {