File pipslite.spec of Package pipslite

#
# spec file for package pipslite (Version 1.0.0)
#
# Copyright (c) 2008 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
# 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/
#



Name:           pipslite
BuildRequires:  cups-devel db1-devel e2fsprogs-devel esound-devel gcc-c++ gdk-pixbuf-devel gimp-devel gnome-common libjpeg-devel libtiff-devel libxml-devel openssl-devel popt-devel sane-backends update-desktop-files
Url:            http://www.avasys.jp/english/linux_e/index.html
License:        GPL v2 or later; LGPL v2.1 or later
Group:          Hardware/Printing
AutoReqProv:    on
Summary:        Epson Photo Image Print System Lite
# URL for Source0: http://lx2.avasys.jp/pips/lite1.0.0/pipslite-1.0.0.tar.gz
# This source contains a binary-only library lib/liblite.so
# and the matching proprietary license files EAPL.en.txt and EAPL.ja.txt
# which are mentioned in the doc/readmelite* files.
# This is all removed because with Patch4 it can also build liblite.so
# from the free sources so that there is no need for the proprietary stuff. 
Source0:        pipslite-1.0.0.tar.bz2
Version:        1.0.0
Release:        300
# Patch0 fixes GCC4 "invalid lvalue in assignment" errors:
Patch0:         fix-invalid_lvalue_in_assignment.diff
# Patch1 fixes a "label at end of compound statement" error in ekpstm/main.c:
Patch1:         fix-ekpstm-main.c.diff
# Patch2 fixes a "conflicting types for 'inkbox_get_inkid'" error in ekpstm/inkbox.c:
Patch2:         fix-ekpstm-inkbox.h.diff
# Patch4 disables the installation of a binary-only liblite.so in lib/Makefile.am:
Patch4:         lib-Makefile.am.diff
# Patch5 changes the '/var/ekpd' to '/var/run' in ekpd/Makefile.am:
Patch5:         ekpd-Makefile.am.diff
# Patch6 fixes a duplicate source file in src/Makefile.in:
Patch6:         src-Makefile.am.diff
# Patch7 removes text about binary-only sources and EAPL license from the readmelite* files:
Patch7:         adapt-readmelite-for-free.patch
# Fix use of libltdl
Patch8:         makeinstall-Makefile.am.diff
# multiple buffer overflow :(
Patch9:         pipslite-1.0.0-destbufferoverflow.patch
# Install into this non-root directory (required when norootforbuild is used):
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# Skip testing devel dependencies required by libtool .la files by the following comment:
# skip-check-libtool-deps

%prep
# Be quiet when unpacking:
%setup -q
# Patch0 fixes GCC4 "invalid lvalue in assignment" errors:
%patch0
# Patch1 fixes a "label at end of compound statement" error in ekpstm/main.c:
%patch1
# Patch2 fixes a "conflicting types for 'inkbox_get_inkid'" error in ekpstm/inkbox.c:
%patch2
# Change any hardcoded 'local/EPAva' to 'lib[64]/EPAva' in any regular file in the sources:
for f in $( find . -type f )
do sed -i -e 's|local/EPAva|%{_lib}/EPAva|g' $f
done
# Patch4 disables the installation of a binary-only liblite.so in lib/Makefile.am:
%patch4
# Patch5 changes the '/var/ekpd' to '/var/run' in ekpd/Makefile.am:
# (because creating a sub-directory ekpd/ in /var/ is not allowed):
%patch5
# Change any hardcoded '/var/ekpd/ekplp0' to '/var/run/ekplp0' in any regular file in the sources
# (unfortunately Patch5 is not sufficient):
for f in $( find . -type f )
do sed -i -e 's|/var/ekpd/ekplp0|/var/run/ekplp0|g' $f
done
# Patch6 fixes a duplicate source file in src/Makefile.in:
%patch6
# Patch7 removes text about binary-only sources and EAPL license from the readmelite* files:
%patch7
# Fix use of libltdl
%patch8
%patch9

%build
# Make sure config.rpath is present:
cp /usr/share/gettext/config.rpath .
autoreconf -fi
# Set our preferred architecture-specific flags for the compiler and linker:
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
export CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing"
# See /usr/lib/rpm/suse_macros regarding our RPM macros (e.g. sysconfdir is /etc):
%configure --disable-static --with-pic
%{__make} %{?jobs:-j%jobs}

%install
make install DESTDIR=${RPM_BUILD_ROOT}
%find_lang %{name}
rm %{buildroot}%{_libdir}/*.la

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files -f %{name}.lang
%defattr(-,root,root)
%doc README COPYING COPYING.LIB AUTHORS NEWS ChangeLog
%config %{_sysconfdir}/ekpdrc
%{_bindir}/ekpstm
%{_bindir}/pipslite
%dir %{_libdir}/cups
%dir %{_libdir}/cups/backend
%{_libdir}/cups/backend/ekplp
%dir %{_libdir}/cups/filter
%{_libdir}/cups/filter/pipstoprinter
%{_libdir}/cups/filter/rastertopips
%{_libdir}/liblite.*
%{_libdir}/EPAva/
%{_var}/run/ekplp0

%description
This free software from Epson is a printer driver (filter) for Epson
color ink jet printers which support the Epson ESC/P-R printer
language. Do not confuse it with Epson's proprietary Photo Image Print
System (without the "Lite").

At the moment it is considered as "alpha" state because it is not in
compliance how CUPS works. For example there are no readymade PPD files
but you can create one by calling a special command. Additionally the
output device is fixed set for one single printer in /etc/ekpdrc and
the DeviceURI setting for the CUPS backend is ignored. Therefore it
should be possible to manually set up this software for CUPS (or for
another printing system like LPRng/lpdfilter) but there is no support
by any of the usual CUPS printer setup tools. Use setup-cups.sh to
setup and pipslite-install to make a PPD file. For documentation see
the "readmelite" files.

Once you have made such a PPD file, it may also work without the
special CUPS backend ekplp which requires the special ekpd daemon. I.e.
it may work only with the PPD file which uses the rastertopips filter
and the usual CUPS "usb" backend so that this setup would be in
compliance to CUPS.



Authors:
--------
    EPSON AVASYS corporation. <http://www.avasys.jp/>

%changelog
* Thu Oct 09 2008 crrodriguez@suse.de
- fix multiple buffer overflows in rscCtl.c
- do not ship static libraries
- use %%find_lang macro
* Wed May 07 2008 schwab@suse.de
- Fix use of libltdl.
* Wed May 23 2007 jsmeix@suse.de
- Use /usr/lib[64]/EPAva/ instead of /usr/share/EPAva/ to avoid
  arch-dependent files (e.g. ELF binaries) in /usr/share/.
* Mon Jan 29 2007 jsmeix@suse.de
- Package 'sane' was renamed to 'sane-backends'.
  Adapted it so that it works with 'sane-backends'
* Tue Oct 17 2006 jsmeix@suse.de
- Updated to latest available sources (same version number):
  Some more supported printers.
* Mon Oct 16 2006 schwab@suse.de
- Make sure config.rpath is present.
* Wed Aug 02 2006 schwab@suse.de
- Fix duplicate source file.
* Mon Jun 12 2006 ro@suse.de
- remove unused gnome-vfs and oaf from BuildRequires
* Wed Apr 05 2006 jsmeix@suse.de
- initial version
openSUSE Build Service is sponsored by