summaryrefslogtreecommitdiff
path: root/network/dhcping/dhcping.SlackBuild
diff options
context:
space:
mode:
authorMichal Bialozor <bialyy@o2.pl>2010-12-16 14:06:11 -0600
committerErik Hanson <erik@slackbuilds.org>2010-12-17 07:56:26 -0600
commit5b3418da65fe0c69f16ebcd59ad6331392c6ab9c (patch)
tree44148488135624ee46de3515a8a4d7ca6425c293 /network/dhcping/dhcping.SlackBuild
parente8f26596a8b9d55d3b125c45dfc50cb2a426ef04 (diff)
downloadslackbuilds-5b3418da65fe0c69f16ebcd59ad6331392c6ab9c.tar.gz
network/dhcping: Added (checks if a remote DHCP server is alive)
Signed-off-by: Erik Hanson <erik@slackbuilds.org>
Diffstat (limited to 'network/dhcping/dhcping.SlackBuild')
-rw-r--r--network/dhcping/dhcping.SlackBuild68
1 files changed, 68 insertions, 0 deletions
diff --git a/network/dhcping/dhcping.SlackBuild b/network/dhcping/dhcping.SlackBuild
new file mode 100644
index 0000000000..ba13f745af
--- /dev/null
+++ b/network/dhcping/dhcping.SlackBuild
@@ -0,0 +1,68 @@
+#!/bin/sh
+
+# Slackware build script for libdbi
+# Written by Michal Bialozor <bialyy@o2.pl>
+
+PRGNAM=dhcping
+VERSION=1.2
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+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"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP || exit 1
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
+cd $PRGNAM-$VERSION || exit 1
+chown -R root:root .
+chmod -R u+w,go+r-w,a-s .
+
+CFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux \
+ || exit 1
+
+make
+make install DESTDIR=$PKG
+
+find $PKG/usr/man -type f -exec gzip -9 {} \;
+for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a CHANGES CONTACT LICENSE $PKG/usr/doc/$PRGNAM-$VERSION
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}