diff --git a/hplip-appdata.patch b/hplip-appdata.patch new file mode 100644 index 0000000..02ccf3f --- /dev/null +++ b/hplip-appdata.patch @@ -0,0 +1,19 @@ +diff -up hplip-3.17.4/hplip.desktop.in.appdata hplip-3.17.4/hplip.desktop.in +--- hplip-3.17.4/hplip.desktop.in.appdata 2017-04-12 08:36:29.000000000 +0200 ++++ hplip-3.17.4/hplip.desktop.in 2017-05-10 18:04:46.304186952 +0200 +@@ -1,11 +1,10 @@ + [Desktop Entry] + Encoding=UTF-8 + Type=Application +-Name=HP Device Manager +-GenericName=Printer Management Application +-Comment=View device status, ink levels and perform maintenance. +-Exec=hp-toolbox +-Icon=@abs_datadir@/hplip/data/images/128x128/hp_logo.png ++Name=HPLIP Graphical Tools ++GenericName=Printer Graphical Tools ++Comment=View device status, ink levels and perform maintenance etc. ++Icon=hp_logo + Terminal=false + Categories=Application;Utility; + X-KDE-StartupNotify=false diff --git a/hplip.appdata.xml b/hplip.appdata.xml new file mode 100644 index 0000000..9c0b711 --- /dev/null +++ b/hplip.appdata.xml @@ -0,0 +1,54 @@ + + + + HP-hplip.desktop + CC0-1.0 + GPL-2.0 and MIT and BSD-2-Clause + HPLIP Graphic Tools + HPLIP GUI tools and GUI part of other HPLIP tools + +

The HPLIP GUI subpackage provides graphic tools for the management of supported HP printers. These tools are not capable to run without graphical user interface, or they have unremoveable dependency on GUI modules.

+ +

This subpackage also provides GUI parts for tools shipped by the HPLIP base package:

+ +

The tools that do not need GUI for its functionality must be run with the '-i' option when the hplip-gui package is not installed.

+

The Launch button does not work because this subpackage is set of tools and it is not set which tool to launch from Gnome Software.

