summaryrefslogtreecommitdiffstats
path: root/source/n/iputils/iputils.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/iputils/iputils.SlackBuild')
-rwxr-xr-xsource/n/iputils/iputils.SlackBuild32
1 files changed, 25 insertions, 7 deletions
diff --git a/source/n/iputils/iputils.SlackBuild b/source/n/iputils/iputils.SlackBuild
index a5e3691a7..c7a77a4a9 100755
--- a/source/n/iputils/iputils.SlackBuild
+++ b/source/n/iputils/iputils.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -20,9 +20,28 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=s20070202
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-2}
+VERSION=s20100418
+BUILD=${BUILD:-1}
+
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "s390" ]; then
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ LIBDIRSUFFIX="64"
+else
+ LIBDIRSUFFIX=""
+fi
NUMJOBS=${NUMJOBS:-" -j7 "}
@@ -37,8 +56,7 @@ cd $TMP
rm -rf iputils-$VERSION
tar xvf $CWD/iputils-$VERSION.tar.bz2 || exit 1
cd iputils-$VERSION || exit 1
-# Modern compiler...
-sed -i -e "s/OPEN_MAX/NR_OPEN/" $(grep -lr OPEN_MAX *)
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -46,7 +64,7 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-make || exit 1
+make VPATH=/usr/lib${LIBDIRSUFFIX} || exit 1
( cd doc ; make man || exit 1 ) || exit 1
strip arping clockdiff ping ping6 rarpd rdisc tracepath tracepath6 traceroute6