Accepting request 288078 from home:jsmeix:branches:Printing
Make it again build correctly for released openSUSE versions and for SLE11 (boo#918387) OBS-URL: https://build.opensuse.org/request/show/288078 OBS-URL: https://build.opensuse.org/package/show/Printing/hplip?expand=0&rev=111
This commit is contained in:
parent
6b94d90859
commit
6df7276a61
@ -1,3 +1,33 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 27 11:45:02 CET 2015 - jsmeix@suse.de
|
||||
|
||||
- HPLIP's Python module cupsext has a build-time dependancy on the
|
||||
CUPS version (see https://bugs.launchpad.net/hplip/+bug/1423220).
|
||||
Therefore it BuildRequires the CUPS version as provided in the
|
||||
openSUSE/SLE versions. When it was built with CUPS > 1.5 it must
|
||||
require CUPS > 1.5 during run-time. In contrast when it was built
|
||||
with CUPS < 1.6 then cupsext is built in a backward compatible
|
||||
way that works with any CUPS version.
|
||||
This replaces the "minimal version requirement on cups" from the
|
||||
entry below dated "Thu Feb 19 12:05:05 UTC 2015" and obsoletes
|
||||
the "Kill sle11 support" from the previous entry so that HPLIP
|
||||
should work again for SLE11 SLE12 and recent openSUSE versions
|
||||
(boo#918387).
|
||||
- Again BuildRequires sane-backends-devel if suse_version > 1130
|
||||
and BuildRequires sane-backends otherwise that was removed via
|
||||
one of the previous entries to make it again build for SLE11.
|
||||
- Run udev_rules_update that BuildRequires systemd-rpm-macros
|
||||
only if suse_version > 1130 to make it again build for SLE11.
|
||||
- For SLE11 redefine _libexecdir to be "/usr/lib" in any case
|
||||
because on SLE11 x86_64 it evaluates to "/usr/lib64" which
|
||||
is wrong in particular for CUPS filters and backends, cf.
|
||||
https://bugzilla.opensuse.org/show_bug.cgi?id=575544#c2
|
||||
- Again using the RPM scriplets as in previous versions with
|
||||
its various suse_version dependant stuff to make it again
|
||||
build for SLE11.
|
||||
- Using '-p /bin/bash' in RPM scriplets to enforce bash
|
||||
to be fail safe against issue with possible bashisms.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 19 12:30:19 UTC 2015 - tchvatal@suse.com
|
||||
|
||||
|
76
hplip.spec
76
hplip.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package hplip
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -81,8 +81,33 @@ Patch104: do_not_open_mdns_port.diff
|
||||
Patch106: disable_hp-upgrade.patch
|
||||
# PATCH-FIX-SUSE: use proper udev rulesdir which is in usr not in /etc
|
||||
Patch107: hplip-udev-rules-in-usr.patch
|
||||
BuildRequires: cups >= 1.7
|
||||
BuildRequires: cups-devel
|
||||
# HPLIP's Python module cupsext.so has a build-time dependancy on the CUPS version:
|
||||
# It needs symbols (like ippFirstAttribute, ippNextAttribute, ippSetOperation etc)
|
||||
# that are defined only in libcups.so version > 1.5. For backward compatibility
|
||||
# cupsext.c has a macro (CUPS_VERSION_1_6) which defines those undefined function names
|
||||
# if CUPS version is <= 1.5. To check the CUPS version the CUPS_VERSION_MAJOR, CUPS_VERSION_MINOR
|
||||
# macros from cups/cups.h are used which means it depends on the CUPS version during build-time
|
||||
# whether or not cupsext will work with CUPS <= 1.5 at run-time.
|
||||
# See https://bugs.launchpad.net/hplip/+bug/1423220
|
||||
# and https://bugzilla.opensuse.org/show_bug.cgi?id=918387
|
||||
# Therefore it BuildRequires the CUPS version as provided in the openSUSE/SLE versions.
|
||||
# Up to openSUSE 13.2 and SLE11 CUPS < 1.6 is provided (from CUPS 1.3.9 for SLE11 up to CUPS 1.5.4 for openSUSE 13.2).
|
||||
# For SLE12 by default CUPS 1.7.5 is provided and alternatively CUPS 1.5.4 is provided in the "legacy" module.
|
||||
# After openSUSE 13.2 (i.e. for current openSUSE Factory) CUPS 2.0 is provided.
|
||||
# Up to openSUSE 13.2 and SLE12 it BuildRequires CUPS < 1.6 to ensure it even works on SLE12 with CUPS 1.5.4.
|
||||
# When it was built with CUPS > 1.5 it must also require CUPS > 1.5 during run-time.
|
||||
# In contrast when it was built with CUPS < 1.6 there must not be a run-time requirement
|
||||
# for a CUPS version to ensure it works on SLE12 both with CUPS 1.7.5 and CUPS 1.5.4.
|
||||
# For suse_version values see https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
|
||||
%if 0%{?suse_version} > 1320
|
||||
BuildRequires: cups > 1.5
|
||||
BuildRequires: cups-devel > 1.5
|
||||
Requires: cups > 1.5
|
||||
%else
|
||||
BuildRequires: cups < 1.6
|
||||
BuildRequires: cups-devel < 1.6
|
||||
Requires: cups
|
||||
%endif
|
||||
BuildRequires: dbus-1-devel
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: hicolor-icon-theme
|
||||
@ -104,9 +129,22 @@ BuildRequires: python-openssl
|
||||
BuildRequires: python-qt4
|
||||
BuildRequires: python-xml
|
||||
BuildRequires: readline-devel
|
||||
%if 0%{?suse_version} > 1130
|
||||
BuildRequires: sane-backends-devel
|
||||
%else
|
||||
BuildRequires: sane-backends
|
||||
%endif
|
||||
# For udev macros
|
||||
%if 0%{?suse_version} > 1130
|
||||
BuildRequires: systemd-rpm-macros
|
||||
%else
|
||||
# For older suse_version (in particular for SLE11) define needed udev macros manually:
|
||||
%{!?_udevrulesdir: %global _udevrulesdir /usr/lib/udev/rules.d }
|
||||
%endif
|
||||
%if 0%{?suse_version} == 1110
|
||||
# For SLE11 redefine _libexecdir because on SLE11 _libexecdir is "/usr/lib64":
|
||||
%global _libexecdir /usr/lib
|
||||
%endif
|
||||
BuildRequires: update-desktop-files
|
||||
# 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.
|
||||
@ -585,14 +623,22 @@ install -m 644 %{SOURCE102} %{buildroot}%{_mandir}/man1/
|
||||
# so that fdupes can only run for specific directories where linking files is safe:
|
||||
%fdupes -s %{buildroot}%{_datadir}/hplip/data/images
|
||||
|
||||
%post
|
||||
%post -p /bin/bash
|
||||
%if 0%{?suse_version} > 1130
|
||||
%udev_rules_update
|
||||
%endif
|
||||
%if 0%{?suse_version} >= 1140
|
||||
%desktop_database_post
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1130
|
||||
%icon_theme_cache_post
|
||||
%else
|
||||
gtk-update-icon-cache %{_datadir}/icons/hicolor || true
|
||||
%endif
|
||||
/sbin/ldconfig
|
||||
exit 0
|
||||
|
||||
%triggerin -- sane-backends
|
||||
%triggerin -p /bin/bash -- sane-backends
|
||||
# As hplip can be used for plain printers it cannot "PreReq sane-backends".
|
||||
# Therefore if sane-backends is installed it may be installed or updated after hplip.
|
||||
# In this case trigger to add the SANE backend "hpaio" to /etc/sane.d/dll.conf if it is not there.
|
||||
@ -604,9 +650,15 @@ then if ! grep -q 'hpaio' %{_sysconfdir}/sane.d/dll.conf
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%postun
|
||||
%postun -p /bin/bash
|
||||
%if 0%{?suse_version} >= 1140
|
||||
%desktop_database_postun
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1130
|
||||
%icon_theme_cache_postun
|
||||
%else
|
||||
gtk-update-icon-cache %{_datadir}/icons/hicolor || true
|
||||
%endif
|
||||
/sbin/ldconfig
|
||||
# If the package was removed (but not if it was updated)
|
||||
# then remove the hpaio lines in /etc/sane.d/dll.conf.
|
||||
@ -627,13 +679,21 @@ then if ! ls %{_prefix}/lib*/sane/libsane-hpaio.so* &>/dev/null
|
||||
fi
|
||||
exit 0
|
||||
|
||||
%post hpijs -p /sbin/ldconfig
|
||||
%post hpijs -p /bin/bash
|
||||
/sbin/ldconfig
|
||||
exit 0
|
||||
|
||||
%postun hpijs -p /sbin/ldconfig
|
||||
%postun hpijs -p /bin/bash
|
||||
/sbin/ldconfig
|
||||
exit 0
|
||||
|
||||
%files
|
||||
%defattr(-, root, root)
|
||||
%config %{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
||||
%if 0%{?suse_version} == 1110
|
||||
%dir /usr/lib/udev
|
||||
%dir /usr/lib/udev/rules.d
|
||||
%endif
|
||||
%config %{_udevrulesdir}/56-hpmud.rules
|
||||
%{_bindir}/hp-align
|
||||
%{_bindir}/hp-check
|
||||
|
Loading…
x
Reference in New Issue
Block a user