2011-09-27 15:02:44 +02:00
|
|
|
#
|
|
|
|
# spec file for package epson-inkjet-printer-escpr
|
|
|
|
#
|
2015-03-20 11:02:13 +01:00
|
|
|
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-09-27 15:02:44 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2014-06-12 11:38:39 +02:00
|
|
|
|
2011-09-27 15:02:44 +02:00
|
|
|
Name: epson-inkjet-printer-escpr
|
2015-03-20 11:02:13 +01:00
|
|
|
# SLE12 needs special BuildRequires.
|
|
|
|
# For suse_version values see https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
|
|
|
|
%if 0%{?suse_version} == 1315
|
|
|
|
# For SLE12 by default CUPS 1.7.5 is provided and alternatively CUPS 1.5.4 is provided in the "legacy" module.
|
|
|
|
# For SLE12 build it with traditional CUPS 1.5.4 to ensure it works on SLE12 both with CUPS 1.7.5 and CUPS 1.5.4
|
|
|
|
# because libcups and libcupsimage in CUPS 1.7.5 are backward compatible with CUPS 1.5.4 so that applications
|
|
|
|
# that have been built with CUPS 1.5.4 also work under CUPS 1.7.5 but the libraries in CUPS 1.7.5 provide
|
|
|
|
# some additional functions so that applications that have been built with CUPS 1.7.5 and use those
|
|
|
|
# additional functions would not work under CUPS 1.7.5.
|
|
|
|
# Only in the Printing project for SLE12 use cups154-ddk (a sub package of the cups154-SLE12 source package):
|
|
|
|
BuildRequires: cups154
|
|
|
|
BuildRequires: cups154-devel
|
|
|
|
%else
|
|
|
|
# Anything what is not SLE12 (i.e. SLE11 and all openSUSE versions) have "normal" BuildRequires:
|
2012-02-08 14:16:45 +01:00
|
|
|
BuildRequires: cups
|
|
|
|
BuildRequires: cups-devel
|
2015-03-20 11:02:13 +01:00
|
|
|
%endif
|
2013-02-22 14:45:39 +01:00
|
|
|
# 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
|
2013-02-22 14:54:41 +01:00
|
|
|
# but python-cups is not available for SLE10, regarding the suse_version value for SLE10
|
|
|
|
# see http://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
|
|
|
|
%if 0%{?suse_version} > 1010
|
2013-02-22 14:45:39 +01:00
|
|
|
BuildRequires: python-cups
|
2013-02-22 14:54:41 +01:00
|
|
|
%endif
|
2015-08-20 15:49:36 +02:00
|
|
|
Version: 1.5.0
|
2012-02-08 14:16:45 +01:00
|
|
|
Release: 0
|
2011-09-27 15:02:44 +02:00
|
|
|
Url: http://avasys.jp/english/linux_e/
|
|
|
|
Summary: Epson ESC/P-R Inkjet Printer Driver
|
2012-02-08 14:16:45 +01:00
|
|
|
License: GPL-2.0
|
|
|
|
Group: Hardware/Printing
|
2013-08-01 11:57:10 +02:00
|
|
|
# Example URL to download Source0: http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX&productName=B700
|
2011-09-27 15:02:44 +02:00
|
|
|
Source0: epson-inkjet-printer-escpr-%{version}-1lsb3.2.tar.gz
|
|
|
|
# This software is a filter program used with CUPS:
|
|
|
|
Requires: cups
|
2012-02-08 14:16:45 +01:00
|
|
|
# Prerequire /sbin/ldconfig which is used in the traditional bash scriptlets for post/postun:
|
|
|
|
PreReq: /sbin/ldconfig
|
2011-09-27 15:02:44 +02:00
|
|
|
# Install into this non-root directory (required when norootforbuild is used):
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
|
|
|
The ESC/P-R driver works as a filter program
|
|
|
|
used with CUPS.
|
|
|
|
|
|
|
|
It offers high quality printing with Seiko Epson color
|
|
|
|
inkjet printers.
|
|
|
|
|
|
|
|
This driver can only be used with printers that support
|
|
|
|
the Epson ESC/P-R language.
|
|
|
|
|
|
|
|
For a list of supported printers by a currently installed
|
|
|
|
package see the PPD files in this directory:
|
|
|
|
|
|
|
|
/usr/share/cups/model/manufacturer-PPDs/epson-inkjet-printer-escpr
|
|
|
|
|
|
|
|
For a list of supported printers by the newest available version
|
2015-03-20 11:02:13 +01:00
|
|
|
at the upstream project visit:
|
2011-09-27 15:02:44 +02:00
|
|
|
|
|
|
|
http://avasys.jp/english/linux_e/
|
|
|
|
|
|
|
|
In particular regarding the ESC/P-R driver see:
|
|
|
|
|
|
|
|
http://avasys.jp/eng/linux_driver/download/lsb/epson-inkjet/escpr/
|
|
|
|
|
|
|
|
Regarding "What's ESC/P-R?" have a look at:
|
|
|
|
|
2015-03-20 11:02:13 +01:00
|
|
|
http://global.epson.com/innovation/universal_printing/index.html
|
2011-09-27 15:02:44 +02:00
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
# Be quiet when unpacking:
|
|
|
|
%setup -q
|
|
|
|
|
|
|
|
%build
|
|
|
|
# Set our preferred architecture-specific flags for the compiler and linker:
|
|
|
|
export CFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
export CXXFLAGS="$RPM_OPT_FLAGS"
|
|
|
|
# Specify location of CUPS filter and ppd files explicitly.
|
|
|
|
# Use the explicite value 'epson-inkjet-printer-escpr' and not the RPM macro 'name'
|
|
|
|
# so that it could be built as well with a different package name
|
|
|
|
# (e.g. when someone likes to provide an epson-inkjet-printer-escpr SVN revision
|
|
|
|
# with package name 'epson-inkjet-printer-escpr-SVN' or a specifically adapted
|
|
|
|
# version as 'epson-inkjet-printer-escpr-only4me') because the installed PPDs
|
|
|
|
# must match exactly to the installed epson-escpr filter and the libescpr library:
|
|
|
|
%configure \
|
|
|
|
--with-cupsfilterdir=/usr/lib/cups/filter \
|
2013-08-01 11:57:10 +02:00
|
|
|
--with-cupsppddir=%{_datadir}/cups/model/manufacturer-PPDs
|
2011-09-27 15:02:44 +02:00
|
|
|
make
|
|
|
|
|
|
|
|
%install
|
|
|
|
# See lsb/lsb-rpm.spec
|
|
|
|
# Make directories:
|
|
|
|
install -d %{buildroot}/usr/lib/cups/filter
|
|
|
|
install -d %{buildroot}%{_libdir}
|
|
|
|
install -d %{buildroot}%{_datadir}
|
|
|
|
install -d %{buildroot}%{_defaultdocdir}/%{name}
|
|
|
|
make install DESTDIR=%{buildroot}
|
|
|
|
install -m 644 README README.ja COPYING AUTHORS NEWS %{buildroot}%{_defaultdocdir}/%{name}
|
|
|
|
rm -f %{buildroot}%{_libdir}/libescpr.a
|
|
|
|
rm -f %{buildroot}%{_libdir}/libescpr.la
|
|
|
|
# Compress PPDs:
|
|
|
|
pushd %{buildroot}%{_datadir}/cups/model/manufacturer-PPDs/epson-inkjet-printer-escpr
|
|
|
|
# Do not pollute the build log file with meaningless messages:
|
|
|
|
set +x
|
|
|
|
# For now keep all PPDs even if cupstestppd FAILs.
|
|
|
|
# Reason:
|
|
|
|
# With each CUPS version upgrade cupstestppd finds more and more errors
|
|
|
|
# so that more and more PPDs would be no longer included in the RPM
|
|
|
|
# which have been included before which results a regression.
|
|
|
|
# As far as we know there have been no problems at all because of
|
|
|
|
# not strictly compliant PPDs so that it is much better to provide all PPDs
|
|
|
|
# so that the matching printers can be used than to be rigorous regarding
|
|
|
|
# enforcing compliance to the PPD specification:
|
|
|
|
for p in *.ppd
|
|
|
|
do echo -n "$p: "
|
|
|
|
grep -E -v '^\*UIConstraints:|^\*NonUIConstraints:|^\*cupsFilter:' $p | cupstestppd - || true
|
|
|
|
gzip $p
|
|
|
|
done
|
|
|
|
# Switch back to the usual build log messages:
|
|
|
|
set -x
|
|
|
|
popd
|
|
|
|
|
2012-02-08 14:16:45 +01:00
|
|
|
%post
|
|
|
|
/sbin/ldconfig
|
|
|
|
exit 0
|
2011-09-27 15:02:44 +02:00
|
|
|
|
2012-02-08 14:16:45 +01:00
|
|
|
%postun
|
|
|
|
/sbin/ldconfig
|
|
|
|
exit 0
|
2011-09-27 15:02:44 +02:00
|
|
|
|
2011-10-04 11:29:09 +02:00
|
|
|
%files
|
|
|
|
# The files sections list all mandatory files explicitly one by one.
|
|
|
|
# In particular all executables are listed explicitly.
|
2011-09-27 15:02:44 +02:00
|
|
|
# This avoids that the configure magic might silently
|
|
|
|
# not build and install an executable when whatever condition
|
|
|
|
# for configure's automated tests is not fulfilled in the build system.
|
2011-10-04 11:29:09 +02:00
|
|
|
# When all mandatory files are explicitly listed,
|
2011-09-27 15:02:44 +02:00
|
|
|
# the build fails intentionally if a mandatory file was not built
|
|
|
|
# which ensures that already existing correctly built binary RPMs
|
|
|
|
# are not overwritten by broken RPMs where mandatory files are missing.
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libescpr.*
|
|
|
|
%dir /usr/lib/cups
|
|
|
|
%dir /usr/lib/cups/filter
|
|
|
|
/usr/lib/cups/filter/epson-escpr
|
|
|
|
/usr/lib/cups/filter/epson-escpr-wrapper
|
|
|
|
%dir %{_datadir}/cups
|
|
|
|
%dir %{_datadir}/cups/model
|
|
|
|
%dir %{_datadir}/cups/model/manufacturer-PPDs
|
|
|
|
%{_datadir}/cups/model/manufacturer-PPDs/epson-inkjet-printer-escpr/
|
|
|
|
%doc %{_defaultdocdir}/%{name}/
|
|
|
|
|
|
|
|
%changelog
|