summaryrefslogtreecommitdiffstats
path: root/source/x/xterm/xterm.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/x/xterm/xterm.SlackBuild')
-rwxr-xr-xsource/x/xterm/xterm.SlackBuild20
1 files changed, 16 insertions, 4 deletions
diff --git a/source/x/xterm/xterm.SlackBuild b/source/x/xterm/xterm.SlackBuild
index 8f1607cbb..863ccae40 100755
--- a/source/x/xterm/xterm.SlackBuild
+++ b/source/x/xterm/xterm.SlackBuild
@@ -1,5 +1,6 @@
#!/bin/sh
-# Copyright 2006, 2007, 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+
+# Copyright 2006-2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,12 +22,21 @@
PKGNAM=xterm
-VERSION=${VERSION:-243}
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-2}
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+BUILD=${BUILD:-1}
NUMJOBS=${NUMJOBS:-" -j7 "}
+# 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-${PKGNAM}
@@ -37,6 +47,8 @@ elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
fi
rm -rf $PKG