%define version 5.0.0 %define driverversion 5.0 #define extraversion %nil %define extraversion -rc1 %define release 0.9mdk %define gutenprintmajor 2 %define libgutenprint %mklibname gutenprint %{gutenprintmajor} %define gimpplugin 1 %define debug 0 ##### RPM PROBLEM WORKAROUNDS # Suppress automatically generated Requires for Perl libraries. #define _requires_exceptions perl\(.*\) #define _unpackaged_files_terminate_build 0 #define _missing_doc_files_terminate_build 0 Summary: Photo-quality printer drivers primarily for inkjet printers Name: gutenprint Version: %{version} Release: %{release} License: GPL Group: Publishing URL: http://gimp-print.sourceforge.net/ ##### GENERAL BUILDREQUIRES BuildRequires: autoconf2.5, libtiff-devel, glib-devel BuildRequires: libcups-devel, libgtk+-devel, libgtk+2-devel, BuildRequires: libjpeg-static-devel BuildRequires: foomatic-db-engine, foomatic-db BuildRequires: bison, flex, libijs-devel BuildConflicts: libgutenprint, libgutenprint-devel %if %{gimpplugin} BuildRequires: libgimp-devel %endif # Only needed when building Gutenprint from a CVS snapshot #BuildRequires: tetex-latex ImageMagick docbook-utils sgml-tools ##### GIMP PRINT SOURCE Source: http://cesnet.dl.sourceforge.net/sourceforge/gimp-print/gutenprint-%{version}%{extraversion}.tar.bz2 #Source: http://heanet.dl.sourceforge.net/sourceforge/gimp-print/gutenprint20050813.tar.bz2 #Source: http://gimp-print.sourceforge.net/gutenprint-%{version}-cvs20020820.tar.bz2 ##### GIMP PRINT PATCHES ##### BUILD ROOT BuildRoot: %_tmppath/%name-%version-%release-root ##### PACKAGE DESCRIPTIONS %package -n %{libgutenprint} Summary: Shared library for high-quality image printing Group: Publishing Provides: libgutenprint = %{version}-%{release} %package -n %{libgutenprint}-devel Summary: Headers and links for compiling against libgutenprint Group: Development/C Requires: %{libgutenprint} >= %{version}-%{release} Requires: multiarch-utils Provides: libgutenprint-devel = %{version}-%{release} Provides: gutenprint-devel = %{version}-%{release} %package common Summary: Documentation, samples and translations of Gutenprint Obsoletes: gimpprint-common Provides: gimpprint-common Group: Publishing %package cups Summary: Special CUPS printer driver of Gutenprint Requires: cups >= 1.1 Requires: gutenprint-common >= %{version}-%{release} Conflicts: cups-drivers <= 10.1 Obsoletes: gimpprint-cups Provides: gimpprint-cups Group: Publishing %package ijs Summary: Gutenprint IJS plugin for GhostScript Requires: ghostscript >= 7.05 Requires: gutenprint-common >= %{version}-%{release} Conflicts: printer-filters <= 10.1 Obsoletes: gimpprint-ijs Provides: gimpprint-ijs Group: Publishing %package foomatic Summary: Foomatic data for Gutenprint IJS plugin for GhostScript Requires: gutenprint-ijs == %{version}, foomatic-db, foomatic-db-engine Requires: gutenprint-common >= %{version}-%{release} Conflicts: foomatic-db < 20050101 Obsoletes: gimpprint-foomatic Provides: gimpprint-foomatic Group: Publishing %package escputil Summary: Gutenprint ink level monitor and printer maintenance tool Requires: gutenprint-common >= %{version}-%{release} Conflicts: printer-utils <= 10.1 Obsoletes: gimpprint-escputil Provides: gimpprint-escputil Group: Publishing %if %{gimpplugin} %package gimp2 Summary: Gutenprint plugin for high-quality image printing Group: Publishing Requires: gimp >= 2.2.7-2mdk Requires: gutenprint-common >= %{version}-%{release} Conflicts: gimp < 2.2.7-2mdk Obsoletes: gimpprint-gimp2 Provides: gimpprint-gimp2 %endif ##### DESCRIPTION TEXTS %description Gutenprint is a high quality printer driver suite for photo-quality printing on inkjet printers, especially Epson. There are also some Canon, HP, and Lexmark inkjets (older models) and PCL bw laser printers supported (PCL 5e and earlier). If your printer is supported by Gutenprint and not an HP printer supported by HPIJS, this is the best choice of a free software printer driver. Keep in mind that the leader of this project is hobby photographer and wanted to get his 6-ink Epson Stylus Photo EX working in its best quality without necessity of proprietary software. %description -n %{libgutenprint} This is a high-quality printing library used by the Gutenprint plugin, the Gutenprint IJS color/photo inkjet/laser driver for GhostScript, and by specialized CUPS drivers. %description -n %{libgutenprint}-devel These are the links and header files to compile applications which should use the libgutenprint library. %description common Documentation, sample files, and translations of Gutenprint. %description cups This package contains a special Gutenprint printer driver to be used with CUPS (and without GhostScript) and also the appropriate PPD files to set up print queues with this driver. With the Gutenprint CUPS drivers you can do a colour caibration. Use the program "cups-calibrate" to perform it. %description ijs This package contains a Gutenprint plugin for GhostScripts IJS interface. This gives access to the high printing quality of Gutenprint with every GhostScript version containing the IJS interface. Install also the gutenprint-foomatic package for easy setup of print queues with arbitrary printing systems. %description foomatic Foomatic data for the Gutenprint IJS plug-in for GhostScript. You need this package to set up print queues with printerdrake, KDE Printing Manager, or directly with Foomatic. %description escputil This is a command line tool to query ink levels and to maintain Epson's inkjet printers. It allows ink level query, head alignment, nozzle checking, and nozzle cleaning. If you want a graphical interface, use mtink instead. %if %{gimpplugin} %description gimp2 This is a plug-in for the GIMP, which allows printing of images and photos in very high quality on many modern inkjet printers and also some lasers. Especially on Epson Stylus printers the quality which one gets under proprietary operating systems is reached, due to Epson publishing the protocols of their printers, but other brands of printers give very high qualities, too. It can also output PostScript to be able to print out of the GIMP on any printer. %endif %prep # remove old directory rm -rf $RPM_BUILD_DIR/gutenprint-%{version}* rm -rf $RPM_BUILD_DIR/gutenprint20050813 # unpack main sources %setup -q -n gutenprint-%{version}%{extraversion} #setup -q -n gutenprint20050813 # Fix portuguese translation perl -p -i -e 's/<Imagem>/<Image>/g' po/pt.po %build # Change compiler flags for debugging when in debug mode %if %debug export DONT_STRIP=1 export CFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`" export CXXFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`" export RPM_OPT_FLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`" %endif # "autogen.sh" needed for the case when Gutenprint # driver is from CVS (see its README) or if build system is patched. #export NOCONFIGURE=1; ./autogen.sh # Build with all pipes and whistles: GIMP, GhostScript, CUPS, IJS, Foomatic, # but without translated PPD files (does not work) # Use IJS library provided by this package %if %debug %define enabledebug --enable-debug %else %define enabledebug %nil %endif %if %{gimpplugin} %configure --enable-shared --disable-rpath --enable-libgutenprintui --enable-libgutenprintui2 --without-gimp --with-gimp2 --with-cups --with-ijs --with-foomatic --with-foomatic3 --enable-cups-level3-ppds --disable-translated-cups-ppds --disable-cups-level3-ps --disable-static-genppd %enabledebug %else %configure --enable-shared --disable-rpath --disable-libgutenprintui --enable-libgutenprintui2 --without-gimp --without-gimp2 --with-cups --with-ijs --with-foomatic --with-foomatic3 --enable-cups-level3-ppds --disable-translated-cups-ppds --disable-cups-level3-ps --disable-static-genppd %enabledebug %endif # Compile Gutenprint %make %install rm -rf %{buildroot} # Change compiler flags for debugging when in debug mode %if %debug export DONT_STRIP=1 export CFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`" export CXXFLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`" export RPM_OPT_FLAGS="`echo %optflags |sed -e 's/-O3/-g/' |sed -e 's/-O2/-g/'`" %endif make DESTDIR=%{buildroot} install # Remove /usr/share/foomatic/kitload.log rm -f %{buildroot}%{_datadir}/foomatic/kitload.log # Correct permissions chmod a-x %{buildroot}%{_libdir}/*.la # Translation files of Gutenprint %find_lang gutenprint # Multiarch setup #multiarch_binaries %buildroot%{_bindir}/gutenprint-config ##### FILES #BUG? nc 2003-12-06 %files -n %{libgutenprint} %defattr(-,root,root) %{_libdir}/*.so.* %dir %{_libdir}/gutenprint/* #dir %{_libdir}/gutenprint/*/modules #{_libdir}/gutenprint/*/modules/*.so %files -n %{libgutenprint}-devel %defattr(-,root,root) %{_libdir}/*.so %{_libdir}/*.la %{_libdir}/*.a #{_libdir}/gutenprint/*/modules/*.so #{_libdir}/gutenprint/*/modules/*.la #{_libdir}/gutenprint/*/modules/*.a %{_libdir}/pkgconfig/* %{_includedir}/* %files common -f gutenprint.lang %defattr(-,root,root) %doc ABOUT-NLS AUTHORS COPYING ChangeLog NEWS README %{_bindir}/testpattern %{_datadir}/gutenprint %dir %{_libdir}/gutenprint %files cups %defattr(-,root,root) %{_mandir}/man8/cups-* %{_bindir}/cups-* %{_sbindir}/cups-* %{_datadir}/cups/model/* %{_datadir}/cups/calibrate.ppm %attr(0755,root,root) %{_libdir}/cups/backend/* %attr(0755,root,root) %{_libdir}/cups/filter/* %config(noreplace) %{_sysconfdir}/cups/command.* %files ijs %defattr(-,root,root) %{_mandir}/man1/ijsgutenprint.1* %{_bindir}/ijsgutenprint* %files foomatic %defattr(-,root,root) %_datadir/foomatic/db/*/*/*.xml %files escputil %defattr(-,root,root) %{_mandir}/man1/escputil* %attr(0755,lp,sys) %{_bindir}/escputil %if %{gimpplugin} %files gimp2 %defattr(-,root,root) %{_libdir}/gimp/2.0/plug-ins/print %endif %define info_files gutenprint %post -n %{libgutenprint} -p /sbin/ldconfig %post common for f in %info_files; do %_install_info $f done : %post cups # Restart the CUPS daemon when it is running, but do not start it when it # is not running. The restart of the CUPS daemon updates the CUPS-internal # PPD index /sbin/service cups condrestart > /dev/null 2>/dev/null || : # Update print queues with Gutenprint CUPS driver /usr/sbin/cups-genppdupdate.%{driverversion} > /dev/null 2>/dev/null || : %post foomatic # Update print queues with Gimp-Print/Gutenprint IJS driver for f in /etc/cups/ppd/*.ppd; do \ queue=`basename ${f%%.ppd}`; \ egrep -q '\*FoomaticIDs.*(gimp-print|gutenprint)' $f && \ foomatic-configure -n $queue -f \ -d gutenprint-ijs.%{driverversion} \ >/dev/null 2>&1 || :; \ done %postun -n %{libgutenprint} -p /sbin/ldconfig %postun common for f in %info_files; do %_remove_install_info $f done : %postun cups # Restart the CUPS daemon when it is running, but do not start it when it # is not running. The restart of the CUPS daemon updates the CUPS-internal # PPD index /sbin/service cups condrestart > /dev/null 2>/dev/null || : %clean rm -rf %{buildroot} %changelog * Fri Sep 2 2005 Till Kamppeter <till@mandriva.com> 5.0.0-0.9mdk - Updated to version 5.0.0-rc1. - Removed sources 10 and 11, they were added upstream. - Cleaned up spec file. * Tue Aug 30 2005 Till Kamppeter <till@mandriva.com> 5.0.0-0.8mdk - Enebled compilation of libgutenprintui, for Cinepaint printing support. * Fri Aug 26 2005 Till Kamppeter <till@mandriva.com> 5.0.0-0.7mdk - Fixed "PlainPIXMA" paper type entry for Canon inkjets. - Really suppress translated CUPS PPDs. - Added "BuildConflicts: libgutenprint, libgutenprint-devel", otherwise the CUPS PPD building is based on an old libgutenprint installed on the build system and not on the libgutenprint of this package. * Thu Aug 25 2005 Till Kamppeter <till@mandriva.com> 5.0.0-0.6mdk - Improved debug mode of this RPM. - Added "Requires: gutenprint-common" to the subpackages. With missing gutenprint-common non of the subpackages work and none of the subpackages gives clear error messages. - Made names for paper source and paper type options in Foomatic data Adobe-compliant: InputSlot and MediaType instead of STP_InputSlot and STP_MediaType (sources 10 and 11). * Thu Aug 25 2005 Till Kamppeter <till@mandriva.com> 5.0.0-0.5mdk - Re-uploaded because of full disk on kenobi. * Thu Aug 25 2005 Till Kamppeter <till@mandriva.com> 5.0.0-0.4mdk - Fixed bug in portuguese translation (bug 17790). * Wed Aug 24 2005 Till Kamppeter <till@mandriva.com> 5.0.0-0.3mdk - Updated to the snapshot from 13/08/2005. * Thu May 12 2005 Till Kamppeter <till@mandrakesoft.com> 5.0.0-0.2mdk - Require gimp-2.2.7-2mdk or newer for the GIMP printing plug-in, older versions conflict due to having their own Gimp-Print 4.2.7 printing plug-in. * Tue May 10 2005 Till Kamppeter <till@mandrakesoft.com> 5.0.0-0.1mdk - Gutenprint, the successor of Gimp-Print - Added automatic update for existing print queues