aboutsummaryrefslogtreecommitdiff
path: root/misc/jmri
diff options
context:
space:
mode:
Diffstat (limited to 'misc/jmri')
-rw-r--r--misc/jmri/jmri.SlackBuild11
1 files changed, 10 insertions, 1 deletions
diff --git a/misc/jmri/jmri.SlackBuild b/misc/jmri/jmri.SlackBuild
index 5a29c5707f697..785db9007b105 100644
--- a/misc/jmri/jmri.SlackBuild
+++ b/misc/jmri/jmri.SlackBuild
@@ -6,12 +6,21 @@
PRGNAM=jmri
VERSION=2.4A
-ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
TARNAM=JMRI
+# 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