summaryrefslogtreecommitdiffstats
path: root/source/ap/hplip
diff options
context:
space:
mode:
Diffstat (limited to 'source/ap/hplip')
-rw-r--r--source/ap/hplip/hplip.56-hpmud.background.diff11
-rwxr-xr-xsource/ap/hplip/hplip.SlackBuild8
-rw-r--r--source/ap/hplip/hplip.no.upgrade.diff16
3 files changed, 34 insertions, 1 deletions
diff --git a/source/ap/hplip/hplip.56-hpmud.background.diff b/source/ap/hplip/hplip.56-hpmud.background.diff
new file mode 100644
index 000000000..5684687b6
--- /dev/null
+++ b/source/ap/hplip/hplip.56-hpmud.background.diff
@@ -0,0 +1,11 @@
+--- ./data/rules/56-hpmud.rules.orig 2013-08-07 01:02:33.000000000 -0500
++++ ./data/rules/56-hpmud.rules 2013-08-25 14:46:44.223976578 -0500
+@@ -12,7 +12,7 @@
+
+
+ # This rule will add the printer and install plugin
+-ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} ; fi'"
++ENV{hp_test}=="yes", PROGRAM="/bin/sh -c 'logger -p user.info loading HP Device $env{BUSNUM} $env{DEVNUM}'", RUN+="/bin/sh -c 'if [ -f /usr/bin/systemctl ]; then /usr/bin/systemctl --no-block start hplip-printer@$env{BUSNUM}:$env{DEVNUM}.service; else /usr/bin/nohup /usr/bin/hp-config_usb_printer $env{BUSNUM}:$env{DEVNUM} & ; fi'"
+
+ # If sane-bankends is installed add hpaio backend support to dll.conf if needed.
+ ENV{sane_hpaio}=="yes", RUN+="/bin/sh -c 'grep -q ^#hpaio /etc/sane.d/dll.conf;if [ $$? -eq 0 ];then sed -i -e s/^#hpaio/hpaio/ /etc/sane.d/dll.conf;else grep -q ^hpaio /etc/sane.d/dll.conf;if [ $$? -ne 0 ];then echo hpaio >>/etc/sane.d/dll.conf;fi;fi'"
diff --git a/source/ap/hplip/hplip.SlackBuild b/source/ap/hplip/hplip.SlackBuild
index b85e79146..08a62d885 100755
--- a/source/ap/hplip/hplip.SlackBuild
+++ b/source/ap/hplip/hplip.SlackBuild
@@ -3,7 +3,7 @@
# Slackware build script for hplip
# Copyright 2006-2010 Robby Workman, Northport, Alabama, USA
-# Copyright 2006-2011 Patrick J. Volkerding, Sebeka, MN, USA
+# Copyright 2006-2013 Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -65,6 +65,11 @@ rm -rf $PKGNAM-$VERSION
tar xvf $CWD/$PKGNAM-$VERSION.tar.?z* || exit 1
cd $PKGNAM-$VERSION || exit 1
+zcat $CWD/hplip.no.upgrade.diff.gz | patch -p1 --verbose || exit 1
+# Upstream added nohup to the rule, but didn't background with '&'.
+# Fix this to prevent a startup delay:
+zcat $CWD/hplip.56-hpmud.background.diff.gz | patch -p1 --verbose || exit 1
+
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -101,6 +106,7 @@ CXXFLAGS="$SLKCFLAGS" \
--enable-network-build=yes \
--enable-qt4 \
--enable-policykit \
+ --enable-cups-ppd-install \
--build=$ARCH-slackware-linux \
--host=$ARCH-slackware-linux \
|| exit 1
diff --git a/source/ap/hplip/hplip.no.upgrade.diff b/source/ap/hplip/hplip.no.upgrade.diff
new file mode 100644
index 000000000..ebb1743c6
--- /dev/null
+++ b/source/ap/hplip/hplip.no.upgrade.diff
@@ -0,0 +1,16 @@
+--- ./upgrade.py.orig 2013-03-08 01:15:32.000000000 -0600
++++ ./upgrade.py 2013-03-19 23:41:06.360870795 -0500
+@@ -214,6 +214,13 @@
+ try:
+ change_spinner_state(False)
+ core = CoreInstall(MODE_CHECK)
++
++ # To reenable upgrade in Slackware (although it probably won't work),
++ # delete the following 3 lines:
++ log.info("HPLIP upgrade function is disabled in Slackware.")
++ log.info("Not attempting to download upgrades.")
++ clean_exit(0)
++
+ if not utils.check_network_connection():
+ log.error("Either Internet is not working or Wget is not installed.")
+ clean_exit(0)