Accepting request 726787 from home:mwilck:branches:Printing

Compared to the previous sr#726248, added BuildIgnore directives to fix
building for the ppc64 and armv7l ports, and edited the (sub)package
descriptions some more.

- Moved hp-scan and hp-uiscan to a separate package "hp-scan".
  These tools pull in PIL and python3-scikit-image, which causes
  a rather big dependency list, which is only available in openSUSE.
  This allows us also to get rid of the non-functional "hp-scan" tool
  in SLE.
- Fixed --with-htmldir so that documentation is packaged
- Improved package descriptions and summaries
  * Clarified the relationship of hplip-hpijs, hplip-sane, and hplip
  * Shortened the descriptions
  * Removed reference to HTML documention in package description
- Added -devel dependencies as required by post-build-checks
- Minor spec file cleanup (macro usage)
- Fixed build failures on non-standard architectures by adding BuildIgnore
  These failures are actually caused by some ports catching up
  slowly with package updates. But our BuildIgnores are helpful
  nonetheless, making the build environment leaner.

OBS-URL: https://build.opensuse.org/request/show/726787
OBS-URL: https://build.opensuse.org/package/show/Printing/hplip?expand=0&rev=176
This commit is contained in:
Martin Wilck 2019-08-28 15:49:07 +00:00 committed by Git OBS Bridge
parent bdd091a4b0
commit 45c4931079
2 changed files with 131 additions and 80 deletions

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Tue Aug 27 10:48:46 UTC 2019 - Martin Wilck <mwilck@suse.com>
- Moved hp-scan and hp-uiscan to a separate package "hp-scan".
These tools pull in PIL and python3-scikit-image, which causes
a rather big dependency list, which is only available in openSUSE.
This allows us also to get rid of the non-functional "hp-scan" tool
in SLE.
- Fixed --with-htmldir so that documentation is packaged
- Improved package descriptions and summaries
* Clarified the relationship of hplip-hpijs, hplip-sane, and hplip
* Shortened the descriptions
* Removed reference to HTML documention in package description
- Added -devel dependencies as required by post-build-checks
- Minor spec file cleanup (macro usage)
- Fixed build failures on non-standard architectures by adding BuildIgnore
These failures are actually caused by some ports catching up
slowly with package updates. But our BuildIgnores are helpful
nonetheless, making the build environment leaner.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Aug 12 12:53:35 UTC 2019 - Johannes Weberhofer <jweberhofer@weberhofer.at> Mon Aug 12 12:53:35 UTC 2019 - Johannes Weberhofer <jweberhofer@weberhofer.at>

View File

