summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--network/opera/opera.SlackBuild17
1 files changed, 14 insertions, 3 deletions
diff --git a/network/opera/opera.SlackBuild b/network/opera/opera.SlackBuild
index d4d712fa3d..797bc0a4fb 100644
--- a/network/opera/opera.SlackBuild
+++ b/network/opera/opera.SlackBuild
@@ -25,10 +25,19 @@
PRGNAM=opera
VERSION=10.10
-ARCH=${ARCH:-i386}
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=i386 ;;
+ 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
@@ -38,9 +47,11 @@ set -eu
if [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
-else
- ARCH=i386
+elif [ "$ARCH" = "i386" ]; then
LIBDIRSUFFIX=""
+else
+ printf "\n\n$ARCH is not supported...\n"
+ exit 1
fi
# Don't bother this - it's for easier manipulation and sed'ing later