summaryrefslogtreecommitdiff
path: root/network/fping
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:12:46 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:12:46 -0400
commit533a081f1eaf5228faafb20ebad6647dc6c667da (patch)
tree40b934b0f3ae19c3c169112a55b4029824eccd77 /network/fping
parent9ed8487dbb64eace1be0b93fc253aa638d9f25be (diff)
downloadslackbuilds-533a081f1eaf5228faafb20ebad6647dc6c667da.tar.gz
network/fping: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network/fping')
-rw-r--r--network/fping/fping.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/network/fping/fping.SlackBuild b/network/fping/fping.SlackBuild
index 0df935f295..229663f585 100644
--- a/network/fping/fping.SlackBuild
+++ b/network/fping/fping.SlackBuild
@@ -26,10 +26,19 @@
PRGNAM=fping
VERSION=2.4b2_to
-ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) ARCH=i486 ;;
+ arm*) ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
@@ -44,6 +53,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e