summaryrefslogtreecommitdiffstats
path: root/source/n/links/links.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/links/links.SlackBuild')
-rwxr-xr-xsource/n/links/links.SlackBuild28
1 files changed, 24 insertions, 4 deletions
diff --git a/source/n/links/links.SlackBuild b/source/n/links/links.SlackBuild
index fd55faea5..c8839ebd0 100755
--- a/source/n/links/links.SlackBuild
+++ b/source/n/links/links.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
@@ -20,11 +20,21 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-VERSION=2.2
-ARCH=${ARCH:-x86_64}
-NUMJOBS=${NUMJOBS:-" -j7 "}
+VERSION=2.3pre1
BUILD=${BUILD:-1}
+# 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 "}
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-links
@@ -35,6 +45,8 @@ elif [ "$ARCH" = "s390" ]; then
SLKCFLAGS="-O2"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
+else
+ SLKCFLAGS="-O2"
fi
rm -rf $PKG
@@ -80,6 +92,14 @@ find $PKG/usr/doc/links-$VERSION -type f -exec chmod 644 {} \;
find $PKG/usr/doc/links-$VERSION -type d -exec chmod 755 {} \;
chmod 0755 $PKG/usr/doc/links-$VERSION/mailcap.pl
+# If there's a ChangeLog, installing at least part of the recent history
+# is useful, but don't let it get totally out of control:
+if [ -r ChangeLog ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
+ touch -r ChangeLog $DOCSDIR/ChangeLog
+fi
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null