aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:13:25 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:13:25 -0400
commit092add53485981af090a9c52ea6861b01c6a4f6b (patch)
tree790ed80926bea60e46a90a99369e682feee7685e
parent845ffa447b4147169b4005f987c9a3fbbd6906c1 (diff)
network/mz: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
-rw-r--r--network/mz/mz.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/network/mz/mz.SlackBuild b/network/mz/mz.SlackBuild
index 7eea40719f57b..17b6d1a0ba7b3 100644
--- a/network/mz/mz.SlackBuild
+++ b/network/mz/mz.SlackBuild
@@ -24,10 +24,19 @@
PRGNAM=mz
VERSION=0.39
-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
@@ -42,6 +51,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e