#!/bin/sh #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=ucspi_tcp VERSION=0.88 TAR=ucspi-tcp-$VERSION BUILD=1DatuX ## Location to download the sources SRC_LOC="http://cr.yp.to/ucspi-tcp/$TAR.tar.gz" PKG=$TMP/package-$TAR ## Lets Grab the Source if needed if [ -a $CWD/$TAR.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 $TAR tar xzvf $CWD/$TAR.tar.gz compile() { cd $TAR patch -p1 < $CWD/ucspi-tcp-0.88.a_record.patch patch -p1 < $CWD/ucspi-tcp-0.88.errno.patch patch -p1 < $CWD/ucspi-tcp-0.88.nodefaultrbl.patch make } prepare() { mkdir -p $PKG/usr/bin cp who@ $PKG/usr/bin cp tcprules $PKG/usr/bin cp tcpclient $PKG/usr/bin cp mconnect-io $PKG/usr/bin cp addcr $PKG/usr/bin cp argv0 $PKG/usr/bin cp date@ $PKG/usr/bin cp delcr $PKG/usr/bin cp http@ $PKG/usr/bin cp tcprulescheck $PKG/usr/bin cp tcpserver $PKG/usr/bin cp finger@ $PKG/usr/bin cp fixcrio $PKG/usr/bin cp rblsmtpd $PKG/usr/bin cp tcpcat $PKG/usr/bin cp mconnect $PKG/usr/bin cp recordio $PKG/usr/bin } description() { mkdir -p $PKG/install cat > $PKG/install/slack-desc << END |-----handy-ruler------------------------------------------------------| $NAME: $NAME $VERSION $NAME: $NAME: $NAME: $NAME: $NAME: $NAME: $NAME: $NAME: $NAME: $NAME: END } build() { # Build the package: cd $PKG #makepkg -l y -c n $CWD/$NAME-$VERSION-$ARCH-$BUILD.tgz makepkg -l y -c n $CWD/$NAME.pkg > /dev/null && echo $VERSION > $CWD/$NAME.version && arch > $CWD/$NAME.arch } compile prepare description build