aboutsummaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorMatteo Bernardini <matteo.bernardini@sns.it>2010-05-29 11:46:11 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-06-01 00:39:33 -0500
commit0b84adc4ff9147ac75e6b9e39cab0e85cfe834a6 (patch)
tree4fd9a4768d963b17cc8b8945861832a7a4843772 /misc
parentde5a80a765e619d03c521f87e3efb689bb270d03 (diff)
misc/cksfv: miscellaneous cleanups
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'misc')
-rw-r--r--misc/cksfv/cksfv.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/misc/cksfv/cksfv.SlackBuild b/misc/cksfv/cksfv.SlackBuild
index 6668430c3f9f8..d76ef63007879 100644
--- a/misc/cksfv/cksfv.SlackBuild
+++ b/misc/cksfv/cksfv.SlackBuild
@@ -31,9 +31,19 @@
PRGNAM=cksfv
VERSION=1.3.14
-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
@@ -45,6 +55,8 @@ elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
fi
set -e