summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:09:34 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:09:34 -0400
commit7b78a1be0cd6e4d5a40a18c5e28330a700e55222 (patch)
tree0f2192fff0e2cc82b4486c1224dbeb0f2a18b7d3
parent4a9ca23360a1639910a74eded3342fbfa9ba8fd7 (diff)
downloadslackbuilds-7b78a1be0cd6e4d5a40a18c5e28330a700e55222.tar.gz
libraries/perl-Sub-Uplevel: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
-rw-r--r--libraries/perl-Sub-Uplevel/perl-Sub-Uplevel.SlackBuild15
1 files changed, 12 insertions, 3 deletions
diff --git a/libraries/perl-Sub-Uplevel/perl-Sub-Uplevel.SlackBuild b/libraries/perl-Sub-Uplevel/perl-Sub-Uplevel.SlackBuild
index 3ba4f87cc2..0c15ba9327 100644
--- a/libraries/perl-Sub-Uplevel/perl-Sub-Uplevel.SlackBuild
+++ b/libraries/perl-Sub-Uplevel/perl-Sub-Uplevel.SlackBuild
@@ -27,14 +27,23 @@
SRCNAM=Sub-Uplevel
PRGNAM=perl-Sub-Uplevel
VERSION=0.22
-ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-BUILD=${BUILD:-1}
+# 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
OUTPUT=${OUTPUT:-/tmp}
-CWD=$(pwd)
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"