summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:08:55 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:08:55 -0400
commitd6ab546165a4757bd3d1a58eb9657b0d7b25514c (patch)
tree9b92e3e2a7af06fe99ada828a8485154ea964835
parent2b3dbf04bcb5bfb740079eea3754527cf39c1a6a (diff)
downloadslackbuilds-d6ab546165a4757bd3d1a58eb9657b0d7b25514c.tar.gz
libraries/libtorrent: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
-rw-r--r--libraries/libtorrent/libtorrent.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/libraries/libtorrent/libtorrent.SlackBuild b/libraries/libtorrent/libtorrent.SlackBuild
index eec9bff04e..002b0be1ab 100644
--- a/libraries/libtorrent/libtorrent.SlackBuild
+++ b/libraries/libtorrent/libtorrent.SlackBuild
@@ -8,10 +8,19 @@
PRGNAM=libtorrent
VERSION=0.12.6
-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-$PRGNAM
@@ -26,6 +35,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e