summaryrefslogtreecommitdiff
path: root/source/n/ytalk/ytalk.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/ytalk/ytalk.SlackBuild')
-rwxr-xr-xsource/n/ytalk/ytalk.SlackBuild17
1 files changed, 14 insertions, 3 deletions
diff --git a/source/n/ytalk/ytalk.SlackBuild b/source/n/ytalk/ytalk.SlackBuild
index 07c147b0..c50917e3 100755
--- a/source/n/ytalk/ytalk.SlackBuild
+++ b/source/n/ytalk/ytalk.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -21,9 +21,18 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
VERSION=${VERSION:-3.3.0}
-ARCH=${ARCH:-x86_64}
BUILD=${BUILD:-2}
+# 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
+
NUMJOBS=${NUMJOBS:-" -j7 "}
if [ "$ARCH" = "i486" ]; then
@@ -32,6 +41,8 @@ elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
fi
CWD=$(pwd)
@@ -68,7 +79,7 @@ find $PKG | xargs file | grep -e "executable" -e "shared object" \
mkdir -p $PKG/usr/doc/ytalk-$VERSION
cp -a \
- AUTHORS COPYING ChangeLog INSTALL README \
+ AUTHORS COPYING* ChangeLog INSTALL README* \
$PKG/usr/doc/ytalk-$VERSION
gzip -9 $PKG/usr/man/man?/*.?