aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:10:57 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:10:57 -0400
commit24bcb9dfc6e306e0529887155eacc536bda6f742 (patch)
treee761bfb499c5ae5e93b80691dc84cebfc1e74698
parentd83d314dbdd47bdb9b0fe49bfd23b12f3c909921 (diff)
misc/gcolor2: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
-rw-r--r--misc/gcolor2/gcolor2.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/misc/gcolor2/gcolor2.SlackBuild b/misc/gcolor2/gcolor2.SlackBuild
index 8552758e1fe90..afd0ddc13d7d3 100644
--- a/misc/gcolor2/gcolor2.SlackBuild
+++ b/misc/gcolor2/gcolor2.SlackBuild
@@ -6,10 +6,19 @@
PRGNAM=gcolor2
VERSION=0.4
-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
@@ -23,6 +32,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e