summaryrefslogtreecommitdiffstats
path: root/source/ap/vbetool/vbetool.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/vbetool/vbetool.SlackBuild')
-rwxr-xr-xsource/ap/vbetool/vbetool.SlackBuild15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/ap/vbetool/vbetool.SlackBuild b/source/ap/vbetool/vbetool.SlackBuild
index fcd23c9fd..619c89bd7 100755
--- a/source/ap/vbetool/vbetool.SlackBuild
+++ b/source/ap/vbetool/vbetool.SlackBuild
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 2008 Robby Workman, Northport, Alabama, USA
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,9 +23,18 @@
VERSION=1.1
-ARCH=${ARCH:-x86_64}
BUILD=${BUILD:-1}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-vbetool
@@ -36,6 +45,8 @@ elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
fi
rm -rf $PKG