summaryrefslogtreecommitdiff
path: root/source/a/cups/cups.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'source/a/cups/cups.SlackBuild')
-rwxr-xr-xsource/a/cups/cups.SlackBuild42
1 files changed, 36 insertions, 6 deletions
diff --git a/source/a/cups/cups.SlackBuild b/source/a/cups/cups.SlackBuild
index 5ae07095..1c285c63 100755
--- a/source/a/cups/cups.SlackBuild
+++ b/source/a/cups/cups.SlackBuild
@@ -1,6 +1,6 @@
#!/bin/sh
-# Copyright 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA
+# Copyright 2008, 2009, 2010 Patrick J. Volkerding, Sebeka, Minnesota, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -22,10 +22,18 @@
# CUPS build script by volkerdi@slackware.com.
-VERSION=1.3.11
-ARCH=${ARCH:-x86_64}
-NUMJOBS=${NUMJOBS:-" -j7 "}
-BUILD=${BUILD:-1}
+VERSION=1.4.3
+BUILD=${BUILD:-3}
+
+# 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
if [ "$ARCH" = "x86_64" ]; then
LIBDIRSUFFIX="64"
@@ -33,6 +41,8 @@ else
LIBDIRSUFFIX=""
fi
+NUMJOBS=${NUMJOBS:-" -j7 "}
+
CWD=$(pwd)
TMP=${TMP:-/tmp}
PKG=$TMP/package-cups
@@ -45,7 +55,8 @@ rm -rf cups-$VERSION
tar xvf $CWD/cups-$VERSION-source.tar.?z* || exit 1
cd cups-$VERSION
-zcat $CWD/cups.firefox.desktop.diff.gz | patch -p1 --verbose || exit 1
+# Fix the USB backend to use either usblp or libusb:
+zcat $CWD/usb-backend-both-usblp-and-libusb.dpatch.gz | patch -p1 --verbose || exit 1
sed -i.orig -e 's#$exec_prefix/lib/cups#$libdir/cups#g' configure
./configure \
@@ -74,6 +85,17 @@ chmod 644 $PKG/etc/rc.d/rc.cups.new
# Clear out the additions:
rm -rf $PKG/etc/init.d $PKG/etc/rc{0,2,3,5}.d
+### OBSOLETE. The USB backend is patched to support usblp again. ###
+## From 1.4.x, CUPS no longer uses usblp, and having the module loaded
+## will interfere with USB printers. So, we will add a blacklist rule
+## so that the module is not loaded:
+#mkdir -p $PKG/etc/modprobe.d
+#cat << EOF > $PKG/etc/modprobe.d/cups.blacklist.usblp.conf.new
+## Do not load the kernel usblp module, since it interferes with
+## versions of CUPS 1.4.0 and newer:
+#blacklist usblp
+#EOF
+
# I'm not sure if overwriting this blindly could have ill effects,
# but it never hurts to play it safe. According to the dbus-daemon
# manpage, only files ending in .conf will be used, so there won't
@@ -110,6 +132,14 @@ cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG/usr/doc
ln -sf cups-$VERSION cups )
+# 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 CHANGES.txt ]; then
+ DOCSDIR=$(echo $PKG/usr/doc/*-$VERSION)
+ cat CHANGES.txt | head -n 1000 > $DOCSDIR/CHANGES.txt
+ touch -r CHANGES.txt $DOCSDIR/CHANGES.txt
+fi
+
# I'm sorry, but PDF files are almost as bloated and annoying as
# MS Word documents. We'll retain the HTML files in /usr/doc.
( cd $PKG/usr/doc