aboutsummaryrefslogtreecommitdiff
path: root/network/enet/enet.SlackBuild
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:12:41 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:12:41 -0400
commit73c07a19f4672e1987d7609791b32145caa4b9b7 (patch)
tree5823b3bc6270121962e31ab2ccc9927b095bcbcb /network/enet/enet.SlackBuild
parent2e082663f160737ea5833b2999b0e7b1475d1b30 (diff)
network/enet: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'network/enet/enet.SlackBuild')
-rw-r--r--network/enet/enet.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/network/enet/enet.SlackBuild b/network/enet/enet.SlackBuild
index cfb8dfb8a10e5..6acb99e523657 100644
--- a/network/enet/enet.SlackBuild
+++ b/network/enet/enet.SlackBuild
@@ -6,10 +6,19 @@
PRGNAM=enet
VERSION=${VERSION:-1.2.1}
-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
@@ -24,6 +33,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e