summaryrefslogtreecommitdiff
path: root/system/openct
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:16:20 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:16:20 -0400
commit1273c83595be328859487a2855e37093ec63cde2 (patch)
tree441c4b00cbbd32c1cb0fdd0e1b4d9d25c26fa37d /system/openct
parent59a569b1554292586420a7ee4815e9a20c98b8ba (diff)
downloadslackbuilds-1273c83595be328859487a2855e37093ec63cde2.tar.gz
system/openct: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'system/openct')
-rw-r--r--system/openct/openct.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/system/openct/openct.SlackBuild b/system/openct/openct.SlackBuild
index 8c96ffc4ed..8fc1ec37f5 100644
--- a/system/openct/openct.SlackBuild
+++ b/system/openct/openct.SlackBuild
@@ -24,10 +24,19 @@
PRGNAM=openct
VERSION=${VERSION:-0.6.20}
-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
@@ -47,6 +56,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e # Exit on most errors