summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:15:52 -0400
committerDavid Somero <xgizzmo@slackbuilds.org>2010-06-04 01:15:52 -0400
commitbd54c788c48d004c6e1550d6310abbf10fcf60cc (patch)
treef41467cb4feb8aa9ca996f5d0fcfc3b8c17c5981
parent8f5091932ca3d6d53f9d24e2e1cc12ca2f2e7398 (diff)
downloadslackbuilds-bd54c788c48d004c6e1550d6310abbf10fcf60cc.tar.gz
system/htop: Misc automated cleanups.
Signed-off-by: David Somero <xgizzmo@slackbuilds.org>
-rw-r--r--system/htop/htop.SlackBuild14
1 files changed, 13 insertions, 1 deletions
diff --git a/system/htop/htop.SlackBuild b/system/htop/htop.SlackBuild
index 3051abe61e..3ee99b48c2 100644
--- a/system/htop/htop.SlackBuild
+++ b/system/htop/htop.SlackBuild
@@ -25,10 +25,19 @@
PRGNAM=htop
VERSION=${VERSION:-0.8.3}
-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
@@ -43,6 +52,9 @@ elif [ "$ARCH" = "i686" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
set -e