diff --git a/hp-systray.wrapper b/hp-systray.wrapper new file mode 100644 index 0000000..801693f --- /dev/null +++ b/hp-systray.wrapper @@ -0,0 +1,5 @@ +#! /bin/bash + +# If lpstat fails or if hp-systray is not installed or whatever, exit silently: +lpstat -h localhost -v | cut -d ' ' -f 4 | grep -q '^hp:/' && hp-systray || exit 0 + diff --git a/hpijs-standalone.spec b/hpijs-standalone.spec index ab54e33..6243009 100644 --- a/hpijs-standalone.spec +++ b/hpijs-standalone.spec @@ -18,7 +18,7 @@ Summary: HPIJS stand-alone # x.y.m : x = major release number, y = year (eg: 6 = 2006), m = month (eg: 6a = second release in June) # Official releases have a 3 digit number and release candidates have a 4 digit number: x.y.m.rc Version: 2.8.4 -Release: 1 +Release: 4 Group: Hardware/Printing License: BSD 3-Clause Url: http://hpinkjet.sourceforge.net/ diff --git a/hplip.changes b/hplip.changes index 3223549..92cb8ca 100644 --- a/hplip.changes +++ b/hplip.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Tue Apr 8 14:56:53 CEST 2008 - jsmeix@suse.de + +- Added hp-systray.wrapper which is a wrapper for hp-systray + which runs it only if there is a 'hp:/...' print queue + and changed /etc/xdg/autostart/hplip-systray.desktop + to run the wrapper, see Novell/Suse Bugzilla bnc#377885. + ------------------------------------------------------------------- Thu Apr 3 15:59:09 CEST 2008 - jsmeix@suse.de diff --git a/hplip.spec b/hplip.spec index 4dea273..c3d1aea 100644 --- a/hplip.spec +++ b/hplip.spec @@ -18,7 +18,7 @@ Summary: HP's Printing, Scanning, and Faxing Software # x.y.m : x = major release number, y = year (eg: 6 = 2006), m = month (eg: 6a = second release in June) # Official releases have a 3 digit number and release candidates have a 4 digit number: x.y.m.rc Version: 2.8.4 -Release: 1 +Release: 4 Group: Hardware/Printing License: BSD 3-Clause; GPL v2 or later; X11/MIT Url: http://hpinkjet.sourceforge.net/ @@ -34,7 +34,7 @@ Patch10: fix-uninitialized-variables.diff # It is found automatically in $RPM_SOURCE_DIR by 'suse_update_desktop_file -i hplip': Source100: %{name}.desktop # Source101 is a wrapper for hp-toolbox which shows meaningful error messages even under X. -# hp-toolbox.wrapper is called via hplip.desktop. +# hp-toolbox.wrapper is called via hplip.desktop: Source101: hp-toolbox.wrapper # Source102 is a small man page for /usr/bin/hpijs: Source102: hpijs.1.gz @@ -46,6 +46,9 @@ Source102: hpijs.1.gz Source103: rchplip # Script which outputs a global HAL fdi file for all HP USB devices which belong to HPLIP: Source104: create_hal_global_fdi_from_hpmud_rules +# Source105 is a wrapper for hp-systray which runs it only if there is a 'hp:/...' print queue. +# hp-systray.wrapper is called via /etc/xdg/autostart/hplip-systray.desktop: +Source105: hp-systray.wrapper # Patch100... is for special Suse patches: # Patch101 changes in the udev rules file the mode from "0666" to "0664" # and for parallel port devices the owner from "lp" to "root" to avoid @@ -288,6 +291,10 @@ install -m644 70-hpmud.fdi %{buildroot}%{_sysconfdir}/hal/fdi/policy/10osvendor/ # Desktop menue entry stuff: # Install the wrapper for hp-toolbox: install -m 755 %{SOURCE101} %{buildroot}%{_bindir}/hp-toolbox.wrapper +# Install the wrapper for hp-systray: +install -m 755 %{SOURCE105} %{buildroot}%{_bindir}/hp-systray.wrapper +# Modify the installed etc/xdg/autostart/hplip-systray.desktop to run hp-systray.wrapper: +sed -i -e 's/Exec=hp-systray/Exec=hp-systray.wrapper/' %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop # Install /usr/share/hplip/data/images/48x48/prog.png as desktop icon file # because it is used in the hplip.desktop.in and hplip-systray.desktop.in sources: install -d %{buildroot}%{_datadir}/pixmaps @@ -423,6 +430,7 @@ exit 0 %{_datadir}/cups/model/manufacturer-PPDs/%{name}/ %doc %{_defaultdocdir}/%{name}/ %{_bindir}/hp-toolbox.wrapper +%{_bindir}/hp-systray.wrapper %{_datadir}/pixmaps/HPmenu.png %{_datadir}/applications/%{name}.desktop @@ -435,6 +443,11 @@ exit 0 %{_libdir}/libhpmud.* %changelog +* Tue Apr 08 2008 jsmeix@suse.de +- Added hp-systray.wrapper which is a wrapper for hp-systray + which runs it only if there is a 'hp:/...' print queue + and changed /etc/xdg/autostart/hplip-systray.desktop + to run the wrapper, see Novell/Suse Bugzilla bnc#377885. * Thu Apr 03 2008 jsmeix@suse.de - Updated to version 2.8.4: Elimination of all persistent startup daemons.