aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:10:12 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:10:12 -0400
commite04c3c749bf1b8f835d4a9693b7e33954d9c99f6 (patch)
tree315a2d1f036afeb70c95279a0ebfb94d7714c037
parentc9ecef99065d56f48aa04d02b5fb5b7f07b7fef6 (diff)
libraries/python-mpd: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
-rw-r--r--libraries/python-mpd/python-mpd.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/libraries/python-mpd/python-mpd.SlackBuild b/libraries/python-mpd/python-mpd.SlackBuild
index c1e224183e5b0..ff495dc4fc795 100644
--- a/libraries/python-mpd/python-mpd.SlackBuild
+++ b/libraries/python-mpd/python-mpd.SlackBuild
@@ -24,10 +24,19 @@
PRGNAM=python-mpd
VERSION=0.2.1
-ARCH=${ARCH:-i486}
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=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-python-mpd
@@ -43,6 +52,9 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
rm -rf $PKG