- Cleanup-with spec-cleaner
- Kill sle11 support as per min cups requirement - Add patch to put udev rules to usr as it is required: * hplip-udev-rules-in-usr.patch - Also run udev rules update in post for the above rules OBS-URL: https://build.opensuse.org/package/show/Printing/hplip?expand=0&rev=109
This commit is contained in:
parent
e18dbf119c
commit
0ab93476d7
13
hplip-udev-rules-in-usr.patch
Normal file
13
hplip-udev-rules-in-usr.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Index: hplip-3.15.2/Makefile.am
|
||||||
|
===================================================================
|
||||||
|
--- hplip-3.15.2.orig/Makefile.am
|
||||||
|
+++ hplip-3.15.2/Makefile.am
|
||||||
|
@@ -109,7 +109,7 @@ rulessystemdir=/usr/lib/systemd/system
|
||||||
|
dist_rulessystem_DATA =data/rules/hplip-printer@.service
|
||||||
|
|
||||||
|
# hpmud.rules
|
||||||
|
-rulesdir = /etc/udev/rules.d
|
||||||
|
+rulesdir = /usr/lib/udev/rules.d
|
||||||
|
if UDEV_SYSFS_RULES
|
||||||
|
dist_rules_DATA = data/rules/56-hpmud_sysfs.rules
|
||||||
|
else
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Feb 19 12:30:19 UTC 2015 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Cleanup-with spec-cleaner
|
||||||
|
- Kill sle11 support as per min cups requirement
|
||||||
|
- Add patch to put udev rules to usr as it is required:
|
||||||
|
* hplip-udev-rules-in-usr.patch
|
||||||
|
- Also run udev rules update in post for the above rules
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Feb 19 12:05:05 UTC 2015 - tchvatal@suse.com
|
Thu Feb 19 12:05:05 UTC 2015 - tchvatal@suse.com
|
||||||
|
|
||||||
|
259
hplip.spec
259
hplip.spec
@ -17,64 +17,11 @@
|
|||||||
|
|
||||||
|
|
||||||
Name: hplip
|
Name: hplip
|
||||||
BuildRequires: cups >= 1.7
|
Version: 3.15.2
|
||||||
BuildRequires: cups-devel
|
Release: 0
|
||||||
BuildRequires: dbus-1-devel
|
|
||||||
BuildRequires: fdupes
|
|
||||||
# BuildRequires foomatic-filters (also provided by cups-filters-foomatic-rip)
|
|
||||||
# to avoid /usr/lib/rpm/brp-symlink ERROR:
|
|
||||||
# link target doesn't exist (neither in build root nor in installed system):
|
|
||||||
# /usr/lib/cups/filter/foomatic-rip-hplip -> /usr/bin/foomatic-rip (for foomatic-filters) or
|
|
||||||
# /usr/lib/cups/filter/foomatic-rip-hplip -> /usr/lib/cups/filter/foomatic-rip (for cups-filters-foomatic-rip)
|
|
||||||
# From openSUSE 13.2 on explicitly "BuildRequires cups-filters-foomatic-rip"
|
|
||||||
# to avoid that foomatic-filters is used for build in the "Printing" development project
|
|
||||||
# (in "Printing" foomatic-filters exists intentionally also for openSUSE_13.2 and openSUSE_Factory)
|
|
||||||
# which would not match what is used for build in openSUSE:13.2 or openSUSE:Factory
|
|
||||||
# (in openSUSE:13.2 or openSUSE:Factory foomatic-filters is intentionally dropped).
|
|
||||||
# Using the matching package for build results that the backward compatibility link
|
|
||||||
# /usr/lib/cups/filter/foomatic-rip-hplip (see the install section below)
|
|
||||||
# points to a foomatic-rip executable that is used by default on the runtime system.
|
|
||||||
%if 0%{?suse_version} > 1310
|
|
||||||
BuildRequires: cups-filters-foomatic-rip
|
|
||||||
%else
|
|
||||||
BuildRequires: foomatic-filters
|
|
||||||
%endif
|
|
||||||
BuildRequires: hicolor-icon-theme
|
|
||||||
BuildRequires: libdrm-devel
|
|
||||||
BuildRequires: libgphoto2-devel
|
|
||||||
BuildRequires: libjpeg-devel
|
|
||||||
BuildRequires: libqt4-devel
|
|
||||||
BuildRequires: libtool
|
|
||||||
BuildRequires: libusb-1_0-devel
|
|
||||||
BuildRequires: net-snmp-devel
|
|
||||||
BuildRequires: pkgconfig
|
|
||||||
# All printer driver packages should have "BuildRequires: python-cups"
|
|
||||||
# because python-cups installs special rpm macros that adds Provides tags
|
|
||||||
# for the printer drivers supported by the package,
|
|
||||||
# see https://bugzilla.novell.com/show_bug.cgi?id=735865
|
|
||||||
BuildRequires: python-cups
|
|
||||||
BuildRequires: python-devel
|
|
||||||
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
|
|
||||||
BuildRequires: update-desktop-files
|
|
||||||
Summary: HP's Printing, Scanning, and Faxing Software
|
Summary: HP's Printing, Scanning, and Faxing Software
|
||||||
License: BSD-3-Clause and GPL-2.0+ and MIT
|
License: BSD-3-Clause and GPL-2.0+ and MIT
|
||||||
Group: Hardware/Printing
|
Group: Hardware/Printing
|
||||||
# HPLIP has reached 1.0 status. With this release a date encoded revision number is used:
|
|
||||||
# x.y.m : x = major release number, y = year (e.g.: 12 = 2012), m = month (e.g.: 10 = October)
|
|
||||||
# additionally the month could have an 'a' 'b' 'c' suffix (e.g.: 10a = second release in October)
|
|
||||||
# where 'a' or 'b' do not mean 'alpha' or 'beta' but 'second' or 'third' release in the month
|
|
||||||
# (usually bugfix releases have the suffix like 3.12.10a = first bugfix release for 3.12.10).
|
|
||||||
# Official releases have a 3 digit number and release candidates have a 4 digit number: x.y.m.rc
|
|
||||||
Version: 3.15.2
|
|
||||||
Release: 0
|
|
||||||
Url: http://hplipopensource.com
|
Url: http://hplipopensource.com
|
||||||
# Source0...Source9 is for sources from HP:
|
# Source0...Source9 is for sources from HP:
|
||||||
# URL for Source0: http://prdownloads.sourceforge.net/hplip/hplip-3.14.10.tar.gz
|
# URL for Source0: http://prdownloads.sourceforge.net/hplip/hplip-3.14.10.tar.gz
|
||||||
@ -132,12 +79,35 @@ Patch104: do_not_open_mdns_port.diff
|
|||||||
# see https://bugzilla.novell.com/show_bug.cgi?id=853405
|
# see https://bugzilla.novell.com/show_bug.cgi?id=853405
|
||||||
# To upgrade HPLIP an openSUSE software package manager like YaST or zypper should be used.
|
# To upgrade HPLIP an openSUSE software package manager like YaST or zypper should be used.
|
||||||
Patch106: disable_hp-upgrade.patch
|
Patch106: disable_hp-upgrade.patch
|
||||||
# Install into this non-root directory (required when norootforbuild is used):
|
# PATCH-FIX-SUSE: use proper udev rulesdir which is in usr not in /etc
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
Patch107: hplip-udev-rules-in-usr.patch
|
||||||
PreReq: coreutils
|
BuildRequires: cups >= 1.7
|
||||||
PreReq: /bin/grep
|
BuildRequires: cups-devel
|
||||||
PreReq: /bin/sed
|
BuildRequires: dbus-1-devel
|
||||||
PreReq: /usr/bin/find
|
BuildRequires: fdupes
|
||||||
|
BuildRequires: hicolor-icon-theme
|
||||||
|
BuildRequires: libdrm-devel
|
||||||
|
BuildRequires: libgphoto2-devel
|
||||||
|
BuildRequires: libjpeg-devel
|
||||||
|
BuildRequires: libqt4-devel
|
||||||
|
BuildRequires: libtool
|
||||||
|
BuildRequires: libusb-1_0-devel
|
||||||
|
BuildRequires: net-snmp-devel
|
||||||
|
BuildRequires: pkgconfig
|
||||||
|
# All printer driver packages should have "BuildRequires: python-cups"
|
||||||
|
# because python-cups installs special rpm macros that adds Provides tags
|
||||||
|
# for the printer drivers supported by the package,
|
||||||
|
# see https://bugzilla.novell.com/show_bug.cgi?id=735865
|
||||||
|
BuildRequires: python-cups
|
||||||
|
BuildRequires: python-devel
|
||||||
|
BuildRequires: python-openssl
|
||||||
|
BuildRequires: python-qt4
|
||||||
|
BuildRequires: python-xml
|
||||||
|
BuildRequires: readline-devel
|
||||||
|
BuildRequires: sane-backends-devel
|
||||||
|
# For udev macros
|
||||||
|
BuildRequires: systemd-rpm-macros
|
||||||
|
BuildRequires: update-desktop-files
|
||||||
# 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.
|
||||||
# The exact matching version-release of the sub-package is available on the same
|
# The exact matching version-release of the sub-package is available on the same
|
||||||
@ -146,6 +116,12 @@ 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}
|
||||||
|
# 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).
|
||||||
|
# The dbus stuff in HPLIP requires the Python module gobject
|
||||||
|
# but there is no automated RPM requirement for python-gobject2,
|
||||||
|
# see https://answers.launchpad.net/hplip/+question/30741
|
||||||
|
Requires: dbus-1-python >= 0.80
|
||||||
# Because foomatic-rip-hplip has CVE-2011-2697 (bnc#698451)
|
# Because foomatic-rip-hplip has CVE-2011-2697 (bnc#698451)
|
||||||
# plus a leftover in CVE-2004-0801 (bnc#59233)
|
# plus a leftover in CVE-2004-0801 (bnc#59233)
|
||||||
# foomatic-rip-hplip is no longer installed and foomatic-rip
|
# foomatic-rip-hplip is no longer installed and foomatic-rip
|
||||||
@ -167,6 +143,9 @@ Requires: foomatic-filters
|
|||||||
# Therefore the hplip main package which is intended
|
# Therefore the hplip main package which is intended
|
||||||
# to get "all the HPLIP stuff" installed has the RPM requirement:
|
# to get "all the HPLIP stuff" installed has the RPM requirement:
|
||||||
Requires: ghostscript
|
Requires: ghostscript
|
||||||
|
Requires: python-gobject2
|
||||||
|
# Since version 3.9.2 by default only Qt4 is used:
|
||||||
|
Requires: python-qt4
|
||||||
# Require special Python stuff (which pulls in Python base stuff).
|
# Require special Python stuff (which pulls in Python base stuff).
|
||||||
# At least since openSUSE 11.1 and SLE11 pyxml is no longer required
|
# At least since openSUSE 11.1 and SLE11 pyxml is no longer required
|
||||||
# (pyxml was required in particular for openSUSE 10.3 and SLE10,
|
# (pyxml was required in particular for openSUSE 10.3 and SLE10,
|
||||||
@ -174,15 +153,10 @@ Requires: ghostscript
|
|||||||
# but meanwhile python-xml alone is sufficient for "import xml.parsers.expat"
|
# but meanwhile python-xml alone is sufficient for "import xml.parsers.expat"
|
||||||
# see https://bugzilla.novell.com/show_bug.cgi?id=656779#c3
|
# see https://bugzilla.novell.com/show_bug.cgi?id=656779#c3
|
||||||
Requires: python-xml
|
Requires: python-xml
|
||||||
# Since version 3.9.2 by default only Qt4 is used:
|
Requires(post): %{_bindir}/find
|
||||||
Requires: python-qt4
|
Requires(post): /bin/grep
|
||||||
# Since version 2.8.4 all interprocess communication uses dbus.
|
Requires(post): /bin/sed
|
||||||
# Therefore python-dbus version 0.80 or greater is required (which pulls in dbus base stuff).
|
Requires(post): coreutils
|
||||||
# The dbus stuff in HPLIP requires the Python module gobject
|
|
||||||
# but there is no automated RPM requirement for python-gobject2,
|
|
||||||
# see https://answers.launchpad.net/hplip/+question/30741
|
|
||||||
Requires: dbus-1-python >= 0.80
|
|
||||||
Requires: python-gobject2
|
|
||||||
# Either the hplip17 packages or the hplip packages can be installed,
|
# Either the hplip17 packages or the hplip packages can be installed,
|
||||||
# see https://bugzilla.novell.com/show_bug.cgi?id=251830#c20
|
# see https://bugzilla.novell.com/show_bug.cgi?id=251830#c20
|
||||||
# for the full story why there is this unversioned Obsoletes:
|
# for the full story why there is this unversioned Obsoletes:
|
||||||
@ -190,6 +164,26 @@ 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
|
||||||
|
# Install into this non-root directory (required when norootforbuild is used):
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
# BuildRequires foomatic-filters (also provided by cups-filters-foomatic-rip)
|
||||||
|
# to avoid /usr/lib/rpm/brp-symlink ERROR:
|
||||||
|
# link target doesn't exist (neither in build root nor in installed system):
|
||||||
|
# /usr/lib/cups/filter/foomatic-rip-hplip -> /usr/bin/foomatic-rip (for foomatic-filters) or
|
||||||
|
# /usr/lib/cups/filter/foomatic-rip-hplip -> /usr/lib/cups/filter/foomatic-rip (for cups-filters-foomatic-rip)
|
||||||
|
# From openSUSE 13.2 on explicitly "BuildRequires cups-filters-foomatic-rip"
|
||||||
|
# to avoid that foomatic-filters is used for build in the "Printing" development project
|
||||||
|
# (in "Printing" foomatic-filters exists intentionally also for openSUSE_13.2 and openSUSE_Factory)
|
||||||
|
# which would not match what is used for build in openSUSE:13.2 or openSUSE:Factory
|
||||||
|
# (in openSUSE:13.2 or openSUSE:Factory foomatic-filters is intentionally dropped).
|
||||||
|
# Using the matching package for build results that the backward compatibility link
|
||||||
|
# /usr/lib/cups/filter/foomatic-rip-hplip (see the install section below)
|
||||||
|
# points to a foomatic-rip executable that is used by default on the runtime system.
|
||||||
|
%if 0%{?suse_version} > 1310
|
||||||
|
BuildRequires: cups-filters-foomatic-rip
|
||||||
|
%else
|
||||||
|
BuildRequires: foomatic-filters
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
The Hewlett-Packard Linux Imaging and Printing project (HPLIP) provides
|
The Hewlett-Packard Linux Imaging and Printing project (HPLIP) provides
|
||||||
@ -223,17 +217,11 @@ licenses. For more information, see:
|
|||||||
|
|
||||||
http://hplipopensource.com
|
http://hplipopensource.com
|
||||||
|
|
||||||
/usr/share/doc/packages/hplip/index.html
|
%{_docdir}/hplip/index.html
|
||||||
|
|
||||||
|
|
||||||
%package hpijs
|
%package hpijs
|
||||||
Summary: Only plain printing with HPLIP printer drivers
|
Summary: Only plain printing with HPLIP printer drivers
|
||||||
Group: Hardware/Printing
|
Group: Hardware/Printing
|
||||||
# Since Nov 14 2007 ghostscript-library does no longer require /usr/bin/hpijs
|
|
||||||
# but only "Suggests hplip-hpijs" (see Novell/Suse Bugzilla bnc#341564).
|
|
||||||
# Have the matching "reverse suggests" = "Enhances" here
|
|
||||||
# to document the ghostscript <-> hplip-hpijs relationship:
|
|
||||||
Enhances: ghostscript
|
|
||||||
# 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).
|
||||||
@ -253,6 +241,11 @@ Enhances: ghostscript
|
|||||||
# installed from the openSUSE CDs but on our official online repository
|
# installed from the openSUSE CDs but on our official online repository
|
||||||
# only hplip-1.2.3-6.7 is available which should usually also work):
|
# only hplip-1.2.3-6.7 is available which should usually also work):
|
||||||
Suggests: %{name} = %{version}
|
Suggests: %{name} = %{version}
|
||||||
|
# Since Nov 14 2007 ghostscript-library does no longer require /usr/bin/hpijs
|
||||||
|
# but only "Suggests hplip-hpijs" (see Novell/Suse Bugzilla bnc#341564).
|
||||||
|
# Have the matching "reverse suggests" = "Enhances" here
|
||||||
|
# to document the ghostscript <-> hplip-hpijs relationship:
|
||||||
|
Enhances: ghostscript
|
||||||
# hpijs-standalone was a stand-alone minimalist package
|
# hpijs-standalone was a stand-alone minimalist package
|
||||||
# which is no longer provided since a long time.
|
# which is no longer provided since a long time.
|
||||||
# hplip-hpijs and hpijs-standalone both contain /usr/bin/hpijs
|
# hplip-hpijs and hpijs-standalone both contain /usr/bin/hpijs
|
||||||
@ -295,7 +288,7 @@ This sub-package includes in particular:
|
|||||||
The hpijs binary and the libraries libhpip and libhpmud
|
The hpijs binary and the libraries libhpip and libhpmud
|
||||||
which are needed to run it.
|
which are needed to run it.
|
||||||
|
|
||||||
The HPCUPS driver (/usr/lib[64]/cups/filter/hpcups).
|
The HPCUPS driver (%{_prefix}/lib[64]/cups/filter/hpcups).
|
||||||
|
|
||||||
The CUPS backend "hp".
|
The CUPS backend "hp".
|
||||||
|
|
||||||
@ -306,7 +299,6 @@ the main-package package hplip must be installed.
|
|||||||
|
|
||||||
For full documentation and license see the main-package hplip.
|
For full documentation and license see the main-package hplip.
|
||||||
|
|
||||||
|
|
||||||
%package sane
|
%package sane
|
||||||
Summary: Only plain scanning with HPLIP scan drivers
|
Summary: Only plain scanning with HPLIP scan drivers
|
||||||
Group: Hardware/Scanner
|
Group: Hardware/Scanner
|
||||||
@ -318,16 +310,15 @@ Group: Hardware/Scanner
|
|||||||
Requires: %{name}-hpijs = %{version}-%{release}
|
Requires: %{name}-hpijs = %{version}-%{release}
|
||||||
# See comment in hpijs sub-package for same Suggests:
|
# See comment in hpijs sub-package for same Suggests:
|
||||||
Suggests: %{name} = %{version}
|
Suggests: %{name} = %{version}
|
||||||
|
Enhances: sane-backends
|
||||||
# Automatically install this package if hpijs sub-package and sane-backends are
|
# Automatically install this package if hpijs sub-package and sane-backends are
|
||||||
# both installed:
|
# both installed:
|
||||||
Supplements: packageand(%{name}-hpijs:sane-backends)
|
Supplements: packageand(%{name}-hpijs:sane-backends)
|
||||||
Enhances: sane-backends
|
|
||||||
|
|
||||||
%description sane
|
%description sane
|
||||||
This sub-package includes only what is needed for plain scanning
|
This sub-package includes only what is needed for plain scanning
|
||||||
with the scan drivers in HPLIP for standard HP all-in-one printers.
|
with the scan drivers in HPLIP for standard HP all-in-one printers.
|
||||||
|
|
||||||
|
|
||||||
%package devel
|
%package devel
|
||||||
Summary: Development files for hplip
|
Summary: Development files for hplip
|
||||||
Group: Development/Languages/C and C++
|
Group: Development/Languages/C and C++
|
||||||
@ -341,7 +332,6 @@ Requires: %{name}-sane = %{version}-%{release}
|
|||||||
%description devel
|
%description devel
|
||||||
This sub-package is only required by developers.
|
This sub-package is only required by developers.
|
||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
# Be quiet when unpacking:
|
# Be quiet when unpacking:
|
||||||
%setup -q
|
%setup -q
|
||||||
@ -355,15 +345,16 @@ This sub-package is only required by developers.
|
|||||||
# see https://bugzilla.novell.com/show_bug.cgi?id=853405
|
# see https://bugzilla.novell.com/show_bug.cgi?id=853405
|
||||||
# To upgrade HPLIP an openSUSE software package manager like YaST or zypper should be used.
|
# To upgrade HPLIP an openSUSE software package manager like YaST or zypper should be used.
|
||||||
%patch106 -b .disable_hp-upgrade.orig
|
%patch106 -b .disable_hp-upgrade.orig
|
||||||
|
%patch107 -p1 -b .udev_rules_dir.orig
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# If AUTOMAKE='automake --foreign' is not set, autoreconf (in fact automake)
|
# If AUTOMAKE='automake --foreign' is not set, autoreconf (in fact automake)
|
||||||
# complains about missing files like NEWS, README, AUTHORS, ChangeLog
|
# complains about missing files like NEWS, README, AUTHORS, ChangeLog
|
||||||
# in each directory where a Makefile.am exists:
|
# in each directory where a Makefile.am exists:
|
||||||
AUTOMAKE='automake --foreign' autoreconf --force --install
|
AUTOMAKE='automake --foreign' autoreconf -fvi
|
||||||
# Set our preferred architecture-specific flags for the compiler and linker:
|
# Set our preferred architecture-specific flags for the compiler and linker:
|
||||||
export CFLAGS="$RPM_OPT_FLAGS"
|
export CFLAGS="%{optflags}"
|
||||||
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
export CXXFLAGS="%{optflags} -fno-strict-aliasing"
|
||||||
# Static "hpijs" PPD files via enable-foomatic-ppd-install
|
# Static "hpijs" PPD files via enable-foomatic-ppd-install
|
||||||
# require foomatic-rip-hplip via their cupsFilter entries
|
# require foomatic-rip-hplip via their cupsFilter entries
|
||||||
# so that enable-foomatic-rip-hplip-install is also needed.
|
# so that enable-foomatic-rip-hplip-install is also needed.
|
||||||
@ -390,8 +381,7 @@ export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
|||||||
# in the static PPDs are changed in the install section to use foomatic-rip.
|
# in the static PPDs are changed in the install section to use foomatic-rip.
|
||||||
# Since HPLIP 3.13.10 --with-htmldir is new but it does not inhertit its value from --with-docdir
|
# Since HPLIP 3.13.10 --with-htmldir is new but it does not inhertit its value from --with-docdir
|
||||||
# so that --with-htmldir must be explicitly set.
|
# so that --with-htmldir must be explicitly set.
|
||||||
./configure --prefix=/usr \
|
%configure \
|
||||||
--libdir=%{_libdir} \
|
|
||||||
--disable-qt3 \
|
--disable-qt3 \
|
||||||
--enable-qt4 \
|
--enable-qt4 \
|
||||||
--disable-policykit \
|
--disable-policykit \
|
||||||
@ -410,16 +400,16 @@ export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
|
|||||||
--enable-foomatic-ppd-install \
|
--enable-foomatic-ppd-install \
|
||||||
--disable-foomatic-rip-hplip-install \
|
--disable-foomatic-rip-hplip-install \
|
||||||
--with-hpppddir=%{_datadir}/cups/model/manufacturer-PPDs/%{name} \
|
--with-hpppddir=%{_datadir}/cups/model/manufacturer-PPDs/%{name} \
|
||||||
--with-cupsbackenddir=/usr/lib/cups/backend \
|
--with-cupsbackenddir=%{_libexecdir}/cups/backend \
|
||||||
--with-cupsfilterdir=/usr/lib/cups/filter \
|
--with-cupsfilterdir=%{_libexecdir}/cups/filter \
|
||||||
--with-drvdir=/usr/lib/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}
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
|
|
||||||
%install
|
%install
|
||||||
make install DESTDIR=%{buildroot}
|
make DESTDIR=%{buildroot} install %{?_smp_mflags}
|
||||||
# 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
|
||||||
@ -456,12 +446,12 @@ chmod a+x %{buildroot}%{_datadir}/hplip/fax/pstotiff
|
|||||||
# using fixed "/var/log/hp" because this is hardcoded in the HPLIP sources
|
# using fixed "/var/log/hp" because this is hardcoded in the HPLIP sources
|
||||||
# regarding owner and permissions see the "files hpijs" section below
|
# regarding owner and permissions see the "files hpijs" section below
|
||||||
# and Patch102 no-chgrp_lp_hplip_Logdir.diff:
|
# and Patch102 no-chgrp_lp_hplip_Logdir.diff:
|
||||||
test -d %{buildroot}/var/lib/hp || install -d %{buildroot}/var/lib/hp
|
test -d %{buildroot}%{_localstatedir}/lib/hp || install -d %{buildroot}%{_localstatedir}/lib/hp
|
||||||
# Create a /var/log/hp/tmp/ directory that is needed by hp-sendfax
|
# Create a /var/log/hp/tmp/ directory that is needed by hp-sendfax
|
||||||
# as a workaround until HPLIP upstream implemented it correctly
|
# as a workaround until HPLIP upstream implemented it correctly
|
||||||
# see https://bugzilla.novell.com/show_bug.cgi?id=800312
|
# see https://bugzilla.novell.com/show_bug.cgi?id=800312
|
||||||
# and https://bugs.launchpad.net/bugs/1016507
|
# and https://bugs.launchpad.net/bugs/1016507
|
||||||
install -d %{buildroot}/var/log/hp/tmp
|
install -d %{buildroot}%{_localstatedir}/log/hp/tmp
|
||||||
# Remove the installed /etc/sane.d/dll.conf
|
# Remove the installed /etc/sane.d/dll.conf
|
||||||
# because this is provided by the sane-backends package:
|
# because this is provided by the sane-backends package:
|
||||||
rm %{buildroot}%{_sysconfdir}/sane.d/dll.conf
|
rm %{buildroot}%{_sysconfdir}/sane.d/dll.conf
|
||||||
@ -475,7 +465,7 @@ rm %{buildroot}%{_datadir}/hal/fdi/preprobe/10osvendor/20-hplip-devices.fdi
|
|||||||
# see for example https://bugs.launchpad.net/bugs/1197416
|
# see for example https://bugs.launchpad.net/bugs/1197416
|
||||||
# while in contrast manual printer setup via hp-setup usually "just works"
|
# while in contrast manual printer setup via hp-setup usually "just works"
|
||||||
# and it is clear for the user what goes on and in case of failure what went wrong.
|
# and it is clear for the user what goes on and in case of failure what went wrong.
|
||||||
rm %{buildroot}/usr/lib/systemd/system/hplip-printer@.service
|
rm %{buildroot}%{_libexecdir}/systemd/system/hplip-printer@.service
|
||||||
# Begin "General tests and adjustments for all PPDs" (see manufacturer-PPDs.spec):
|
# Begin "General tests and adjustments for all PPDs" (see manufacturer-PPDs.spec):
|
||||||
pushd %{buildroot}%{_datadir}/cups/model/manufacturer-PPDs/%{name}
|
pushd %{buildroot}%{_datadir}/cups/model/manufacturer-PPDs/%{name}
|
||||||
# Do not pollute the build log file with zillions of meaningless messages:
|
# Do not pollute the build log file with zillions of meaningless messages:
|
||||||
@ -525,7 +515,7 @@ for p in *.ppd
|
|||||||
do grep -E -v '^\*UIConstraints:|^\*NonUIConstraints:|^\*cupsFilter:' $p | cupstestppd - || true
|
do grep -E -v '^\*UIConstraints:|^\*NonUIConstraints:|^\*cupsFilter:' $p | cupstestppd - || true
|
||||||
gzip $p
|
gzip $p
|
||||||
done
|
done
|
||||||
echo "Moving PPDs that use the hpps filter to /usr/share/cups/model/manufacturer-PPDs/hplip-hpps..."
|
echo "Moving PPDs that use the hpps filter to %{_datadir}/cups/model/manufacturer-PPDs/hplip-hpps..."
|
||||||
# PPDs for various printers that use the hpps filter
|
# PPDs for various printers that use the hpps filter
|
||||||
# must be moved to the hplip main-package because
|
# must be moved to the hplip main-package because
|
||||||
# the /usr/lib/cups/filter/hpps Python script imports
|
# the /usr/lib/cups/filter/hpps Python script imports
|
||||||
@ -540,7 +530,7 @@ install -d %{buildroot}%{_datadir}/cups/model/manufacturer-PPDs/%{name}-hpps
|
|||||||
for p in *.ppd.gz
|
for p in *.ppd.gz
|
||||||
do zgrep -q '^\*cupsFilter:.*hpps' $p && mv $p ../%{name}-hpps
|
do zgrep -q '^\*cupsFilter:.*hpps' $p && mv $p ../%{name}-hpps
|
||||||
done
|
done
|
||||||
echo "Moving PPDs that require a proprietary plugin from HP to /usr/share/cups/model/manufacturer-PPDs/hplip-plugin..."
|
echo "Moving PPDs that require a proprietary plugin from HP to %{_datadir}/cups/model/manufacturer-PPDs/hplip-plugin..."
|
||||||
# PPDs for various printers that require a proprietary plugin from HP
|
# PPDs for various printers that require a proprietary plugin from HP
|
||||||
# must be moved to the hplip main-package because
|
# must be moved to the hplip main-package because
|
||||||
# the proprietary plugin from HP must be downloaded and installed
|
# the proprietary plugin from HP must be downloaded and installed
|
||||||
@ -569,17 +559,17 @@ popd
|
|||||||
# which points to the actual foomatic-rip executable.
|
# which points to the actual foomatic-rip executable.
|
||||||
# In foomatic-filters foomatic-rip is installed as /usr/bin/foomatic-rip but
|
# In foomatic-filters foomatic-rip is installed as /usr/bin/foomatic-rip but
|
||||||
# in cups-filters-foomatic-rip it is installed as /usr/lib/cups/filter/foomatic-rip:
|
# in cups-filters-foomatic-rip it is installed as /usr/lib/cups/filter/foomatic-rip:
|
||||||
if test -e /usr/lib/cups/filter/foomatic-rip
|
if test -e %{_libexecdir}/cups/filter/foomatic-rip
|
||||||
then ln -s foomatic-rip %{buildroot}/usr/lib/cups/filter/foomatic-rip-hplip
|
then ln -s foomatic-rip %{buildroot}%{_libexecdir}/cups/filter/foomatic-rip-hplip
|
||||||
else if test -e /usr/bin/foomatic-rip
|
else if test -e %{_bindir}/foomatic-rip
|
||||||
then ln -s ../../../bin/foomatic-rip %{buildroot}/usr/lib/cups/filter/foomatic-rip-hplip
|
then ln -s ../../../bin/foomatic-rip %{buildroot}%{_libexecdir}/cups/filter/foomatic-rip-hplip
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
# 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
|
||||||
# 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 %{buildroot}/etc/xdg/autostart/hplip-systray.desktop
|
%suse_update_desktop_file %{buildroot}%{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
||||||
# End of "Desktop menue entry stuff".
|
# End of "Desktop menue entry stuff".
|
||||||
# Install the man page for /usr/bin/hpijs:
|
# Install the man page for /usr/bin/hpijs:
|
||||||
install -d %{buildroot}%{_mandir}/man1
|
install -d %{buildroot}%{_mandir}/man1
|
||||||
@ -596,14 +586,9 @@ install -m 644 %{SOURCE102} %{buildroot}%{_mandir}/man1/
|
|||||||
%fdupes -s %{buildroot}%{_datadir}/hplip/data/images
|
%fdupes -s %{buildroot}%{_datadir}/hplip/data/images
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if 0%{?suse_version} >= 1140
|
%udev_rules_update
|
||||||
%desktop_database_post
|
%desktop_database_post
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} > 1130
|
|
||||||
%icon_theme_cache_post
|
%icon_theme_cache_post
|
||||||
%else
|
|
||||||
gtk-update-icon-cache %{_datadir}/icons/hicolor || true
|
|
||||||
%endif
|
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
@ -612,22 +597,16 @@ exit 0
|
|||||||
# Therefore if sane-backends is installed it may be installed or updated after hplip.
|
# 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.
|
# In this case trigger to add the SANE backend "hpaio" to /etc/sane.d/dll.conf if it is not there.
|
||||||
# To be safe there is a test that /etc/sane.d/dll.conf is writable.
|
# To be safe there is a test that /etc/sane.d/dll.conf is writable.
|
||||||
if [ -w /etc/sane.d/dll.conf ]
|
if [ -w %{_sysconfdir}/sane.d/dll.conf ]
|
||||||
then if ! grep -q 'hpaio' /etc/sane.d/dll.conf
|
then if ! grep -q 'hpaio' %{_sysconfdir}/sane.d/dll.conf
|
||||||
then echo -e '# The hpaio backend is provided by the hplip package:\n#hpaio' >>/etc/sane.d/dll.conf
|
then echo -e '# The hpaio backend is provided by the hplip package:\n#hpaio' >>%{_sysconfdir}/sane.d/dll.conf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
%if 0%{?suse_version} >= 1140
|
|
||||||
%desktop_database_postun
|
%desktop_database_postun
|
||||||
%endif
|
|
||||||
%if 0%{?suse_version} > 1130
|
|
||||||
%icon_theme_cache_postun
|
%icon_theme_cache_postun
|
||||||
%else
|
|
||||||
gtk-update-icon-cache %{_datadir}/icons/hicolor || true
|
|
||||||
%endif
|
|
||||||
/sbin/ldconfig
|
/sbin/ldconfig
|
||||||
# If the package was removed (but not if it was updated)
|
# If the package was removed (but not if it was updated)
|
||||||
# then remove the hpaio lines in /etc/sane.d/dll.conf.
|
# then remove the hpaio lines in /etc/sane.d/dll.conf.
|
||||||
@ -642,26 +621,20 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor || true
|
|||||||
# The "exit 0" is necessary, otherwise the postun script
|
# The "exit 0" is necessary, otherwise the postun script
|
||||||
# would exit with non-zero exit-code if the package was not removed.
|
# would exit with non-zero exit-code if the package was not removed.
|
||||||
if [ "$1" = "0" ]
|
if [ "$1" = "0" ]
|
||||||
then if ! ls /usr/lib*/sane/libsane-hpaio.so* &>/dev/null
|
then if ! ls %{_prefix}/lib*/sane/libsane-hpaio.so* &>/dev/null
|
||||||
then [ -w /etc/sane.d/dll.conf ] && sed -i -e '/hpaio/d' /etc/sane.d/dll.conf
|
then [ -w %{_sysconfdir}/sane.d/dll.conf ] && sed -i -e '/hpaio/d' %{_sysconfdir}/sane.d/dll.conf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
%post hpijs
|
%post hpijs -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
%postun hpijs
|
%postun hpijs -p /sbin/ldconfig
|
||||||
/sbin/ldconfig
|
|
||||||
exit 0
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
%config %{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
%config %{_sysconfdir}/xdg/autostart/hplip-systray.desktop
|
||||||
%dir %{_sysconfdir}/udev
|
%config %{_udevrulesdir}/56-hpmud.rules
|
||||||
%dir %{_sysconfdir}/udev/rules.d
|
|
||||||
%config %{_sysconfdir}/udev/rules.d/56-hpmud.rules
|
|
||||||
%{_bindir}/hp-align
|
%{_bindir}/hp-align
|
||||||
%{_bindir}/hp-check
|
%{_bindir}/hp-check
|
||||||
%{_bindir}/hp-clean
|
%{_bindir}/hp-clean
|
||||||
@ -702,11 +675,11 @@ exit 0
|
|||||||
%{_libdir}/python%{py_ver}/site-packages/hpmudext.*
|
%{_libdir}/python%{py_ver}/site-packages/hpmudext.*
|
||||||
%{_libdir}/python%{py_ver}/site-packages/pcardext.*
|
%{_libdir}/python%{py_ver}/site-packages/pcardext.*
|
||||||
%{_libdir}/python%{py_ver}/site-packages/scanext.*
|
%{_libdir}/python%{py_ver}/site-packages/scanext.*
|
||||||
%dir /usr/lib/cups
|
%dir %{_libexecdir}/cups
|
||||||
%dir /usr/lib/cups/backend
|
%dir %{_libexecdir}/cups/backend
|
||||||
/usr/lib/cups/backend/hpfax
|
%{_libexecdir}/cups/backend/hpfax
|
||||||
%dir /usr/lib/cups/filter
|
%dir %{_libexecdir}/cups/filter
|
||||||
/usr/lib/cups/filter/hpps
|
%{_libexecdir}/cups/filter/hpps
|
||||||
%dir %{_datadir}/cups
|
%dir %{_datadir}/cups
|
||||||
%dir %{_datadir}/cups/model
|
%dir %{_datadir}/cups/model
|
||||||
%dir %{_datadir}/cups/model/manufacturer-PPDs
|
%dir %{_datadir}/cups/model/manufacturer-PPDs
|
||||||
@ -726,14 +699,14 @@ exit 0
|
|||||||
%doc %{_mandir}/man1/hpijs.1.gz
|
%doc %{_mandir}/man1/hpijs.1.gz
|
||||||
%{_libdir}/libhpip.so.*
|
%{_libdir}/libhpip.so.*
|
||||||
%{_libdir}/libhpmud.so.*
|
%{_libdir}/libhpmud.so.*
|
||||||
%dir /usr/lib/cups
|
%dir %{_libexecdir}/cups
|
||||||
%dir /usr/lib/cups/backend
|
%dir %{_libexecdir}/cups/backend
|
||||||
/usr/lib/cups/backend/hp
|
%{_libexecdir}/cups/backend/hp
|
||||||
%dir /usr/lib/cups/filter
|
%dir %{_libexecdir}/cups/filter
|
||||||
/usr/lib/cups/filter/foomatic-rip-hplip
|
%{_libexecdir}/cups/filter/foomatic-rip-hplip
|
||||||
/usr/lib/cups/filter/hpcups
|
%{_libexecdir}/cups/filter/hpcups
|
||||||
/usr/lib/cups/filter/hpcupsfax
|
%{_libexecdir}/cups/filter/hpcupsfax
|
||||||
/usr/lib/cups/filter/pstotiff
|
%{_libexecdir}/cups/filter/pstotiff
|
||||||
%dir %{_datadir}/cups
|
%dir %{_datadir}/cups
|
||||||
%dir %{_datadir}/cups/model
|
%dir %{_datadir}/cups/model
|
||||||
%dir %{_datadir}/cups/model/manufacturer-PPDs
|
%dir %{_datadir}/cups/model/manufacturer-PPDs
|
||||||
@ -741,13 +714,13 @@ exit 0
|
|||||||
%{_datadir}/%{name}/data/models/models.dat
|
%{_datadir}/%{name}/data/models/models.dat
|
||||||
# Use fixed "/var/log/hp" because this is hardcoded in the HPLIP sources.
|
# Use fixed "/var/log/hp" because this is hardcoded in the HPLIP sources.
|
||||||
# Regarding attr(0775,root,lp) see the comment for /var/log/hp/tmp below:
|
# Regarding attr(0775,root,lp) see the comment for /var/log/hp/tmp below:
|
||||||
%dir %attr(0775,root,lp) /var/log/hp
|
%dir %attr(0775,root,lp) %{_localstatedir}/log/hp
|
||||||
# Regarding attr(0775,root,lp) for /var/log/hp/tmp
|
# Regarding attr(0775,root,lp) for /var/log/hp/tmp
|
||||||
# see https://bugzilla.novell.com/show_bug.cgi?id=800312#c0
|
# see https://bugzilla.novell.com/show_bug.cgi?id=800312#c0
|
||||||
# i.e. it is reasonable secure and hp-sendfax works with it:
|
# i.e. it is reasonable secure and hp-sendfax works with it:
|
||||||
%dir %attr(0775,root,lp) /var/log/hp/tmp
|
%dir %attr(0775,root,lp) %{_localstatedir}/log/hp/tmp
|
||||||
# Use fixed "/var/lib/hp" because this is hardcoded in the HPLIP sources:
|
# Use fixed "/var/lib/hp" because this is hardcoded in the HPLIP sources:
|
||||||
%dir /var/lib/hp
|
%dir %{_localstatedir}/lib/hp
|
||||||
|
|
||||||
%files sane
|
%files sane
|
||||||
%defattr(-, root, root)
|
%defattr(-, root, root)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user