summaryrefslogtreecommitdiff
path: root/source/ap/gutenprint/gutenprint.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/gutenprint/gutenprint.SlackBuild')
-rwxr-xr-xsource/ap/gutenprint/gutenprint.SlackBuild31
1 files changed, 24 insertions, 7 deletions
diff --git a/source/ap/gutenprint/gutenprint.SlackBuild b/source/ap/gutenprint/gutenprint.SlackBuild
index 94fb1cbc..e713eefb 100755
--- a/source/ap/gutenprint/gutenprint.SlackBuild
+++ b/source/ap/gutenprint/gutenprint.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=5.2.4
-ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-1}
+VERSION=${VERSION:-$(echo gutenprint-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
+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 "}
@@ -36,6 +45,9 @@ elif [ "$ARCH" = "s390" ]; then
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
fi
CWD=$(pwd)
@@ -100,10 +112,15 @@ cp -a \
mv $PKG/usr/share/gutenprint/doc/* $PKG/usr/doc/gutenprint-${VERSION}
rmdir $PKG/usr/share/gutenprint/doc
-# If you want 1MB of ChangeLog, it's in the source...
-rm -f $PKG/usr/doc/gutenprint-${VERSION}/ChangeLog
+# 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
-# Big... again, it's in the source if you want it.
+# Big... it's in the source if you want it.
rm -f $PKG/usr/share/gutenprint/samples/profile.jpg
rm -f $PKG/usr/doc/gutenprint-${VERSION}/*.pdf