summaryrefslogtreecommitdiff
path: root/libraries/liblinebreak
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:08:09 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:08:09 -0400
commitf91e845107dd8e371b3d3a887f471cf9298bd88d (patch)
tree6fca00a712e530069330817ef51b5460f06eec86 /libraries/liblinebreak
parentd4a9d94b220e90d948bfc3e2fae956748736cc3f (diff)
downloadslackbuilds-f91e845107dd8e371b3d3a887f471cf9298bd88d.tar.gz
libraries/liblinebreak: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
Diffstat (limited to 'libraries/liblinebreak')
-rw-r--r--libraries/liblinebreak/liblinebreak.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/libraries/liblinebreak/liblinebreak.SlackBuild b/libraries/liblinebreak/liblinebreak.SlackBuild
index aa398d56d9..458832ebcf 100644
--- a/libraries/liblinebreak/liblinebreak.SlackBuild
+++ b/libraries/liblinebreak/liblinebreak.SlackBuild
@@ -8,10 +8,19 @@
PRGNAM=liblinebreak
VERSION=${VERSION:-2.0}
-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