aboutsummaryrefslogtreecommitdiff
path: root/system/mtftar
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:16:11 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:16:11 -0400
commitae830c45389e85fbc6ac51e0395b0681c211adee (patch)
treeaa24dd6d85d3a2b8b5c0ac6958293a7844a07940 /system/mtftar
parent214dbd39099fe9f31a8bda22ae0a805f6faca492 (diff)
system/mtftar: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'system/mtftar')
-rw-r--r--system/mtftar/mtftar.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/system/mtftar/mtftar.SlackBuild b/system/mtftar/mtftar.SlackBuild
index 1648da5c4627c..312a21e3d7aae 100644
--- a/system/mtftar/mtftar.SlackBuild
+++ b/system/mtftar/mtftar.SlackBuild
@@ -9,10 +9,19 @@
PRGNAM=mtftar
VERSION=${VERSION:-20070205}
-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
@@ -27,6 +36,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e