#!/bin/sh #DEP:libtimesaver #DEP:slackpackage ## Include the slackware-pkg conf file if [ -a /etc/slack-package.conf ]; then . /etc/slack-package.conf else echo "Sorry you need to have the slack-package.conf file to run these" echo "please install the slackbuilds package from LinuxPackages.net" exit 1 fi # Set initial variables: NAME=daemontools VERSION=0.76 BUILD=$MYIN ## Location to download the sources SRC_LOC="http://cr.yp.to/daemontools/$NAME-$VERSION.tar.gz" PKG=$TMP/package-$NAME ## Lets Grab the Source if needed if [ -a $CWD/$NAME-$VERSION.tar.gz ]; then echo "Source present not downloading" else $WGET $SRC_LOC || true fi if [ ! -d $TMP ]; then mkdir -p $TMP # location to build the source fi rm -rf $PKG mkdir -p $PKG cd $TMP rm -rf admin tar xzvf $CWD/$NAME-$VERSION.tar.gz || exit 1 #################### timesaver patches erin boppen #EDWIN: uitgeschakeld, te krikky en niet handig voor profi gebruik. #patch -p0 <$CWD/supervise.patch || exit 1 #patch -p0 <$CWD/makefile.patch || exit 1 compile() { cd admin patch -p0 < $CWD/$NAME-$VERSION.errno.patch || exit 1 cd ../ mkdir /package cp -R admin /package cd /package/admin/daemontools-$VERSION/ cp /usr/lib/libtimesaver.a src/ cp $CWD/Makefile /package/admin/daemontools-0.76/src/ ./package/install } prepare() { mkdir -p $PKG/usr/bin mkdir -p $PKG/service cp /package/admin/daemontools-$VERSION/command/* $PKG/usr/bin } description() { mkdir -p $PKG/install cat > $PKG/install/slack-desc << END |-----handy-ruler------------------------------------------------------| daemontools: daemontools $VERSION daemontools: daemontools: daemontools is an extensive collection of tools for managing daemontools: UNIX services. It includes tools for starting, restarting, daemontools: stopping, monitoring and logging any services that you might daemontools: wish to run on a UNIX machine. daemontools: daemontools: daemontools: daemontools: daemontools: END } runscript() { #syn-3 wrapper scripts cp $CWD/svc* $PKG/usr/bin || exit 1 chmod +x $PKG/usr/bin/svc* || exit 1 #supervise compatibility hax0r #unwanted by new key system , look at timesaver #mv $PKG/usr/bin/{supervise,supervise.new} || exit 1 #mkdir -p $PKG/install #cat > $PKG/install/doinst.sh << END #if ! [ -e usr/bin/supervise ]; then # mv usr/bin/supervise.new usr/bin/supervise #fi #END #chmod +x $PKG/install/doinst.sh } build() { # Build the package: cd $PKG makepkg -l y -c n $CWD/$NAME.pkg || exit 1 echo $VERSION > $CWD/$NAME.version echo $ARCH > $CWD/$NAME.arch echo "Your $NAME package is complete, make sure you open it up before installing it." echo "It is located in /tmp thanks for your support The Linuxpackages.net Folks" } cleanup() { rm -rf $CWD/tmp } compile || exit 1 prepare || exit 1 description runscript build || exit 1 cleanup