aboutsummaryrefslogtreecommitdiff
path: root/system/mcrypt
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:16:07 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:16:07 -0400
commit29f5f95a33d2d0d8c7589da264a09e38a55a7f39 (patch)
tree3c154b5d30b1e09e8d026684845161bc03ff3a2e /system/mcrypt
parent6f243e4cd959193ac5906db7713aa9f987b6397f (diff)
system/mcrypt: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'system/mcrypt')
-rw-r--r--system/mcrypt/mcrypt.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/system/mcrypt/mcrypt.SlackBuild b/system/mcrypt/mcrypt.SlackBuild
index e9ab1b0863fc1..399bbcafd8b07 100644
--- a/system/mcrypt/mcrypt.SlackBuild
+++ b/system/mcrypt/mcrypt.SlackBuild
@@ -26,10 +26,19 @@
PRGNAM=mcrypt
VERSION=2.6.8
-ARCH=${ARCH:-i486}
BUILD=${BUILD:-2}
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
@@ -44,6 +53,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e