summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
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 6668430c3f..d76ef63007 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