From 0b84adc4ff9147ac75e6b9e39cab0e85cfe834a6 Mon Sep 17 00:00:00 2001 From: Matteo Bernardini Date: Sat, 29 May 2010 11:46:11 +0200 Subject: [PATCH] misc/cksfv: miscellaneous cleanups Signed-off-by: Robby Workman --- misc/cksfv/cksfv.SlackBuild | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) 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