summaryrefslogtreecommitdiffstats
path: root/source/l/libtermcap/libtermcap.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/l/libtermcap/libtermcap.SlackBuild')
-rwxr-xr-xsource/l/libtermcap/libtermcap.SlackBuild14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/l/libtermcap/libtermcap.SlackBuild b/source/l/libtermcap/libtermcap.SlackBuild
index d306fe66a..12e027637 100755
--- a/source/l/libtermcap/libtermcap.SlackBuild
+++ b/source/l/libtermcap/libtermcap.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2005-2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2005-2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,9 +22,18 @@
VERSION=1.2.3
-ARCH=${ARCH:-x86_64}
BUILD=${BUILD:-7}
+# Automatically determine the architecture we're building on:
+if [ -z "$ARCH" ]; then
+ case "$( uname -m )" in
+ i?86) export ARCH=i486 ;;
+ arm*) export ARCH=arm ;;
+ # Unless $ARCH is already set, use uname -m for all other archs:
+ *) export ARCH=$( uname -m ) ;;
+ esac
+fi
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-libtermcap
@@ -75,3 +84,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
makepkg -l y -c n $TMP/libtermcap-$VERSION-$ARCH-$BUILD.txz
+