summaryrefslogtreecommitdiff
path: root/system/testdisk/testdisk.SlackBuild
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:16:53 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:16:53 -0400
commit6bbfad2973b54a6f6df5cb680ea6f443faba8c8b (patch)
tree05e94135b4e169d0b1ed1c6c75bebfab82f6e84f /system/testdisk/testdisk.SlackBuild
parentef35d3f52ffd33c27ee984d8231f9e5ccfc33b0f (diff)
downloadslackbuilds-6bbfad2973b54a6f6df5cb680ea6f443faba8c8b.tar.gz
system/testdisk: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'system/testdisk/testdisk.SlackBuild')
-rw-r--r--system/testdisk/testdisk.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/system/testdisk/testdisk.SlackBuild b/system/testdisk/testdisk.SlackBuild
index 3571af145a..7a77142555 100644
--- a/system/testdisk/testdisk.SlackBuild
+++ b/system/testdisk/testdisk.SlackBuild
@@ -5,10 +5,19 @@
PRGNAM=testdisk
VERSION=6.11
-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
@@ -23,6 +32,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e