+
+ + + https://raw.githubusercontent.com/zdohnal/hplip/master/hplip1.png + + + https://raw.githubusercontent.com/zdohnal/hplip/master/hplip2.png + + + https://raw.githubusercontent.com/zdohnal/hplip/master/hplip3.png + + + http://hplipopensource.com/ + richard_at_hughsie.com +
diff --git a/hplip.spec b/hplip.spec index f299345..3fcda6a 100644 --- a/hplip.spec +++ b/hplip.spec @@ -13,13 +13,14 @@ Summary: HP Linux Imaging and Printing Project Name: hplip Version: 3.17.4 -Release: 2%{?dist} -License: GPLv2+ and MIT and BSD +Release: 3%{?dist} +License: GPLv2 and MIT and BSD Url: http://hplipopensource.com/ Source0: http://downloads.sourceforge.net/sourceforge/hplip/hplip-%{version}.tar.gz Source1: hpcups-update-ppds.sh Source2: copy-deviceids.py +Source3: %{name}.appdata.xml Patch1: hplip-pstotiff-is-rubbish.patch Patch2: hplip-strstr-const.patch Patch3: hplip-ui-optional.patch @@ -44,6 +45,7 @@ Patch22: hplip-no-write-bytecode.patch Patch23: hplip-silence-ioerror.patch Patch24: hplip-3165-sourceoption.patch Patch25: hplip-noernie.patch +Patch26: hplip-appdata.patch Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python3-pillow @@ -104,6 +106,7 @@ Libraries needed by HPLIP. %package gui Summary: HPLIP graphical tools License: BSD +BuildRequires: libappstream-glib Requires: python3-qt5 Requires: python3-reportlab # hpssd.py @@ -226,6 +229,9 @@ done # hplip license problem (bug #1364711) %patch25 -p1 -b .no-ernie +# hplip appdata +%patch26 -p1 -b .appdata + rm prnt/hpcups/ErnieFilter.{cpp,h} prnt/hpijs/ernieplatform.h sed -i.duplex-constraints \ @@ -285,8 +291,10 @@ rm -rf %{buildroot}%{_sysconfdir}/sane.d \ rm -f %{buildroot}%{_bindir}/hp-logcapture \ %{buildroot}%{_bindir}/hp-doctor \ + %{buildroot}%{_bindir}/hp-pqdiag \ %{buildroot}%{_datadir}/hplip/logcapture.py \ - %{buildroot}%{_datadir}/hplip/doctor.py + %{buildroot}%{_datadir}/hplip/doctor.py \ + %{buildroot}%{_datadir}/hplip/pqdiag.py rm -f %{buildroot}%{_bindir}/foomatic-rip \ %{buildroot}%{_libdir}/cups/filter/foomatic-rip \ @@ -300,17 +308,32 @@ rm -f %{buildroot}%{_bindir}/foomatic-rip \ %{buildroot}%{_datadir}/applications/hplip.desktop \ %{buildroot}%{_datadir}/ppd/HP/*.ppd +mkdir -p %{buildroot}%{_datadir}/appdata +cp %{SOURCE3} %{buildroot}%{_datadir}/appdata/ + +mkdir -p %{buildroot}%{_datadir}/icons/hicolor/{16x16,32x32,64x64}/apps +install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/16x16/hp_logo.png \ + %{buildroot}%{_datadir}/icons/hicolor/16x16/apps/hp_logo.png +install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/32x32/hp_logo.png \ + %{buildroot}%{_datadir}/icons/hicolor/32x32/apps/hp_logo.png +install -p -m644 %{buildroot}%{_datadir}/hplip/data/images/64x64/hp_logo.png \ + %{buildroot}%{_datadir}/icons/hicolor/64x64/apps/hp_logo.png + mkdir -p %{buildroot}%{_datadir}/applications sed -i -e '/^Categories=/d' hplip.desktop # Encoding key is deprecated sed -i -e '/^Encoding=/d' hplip.desktop +desktop-file-validate hplip.desktop + desktop-file-install --vendor HP \ - --dir %{buildroot}%{_datadir}/applications \ + --dir %{buildroot}/%{_datadir}/applications \ --add-category System \ --add-category Settings \ - --add-category HardwareSettings \ + --add-category HardwareSettings \ hplip.desktop +appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/*.appdata.xml + # Regenerate hpcups PPDs on upgrade if necessary (bug #579355). install -p -m755 %{SOURCE1} %{buildroot}%{_bindir}/hpcups-update-ppds @@ -341,6 +364,20 @@ rm -f %{buildroot}%{_unitdir}/hplip-printer@.service # window), so don't ship the launcher yet. rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop +%post gui +#touch --no-create %{_datadir}/icons/hicolor +#if [ -x /%{_bindir}/gtk-update-icon-cache ]; then +# gtk-update-icon-cache --ignore-theme-index -q %{_datadir}/icons/hicolor +#fi +update-desktop-database &> /dev/null ||: + +%postun gui +#touch --no-create %{_datadir}/icons/hicolor +#if [ -x /%{_bindir}/gtk-update-icon-cache ]; then +# gtk-update-icon-cache --ignore-theme-index -q %{_datadir}/icons/hicolor +#fi +update-desktop-database &> /dev/null ||: + %check %if "%{hpplugincheck}" == "1" wget -O hp-plugin.run %{urlplugin} @@ -362,20 +399,14 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_bindir}/hp-clean %{_bindir}/hp-colorcal %{_bindir}/hp-config_usb_printer -%{_bindir}/hp-devicesettings %{_bindir}/hp-diagnose_plugin %{_bindir}/hp-diagnose_queues %{_bindir}/hp-fab -%{_bindir}/hp-faxsetup %{_bindir}/hp-firmware %{_bindir}/hp-info %{_bindir}/hp-levels -%{_bindir}/hp-linefeedcal -%{_bindir}/hp-makecopies %{_bindir}/hp-makeuri %{_bindir}/hp-plugin -%{_bindir}/hp-pqdiag -%{_bindir}/hp-printsettings %{_bindir}/hp-probe %{_bindir}/hp-query %{_bindir}/hp-scan @@ -384,7 +415,6 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_bindir}/hp-testpage %{_bindir}/hp-timedate %{_bindir}/hp-unload -%{_bindir}/hp-wificonfig %{_cups_serverbin}/backend/hp %{_cups_serverbin}/backend/hpfax # ex-hpijs @@ -401,12 +431,10 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_datadir}/hplip/clean.py* %{_datadir}/hplip/colorcal.py* %{_datadir}/hplip/config_usb_printer.py* -%{_datadir}/hplip/devicesettings.py* %{_datadir}/hplip/diagnose_plugin.py* %{_datadir}/hplip/diagnose_queues.py* %{_datadir}/hplip/fab.py* %{_datadir}/hplip/fax -%{_datadir}/hplip/faxsetup.py* %{_datadir}/hplip/firmware.py* %{_datadir}/hplip/hpdio.py* %{_datadir}/hplip/hplip_clean.sh @@ -414,12 +442,8 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_datadir}/hplip/info.py* %{_datadir}/hplip/__init__.py* %{_datadir}/hplip/levels.py* -%{_datadir}/hplip/linefeedcal.py* -%{_datadir}/hplip/makecopies.py* %{_datadir}/hplip/makeuri.py* %{_datadir}/hplip/plugin.py* -%{_datadir}/hplip/pqdiag.py* -%{_datadir}/hplip/printsettings.py* %{_datadir}/hplip/probe.py* %{_datadir}/hplip/query.py* %{_datadir}/hplip/scan.py* @@ -428,7 +452,6 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %{_datadir}/hplip/testpage.py* %{_datadir}/hplip/timedate.py* %{_datadir}/hplip/unload.py* -%{_datadir}/hplip/wificonfig.py* # Directories %{_datadir}/hplip/base %{_datadir}/hplip/copier @@ -465,15 +488,29 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %files gui %{_bindir}/hp-check +%{_bindir}/hp-devicesettings +%{_bindir}/hp-faxsetup +%{_bindir}/hp-linefeedcal +%{_bindir}/hp-makecopies %{_bindir}/hp-print +%{_bindir}/hp-printsettings %{_bindir}/hp-systray %{_bindir}/hp-toolbox +%{_bindir}/hp-wificonfig %{_datadir}/applications/*.desktop +%{_datadir}/appdata/hplip.appdata.xml # Files +%{_datadir}/icons/hicolor/*/apps/* %{_datadir}/hplip/check.py* +%{_datadir}/hplip/devicesettings.py* +%{_datadir}/hplip/faxsetup.py* +%{_datadir}/hplip/linefeedcal.py* +%{_datadir}/hplip/makecopies.py* %{_datadir}/hplip/print.py* +%{_datadir}/hplip/printsettings.py* %{_datadir}/hplip/systray.py* %{_datadir}/hplip/toolbox.py* +%{_datadir}/hplip/wificonfig.py* # Directories %{_datadir}/hplip/data/images %{_datadir}/hplip/ui5 @@ -490,6 +527,9 @@ rm -f %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %postun libs -p /sbin/ldconfig %changelog +* Tue May 09 2017 Zdenek Dohnal - 3.17.4-3 +- added appdata.xml, several tools moved into gui subpackage because they don't have CLI variant and use only GUI, hp-pqdiag was removed because it is deprecated and not functional + * Wed Apr 26 2017 Zdenek Dohnal - 3.17.4-2 - 1440502 - hp 8610 Filter failed when trying to print on fedora 26 - redo hplip-noernie.patch