%define driverversion 5.2 %define extraversion %nil %define gutenprintmajor 2 %define libgutenprint %mklibname gutenprint %{gutenprintmajor} %define gutenprintui2major 1 %define libgutenprintui2 %mklibname gutenprintui2_ %{gutenprintui2major} %define cups_serverbin %{_exec_prefix}/lib/cups %define gimpplugin 1 ##### RPM PROBLEM WORKAROUNDS Summary: Photo-quality printer drivers primarily for inkjet printers Name: gutenprint Version: 5.2.11 Release: %mkrel 2 License: GPLv2+ Group: Publishing URL: http://gimp-print.sourceforge.net/ ##### GENERAL BUILDREQUIRES BuildRequires: autoconf2.5 BuildRequires: bison BuildRequires: flex BuildRequires: libtool BuildRequires: imagemagick BuildRequires: gettext-devel BuildRequires: foomatic-db BuildRequires: foomatic-db-engine BuildRequires: libcups-devel >= 1.2.0-0.5361.0mdk BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: libijs-devel BuildRequires: libjpeg-static-devel BuildRequires: libtiff-devel BuildRequires: chrpath BuildRequires: pkgconfig(libusb-1.0) # Make sure we get postscriptdriver tags: BuildRequires: python-cups %if %{gimpplugin} BuildRequires: pkgconfig(gimpui-2.0) %endif # Only needed when building Gutenprint from a CVS snapshot #BuildRequires: tetex-latex imagemagick docbook-utils sgml-tools ##### GIMP PRINT SOURCE Source: http://downloads.sourceforge.net/gimp-print/%{name}-%{version}.tar.bz2 ##### GIMP PRINT PATCHES Patch1: gutenprint-5.0.1-menu.patch Patch3: gutenprint-5.2.3-default-a4.patch # See: http://www.openprinting.org/printer/Brother/Brother-HL-2030 Patch4: gutenprint-5.2.9-fix-brother-hl-2030-support.patch Patch5: gutenprint-5.2.9-m4dir.patch Patch6: gutenprint-5.2.11-ijs-config.patch ##### 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 -n %{libgutenprintui2} Summary: Shared library for Gutenprint GUI with GTK 2.x Group: Publishing Provides: libgutenprintui2 = %{version}-%{release} %package -n %{libgutenprintui2}-devel Summary: Headers and links for compiling against libgutenprintui2 Group: Development/C Requires: %{libgutenprintui2} >= %{version}-%{release} Requires: multiarch-utils Provides: libgutenprintui2-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: foomatic-db, foomatic-db-engine 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 Requires: gutenprint-common >= %{version}-%{release} 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 -n %{libgutenprintui2} This is a GTK-2.x-based GUI library to create dialogs to control the Gutenprint printer drivers. %description -n %{libgutenprintui2}-devel These are the links and header files to compile applications which should use the libgutenprintui2 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 # unpack main sources %setup -q -n gutenprint-%{version}%{extraversion} %patch1 -p1 -b .menu %patch3 -p1 -b .a4 %patch4 -p0 -b .mga1349 %patch5 -p1 -b .m4 %patch6 -p0 -b .ijs %build # "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 %{gimpplugin} %define enablegimpplugin --with-gimp2 %else %define enablegimpplugin --without-gimp2 %endif autoreconf -fi %configure2_5x \ --enable-shared \ --disable-rpath \ --enable-libgutenprintui2 \ --enable-cups-1_2-enhancements \ --disable-cups-ppds \ %enablegimpplugin \ --with-cups \ --enable-cups-level3-ppds \ --enable-simplified-cups-ppds \ --disable-static-genppd \ --disable-translated-cups-ppds \ --with-foomatic \ --with-foomatic3 # Compile Gutenprint %make %install %makeinstall_std # Remove /usr/share/foomatic/kitload.log rm -f %{buildroot}%{_datadir}/foomatic/kitload.log # Remove "canon" and "epson" CUPS backends rm -f %{buildroot}%{_prefix}/lib*/cups/backend/canon rm -f %{buildroot}%{_prefix}/lib*/cups/backend/epson # Remove a GTK-1.x file which is installed even when GTK-1.x support # is disabled (Gutenprint bug) rm -f %{buildroot}%{_libdir}/pkgconfig/gutenprintui.pc # Correct permissions find %{buildroot} -name '*.la' -delete find %{buildroot} -name '*.a' -delete # Fix up rpath. for file in \ %{buildroot}%{_sbindir}/cups-genppd.5.2 \ %{buildroot}%{_libdir}/gimp/*/plug-ins/* \ %{buildroot}%{_libdir}/*.so.* \ %{buildroot}%{cups_serverbin}/driver/* \ %{buildroot}%{cups_serverbin}/filter/* \ %{buildroot}%{_bindir}/* do chrpath --delete ${file} done # Translation files of Gutenprint # find %{buildroot} -regex ".*/gutenprint.*.mo" | sed -e "s@^%{buildroot}@@" > gutenprint.lang %find_lang %{name} # Delete translation source files find %{buildroot}%{_datadir}/locale/ -name "*.po" | xargs rm -f mkdir -p %{buildroot}%{_libdir}/gutenprint/%{driverversion} ##### FILES %files -n %{libgutenprint} %{_libdir}/libgutenprint.so.%{gutenprintmajor} %{_libdir}/libgutenprint.so.%{gutenprintmajor}.* %dir %{_libdir}/gutenprint/%{driverversion} %files -n %{libgutenprint}-devel %{_libdir}/libgutenprint.so %{_libdir}/pkgconfig/gutenprint.pc %{_includedir}/gutenprint %files -n %{libgutenprintui2} %{_libdir}/libgutenprintui2.so.%{gutenprintui2major} %{_libdir}/libgutenprintui2.so.%{gutenprintui2major}.* %files -n %{libgutenprintui2}-devel %{_libdir}/libgutenprintui2.so %{_libdir}/pkgconfig/gutenprintui2.pc %{_includedir}/gutenprintui2 %files common -f gutenprint.lang %doc ABOUT-NLS AUTHORS NEWS README %{_bindir}/testpattern %{_datadir}/gutenprint %dir %{_libdir}/gutenprint %files cups %{_mandir}/man8/cups-* %{_bindir}/cups-* %{_sbindir}/cups-* #%%{_datadir}/cups/model/* %{_datadir}/cups/calibrate.ppm %{_datadir}/cups/usb/net.sf.gimp-print.usb-quirks %attr(0755,root,root) %{_prefix}/lib*/cups/backend/* %attr(0755,root,root) %{_prefix}/lib*/cups/driver/gutenprint.%{driverversion} %attr(0755,root,root) %{_prefix}/lib*/cups/filter/* %config(noreplace) %{_sysconfdir}/cups/command.* %files ijs %{_mandir}/man1/ijsgutenprint.1* %{_bindir}/ijsgutenprint* %files foomatic %_datadir/foomatic/db/*/*/*.xml %files escputil %{_mandir}/man1/escputil* %attr(0755,lp,sys) %{_bindir}/escputil %if %{gimpplugin} %files gimp2 %{_libdir}/gimp/2.0/plug-ins/gutenprint %endif %post common %_install_info gutenprint : %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>&1 || : # Update print queues with Gutenprint CUPS driver /usr/sbin/cups-genppdupdate > /dev/null 2>/dev/null || : %post foomatic # Update print queues with Gimp-Print/Gutenprint IJS driver ls /etc/cups/ppd/*.ppd > /dev/null 2>&1 && \ 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 exit 0 %postun common %_remove_install_info gutenprint : %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 # Do not restart on upgrades, as it is already restarted by post section. if [ $1 -eq 1 ]; then /sbin/service cups condrestart || : fi %changelog * Sat May 21 2016 luigiwalser <luigiwalser> 5.2.11-2.mga6 + Revision: 1017383 - add upstream patch to use pkgconfig instead of ijs-config to find ijs - call autoreconf instead of non-existent autogen.sh * Mon May 09 2016 luigiwalser <luigiwalser> 5.2.11-1.mga6 + Revision: 1011380 - 5.2.11 * Mon Feb 08 2016 umeabot <umeabot> 5.2.10-6.mga6 + Revision: 950671 - Mageia 6 Mass Rebuild * Fri Nov 14 2014 luigiwalser <luigiwalser> 5.2.10-5.mga5 + Revision: 797289 - silence service command output in gutenprint-cups post scriplet (mga#14512) * Thu Nov 13 2014 tv <tv> 5.2.10-4.mga5 + Revision: 796724 - BR python-cups so that we got postscriptdriver provides * Wed Oct 15 2014 umeabot <umeabot> 5.2.10-3.mga5 + Revision: 740717 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot <umeabot> 5.2.10-2.mga5 + Revision: 680053 - Mageia 5 Mass Rebuild * Fri Jul 11 2014 luigiwalser <luigiwalser> 5.2.10-1.mga5 + Revision: 651153 - 5.2.10 - rediff patch 4 - remove upstreamed patch 6 - pkgconfig some BRs and add libusb1 * Wed Mar 19 2014 dglent <dglent> 5.2.9-6.mga5 + Revision: 605540 - Increase release number - Install translations for installed locales only * Sat Oct 19 2013 umeabot <umeabot> 5.2.9-5.mga4 + Revision: 534304 - Mageia 4 Mass Rebuild * Tue Sep 10 2013 fwang <fwang> 5.2.9-4.mga4 + Revision: 477189 - build with default args - fix wrong lib detection in configure - build static genppd * Tue Sep 10 2013 fwang <fwang> 5.2.9-3.mga4 + Revision: 477165 - enable cups 1.2 build - lock libmajor + dglent <dglent> - delete source translation files (mga#2607) * Sat Jan 12 2013 umeabot <umeabot> 5.2.9-2.mga3 + Revision: 353018 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Aug 01 2012 fedya <fedya> 5.2.9-1.mga3 + Revision: 277260 - rpmlint text formatting fixes - version update * Tue Jan 17 2012 doktor5000 <doktor5000> 5.2.7-3.mga2 + Revision: 197380 - remove useless debug handling * Fri Jan 13 2012 doktor5000 <doktor5000> 5.2.7-2.mga2 + Revision: 195500 - add patch for missing includes in commandtocanon.c and in commandtoepson.c (fix-missing-includes.patch, from Fedora) - remove unrecognized configure options (--disable-libgutenprintui, --without-gimp, --with-ijs) + dmorgan <dmorgan> - According to openprinting.org, use hl1250 as default pilot for the Brother-HL-2030 printer - Remove buildroot definition + tv <tv> - new release * Wed Feb 23 2011 ennael <ennael> 5.2.6-1.mga1 + Revision: 57925 - fix deletion - remove mdk tests - more cleaning - clean spec file - imported package gutenprint