@ -16,6 +16,8 @@
# #
# python-rpm-macros doesn't work for hplip!
# we don't build both py2 and py3, just one
%if 0%{?suse_version} >= 1500 %if 0%{?suse_version} >= 1500
%define pyversion 3 %define pyversion 3
%define pymod() python3-%{**} %define pymod() python3-%{**}
@ -101,7 +103,6 @@ Patch303: photocard-fix-import-error-for-pcardext.patch
Patch400: hplip-remove-imageprocessor.diff Patch400: hplip-remove-imageprocessor.diff
# Let a function return NULL instead of nothing # Let a function return NULL instead of nothing
Patch401: hplip-orblite-return-null.diff Patch401: hplip-orblite-return-null.diff
# BuildRequires: python-rpm-macros
# All printer driver packages should have "BuildRequires: python-cups" # All printer driver packages should have "BuildRequires: python-cups"
# because python-cups installs special rpm macros that adds Provides tags # because python-cups installs special rpm macros that adds Provides tags
# for the printer drivers supported by the package, # for the printer drivers supported by the package,
@ -169,11 +170,22 @@ Obsoletes: hplip17
# Obsolete the hplip3 copy that was introduced for older SLED11-GA HP preloads: # Obsolete the hplip3 copy that was introduced for older SLED11-GA HP preloads:
Provides: hplip3 = 3.9.5 Provides: hplip3 = 3.9.5
Obsoletes: hplip3 < 3.9.5 Obsoletes: hplip3 < 3.9.5
# Break this dependency chain that has caused build breakage
# python3-qt5-devel -> libqt5-qttools-devel -> libqt5-qttools-doc -> clang8
#!BuildIgnore: libqt5-qttools-devel
#!BuildIgnore: libclang8
#!BuildIgnore: clang8
# Break this dependency chain that has caused build breakage
# python3-qt5-devel -> libqt5-qtwebengine-devel -> libavcodec58 -> libdav1d.so.1
#!BuildIgnore: libqt5-qtwebengine-devel
#!BuildIgnore: libqt5-qtwebengine
%if %use_qt5 %if %use_qt5
BuildRequires: %{pymod qt5-devel} BuildRequires: %{pymod qt5-devel}
%global ui_dir ui5
%else %else
BuildRequires: %{pymod qt4} BuildRequires: %{pymod qt4}
BuildRequires: libqt4-devel BuildRequires: libqt4-devel
%global ui_dir ui4
%endif %endif
# Since version 2.8.4 all interprocess communication uses dbus. # Since version 2.8.4 all interprocess communication uses dbus.
# Therefore python-dbus version 0.80 or greater is required (which pulls in dbus base stuff). # Therefore python-dbus version 0.80 or greater is required (which pulls in dbus base stuff).
@ -185,10 +197,6 @@ Requires: dbus-1-python3 >= 0.80
%else %else
Requires: dbus-1-python >= 0.80 Requires: dbus-1-python >= 0.80
%endif %endif
# SLE does not provide python-pillow (PIL) (bsc#1131613)
%if 0%{?is_opensuse}
Requires: %{pymod Pillow}
%endif
%if %use_qt5 %if %use_qt5
Requires: %{pymod qt5} Requires: %{pymod qt5}
%else %else
@ -241,39 +249,16 @@ BuildRequires: sane-backends
%description %description
The Hewlett-Packard Linux Imaging and Printing project (HPLIP) provides The Hewlett-Packard Linux Imaging and Printing project (HPLIP) provides
a unified single and multifunction connectivity solution for HP a unified single and multifunction connectivity solution for HP
printers and scanners (in particular, HP all-in-one devices). printers, scanners, and all-in-one devices.
HPLIP provides unified connectivity for printing, scanning, sending This package contains command line and UI front-ends for HPLIP, and tools
faxes, photo card access, and device management and is designed to work for extra functionality such as status and supply information. It is
with CUPS. not required for basic printing and scanning with HP hardware, except
for those devices that need the proprietary hplip plugin, see
It includes the Ghostscript printer driver HPIJS for HP printers and a https://developers.hp.com/hp-linux-imaging-and-printing/binary_plugin.html
special "hp" CUPS back-end that provides bidirectional communication
with the device (required for HP printer device management).
It also includes the SANE scanner driver "hpaio" for HP all-in-one
devices. Basic PC send fax functionality is supported on a number of
devices.
The special "hpfax" CUPS back-end is required to send faxes. Direct
uploading (i.e. without print and scan) of received faxes from the
device to the PC is not supported.
The "hp-toolbox" program is provided for device management.
The "hp-sendfax" program must be used to send faxes.
The "hp-setup" program can be used to set up HP all-in-one devices.
The HPLIP project is open source software and uses GPL-compatible
licenses. For more information, see:
http://hplipopensource.com
%{_docdir}/hplip/index.html
%package hpijs %package hpijs
Summary: Only plain printing with HPLIP printer drivers Summary: Printer drivers for HP printers and all-in-one devices
# On a minimalist system only hplip-hpijs may be installed # On a minimalist system only hplip-hpijs may be installed
# or on a minimalist package repository (e.g. on the openSUSE CDs) # or on a minimalist package repository (e.g. on the openSUSE CDs)
# only hplip-hpijs may be available (even when a usual system is installed). # only hplip-hpijs may be available (even when a usual system is installed).
@ -324,36 +309,19 @@ Obsoletes: hplip3-hpijs < 3.9.5
Obsoletes: hplip-hpcups Obsoletes: hplip-hpcups
%description hpijs %description hpijs
HPIJS is HPLIP's Ghostscript printer driver for HP printers. This package contains the backend drivers and PPDs for printing
with HP printers using CUPS.
HPCUPS is HPLIP's native CUPS printer driver for HP printers. HPCUPS is HPLIP's native CUPS printer driver for HP printers.
HPIJS (deprecated) is HPLIP's Ghostscript printer driver for
HP printers, and only used for some Fax devices nowadays.
This sub-package includes only what is needed for plain printing Install the "hplip" package if you need the proprietary HP plugin
with the printer drivers in HPLIP for standard HP printers. required by some devices, or additional functionality besides plain
printing.
It does neither provide device status information,
nor support for scanning, nor support for faxing,
nor support for memory card (mass storage) access,
nor support for non-standard devices e.g. no support
for devices which require an additional plugin from HP.
This sub-package includes in particular:
The hpijs binary and the libraries libhpip and libhpmud
which are needed to run it.
The HPCUPS driver (%{_prefix}/lib[64]/cups/filter/hpcups).
The CUPS backend "hp".
All HPLIP PPD files (also for HP PostScript printers).
For the full-featured HPLIP printing and scanning solution,
the main-package package hplip must be installed.
For full documentation and license see the main-package hplip.
%package sane %package sane
Summary: Only plain scanning with HPLIP scan drivers Summary: SANE backends for HP scanners and all-in-one devices
# Require the exact matching version-release of the hpijs sub-package to make sure # Require the exact matching version-release of the hpijs sub-package to make sure
# to have the exact matching version of libhpip and libhpmud installed. # to have the exact matching version of libhpip and libhpmud installed.
# A wrong library version may let libsane-hpaio crash (e.g. segfault) # A wrong library version may let libsane-hpaio crash (e.g. segfault)
@ -369,8 +337,26 @@ Enhances: sane-backends
Supplements: (%{name}-hpijs and sane-backends) Supplements: (%{name}-hpijs and sane-backends)
%description sane %description sane
This sub-package includes only what is needed for plain scanning This package includes the backend driver for scanning with HP scanners
with the scan drivers in HPLIP for standard HP all-in-one printers. and all-in-one devices using SANE tools like xsane or scanimage.
%package scan
Summary: HPLIP scanning frontends hp-scan and hp-uiscan
# SLE does not provide python-pillow (PIL) (bsc#1131613)
Group: Hardware/Scanner
%if 0%{?is_opensuse}
Requires: %{pymod Pillow}
Requires: hplip
# hp-scan et al. import skimage from the scikit-image package.
# It is pretty heavy-weight and pulls in various other packages.
Requires: %{pymod scikit-image}
Enhances: hplip
%endif
%description scan
This package provides the "hp-scan" and "hp-uiscan" frontend utilities. These
utilities are alternatives to the SANE frontends "xsane" and "scanimage". They
expose some advanced features of certain HP scanner models.
%package devel %package devel
Summary: Development files for hplip Summary: Development files for hplip
@ -381,6 +367,11 @@ Requires: %{name}-hpijs = %{version}-%{release}
# Require the exact matching version-release of the sane sub-package to make sure # Require the exact matching version-release of the sane sub-package to make sure
# to have the exact matching version of libsane-hpaio installed: # to have the exact matching version of libsane-hpaio installed:
Requires: %{name}-sane = %{version}-%{release} Requires: %{name}-sane = %{version}-%{release}
Requires: cups-devel
Requires: dbus-1-devel
Requires: libopenssl-devel
Requires: libusb-1_0-devel
Requires: net-snmp-devel
%description devel %description devel
This sub-package is only required by developers. This sub-package is only required by developers.
@ -479,14 +470,33 @@ export CXXFLAGS="%{optflags} -fno-strict-aliasing -Wno-error=return-type"
--with-drvdir=%{_libexecdir}/cups/driver \ --with-drvdir=%{_libexecdir}/cups/driver \
--with-mimedir=%{_sysconfdir}/cups \ --with-mimedir=%{_sysconfdir}/cups \
--with-docdir=%{_defaultdocdir}/%{name} \ --with-docdir=%{_defaultdocdir}/%{name} \
--with-htmldir==%{_defaultdocdir}/%{name} \ --with-htmldir=%{_defaultdocdir}/%{name} \
CFLAGS='%{optflags} -Wno-error=return-type' \ CFLAGS='%{optflags} -Wno-error=return-type' \
PYTHON=%{pyexe} PYTHON=%{pyexe}
%make_build %make_build
sed -i 's|ppd/hpcups/\*.ppd.gz ||g' Makefile sed -i 's|ppd/hpcups/\*.ppd.gz ||g' Makefile
%install %install
make DESTDIR=%{buildroot} install %make_install
# SLE does not provide python-pillow (PIL) (bsc#1131613) and thus has no hp-scan
# and related library code.
# We can't use --disable-scan-build, as that would disable the SANE
# backend, too.
# On openSUSE, these files go into the hplip-scan package (see below).
# Remove these before running pyX_compile
%if !0%{?is_opensuse}
rm -f %{buildroot}%{_datadir}/hplip/scan.py \
%{buildroot}%{_datadir}/hplip/uiscan.py \
%{buildroot}%{_datadir}/hplip/base/imageprocessing.py \
%{buildroot}%{_datadir}/hplip/%{ui_dir}/scandialog.py \
%{buildroot}%{_bindir}/hp-scan \
%{buildroot}%{_bindir}/hp-uiscan \
%{buildroot}%{_datadir}/applications/hp-uiscan.desktop \
%{buildroot}%{_libdir}/python%{pyver}/site-packages/scanext.*
rm -rf %{buildroot}%{_datadir}/hplip/scan
%endif
# Make and install Python compiled bytecode files # Make and install Python compiled bytecode files
# (.pyc compiled python and .pyo optimized compiled python) # (.pyc compiled python and .pyo optimized compiled python)
# because normal users do not have write permissions # because normal users do not have write permissions
@ -647,7 +657,10 @@ set -x
popd popd
# Replace the invalid Desktop categories # Replace the invalid Desktop categories
%suse_update_desktop_file -r %{buildroot}%{_datadir}/applications/hplip.desktop System HardwareSettings %suse_update_desktop_file -r %{buildroot}%{_datadir}/applications/hplip.desktop System HardwareSettings
%if 0%{?is_opensuse}
%suse_update_desktop_file -r %{buildroot}%{_datadir}/applications/hp-uiscan.desktop System HardwareSettings %suse_update_desktop_file -r %{buildroot}%{_datadir}/applications/hp-uiscan.desktop System HardwareSettings
%endif
# Let suse_update_desktop_file add X-SuSE-translate key to /etc/xdg/autostart/hplip-systray.desktop # Let suse_update_desktop_file add X-SuSE-translate key to /etc/xdg/autostart/hplip-systray.desktop
# so that we can update its translations with translation-only packages. # so that we can update its translations with translation-only packages.
%suse_update_desktop_file -i %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop %suse_update_desktop_file -i %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
@ -656,17 +669,6 @@ popd
install -d %{buildroot}%{_mandir}/man1 install -d %{buildroot}%{_mandir}/man1
install -m 644 %{SOURCE102} %{buildroot}%{_mandir}/man1/ install -m 644 %{SOURCE102} %{buildroot}%{_mandir}/man1/
# SLE does not provide python-pillow (PIL) (bsc#1131613)
%if !0%{?is_opensuse}
rm -f %{buildroot}%{_datadir}/hplip/scan.py %{buildroot}%{_bindir}/hp-scan
cat >%{buildroot}%{_bindir}/hp-scan <<EOF
#! /bin/sh
echo 'Please use "scanimage" from the "sane-backends" package instead.' >&2
exit 1
EOF
chmod a+x %{buildroot}%{_bindir}/hp-scan
%endif
# Run fdupes: # Run fdupes:
# The RPM macro fdupes runs /usr/bin/fdupes that links files with identical content. # The RPM macro fdupes runs /usr/bin/fdupes that links files with identical content.
# Never run fdupes carelessly over the whole buildroot directory # Never run fdupes carelessly over the whole buildroot directory
@ -769,14 +771,12 @@ exit 0
%{_bindir}/hp-printsettings %{_bindir}/hp-printsettings
%{_bindir}/hp-probe %{_bindir}/hp-probe
%{_bindir}/hp-query %{_bindir}/hp-query
%{_bindir}/hp-scan
%{_bindir}/hp-sendfax %{_bindir}/hp-sendfax
%{_bindir}/hp-setup %{_bindir}/hp-setup
%{_bindir}/hp-systray %{_bindir}/hp-systray
%{_bindir}/hp-testpage %{_bindir}/hp-testpage
%{_bindir}/hp-timedate %{_bindir}/hp-timedate
%{_bindir}/hp-toolbox %{_bindir}/hp-toolbox
%{_bindir}/hp-uiscan
%{_bindir}/hp-uninstall %{_bindir}/hp-uninstall
%{_bindir}/hp-unload %{_bindir}/hp-unload
%{_bindir}/hp-upgrade %{_bindir}/hp-upgrade
@ -784,7 +784,6 @@ exit 0
%{_libdir}/python%{pyver}/site-packages/cupsext.* %{_libdir}/python%{pyver}/site-packages/cupsext.*
%{_libdir}/python%{pyver}/site-packages/hpmudext.* %{_libdir}/python%{pyver}/site-packages/hpmudext.*
%{_libdir}/python%{pyver}/site-packages/pcardext.* %{_libdir}/python%{pyver}/site-packages/pcardext.*
%{_libdir}/python%{pyver}/site-packages/scanext.*
%dir %{_libexecdir}/cups %dir %{_libexecdir}/cups
%dir %{_libexecdir}/cups/backend %dir %{_libexecdir}/cups/backend
%{_libexecdir}/cups/backend/hpfax %{_libexecdir}/cups/backend/hpfax
@ -797,9 +796,41 @@ exit 0
%{_datadir}/cups/model/manufacturer-PPDs/%{name}-plugin/ %{_datadir}/cups/model/manufacturer-PPDs/%{name}-plugin/
%doc %{_defaultdocdir}/%{name}/ %doc %{_defaultdocdir}/%{name}/
%{_datadir}/applications/%{name}.desktop %{_datadir}/applications/%{name}.desktop
%{_datadir}/applications/hp-uiscan.desktop
%{_datadir}/hplip/ %{_datadir}/hplip/
%exclude %{_datadir}/hplip/data/models/models.dat %exclude %{_datadir}/hplip/data/models/models.dat
%exclude %{_datadir}/hplip/base/imageprocessing.py*
%exclude %{_datadir}/hplip/%{ui_dir}/scandialog.py*
%exclude %{_datadir}/hplip/scan
%exclude %{_datadir}/hplip/scan.py*
%exclude %{_datadir}/hplip/uiscan.py*
%if %{pyversion} != 2
%exclude %{_datadir}/hplip/__pycache__/uiscan.*
%exclude %{_datadir}/hplip/__pycache__/scan.*
%exclude %{_datadir}/hplip/base/__pycache__/imageprocessing.*
%exclude %{_datadir}/hplip/%{ui_dir}/__pycache__/scandialog.*
%endif
# The scanning utils depend on PIL and python3-scikit-image,
# which are not available in SLE
%if 0%{?is_opensuse}
%files scan
%defattr(-, root, root)
%{_datadir}/applications/hp-uiscan.desktop
%{_libdir}/python%{pyver}/site-packages/scanext.*
%{_bindir}/hp-scan
%{_bindir}/hp-uiscan
%{_datadir}/hplip/scan
%{_datadir}/hplip/scan.py*
%{_datadir}/hplip/uiscan.py*
%{_datadir}/hplip/base/imageprocessing.py*
%{_datadir}/hplip/%{ui_dir}/scandialog.py*
%if %{pyversion} != 2
%{_datadir}/hplip/__pycache__/uiscan.*
%{_datadir}/hplip/__pycache__/scan.*
%{_datadir}/hplip/base/__pycache__/imageprocessing.*
%{_datadir}/hplip/%{ui_dir}/__pycache__/scandialog.*
%endif
%endif
%files hpijs %files hpijs
%defattr(-, root, root) %defattr(-, root, root)