%define version 3.0.2 %define releasedate 20060827 %define release %mkrel 1.%{releasedate}.1 ##### 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 ##### GENERAL DEFINITIONS Name: foomatic-filters Version: %{version} Release: %{release} Summary: Foomatic filters needed to run print queues with Foomatic PPDs License: GPL Group: System/Servers Url: http://www.linuxprinting.org/ Requires: mpage %ifarch x86_64 Conflicts: cups < 1.2.0-0.5361.0mdk %endif Obsoletes: foomatic Provides: foomatic BuildArchitectures: noarch ##### BUILDREQUIRES BuildRequires: autoconf2.5 BuildRequires: perl-devel, file, libxml2-devel, mpage %ifarch x86_64 BuildRequires: cups >= 1.2.0-0.5361.0mdk %else BuildRequires: cups >= 1.2.0 %endif ##### SOURCES # Foomatic packages Source: http://www.linuxprinting.org/download/foomatic/%{name}-%{version}-%{releasedate}.tar.bz2 ##### BUILD ROOT BuildRoot: %_tmppath/%name-%version-%release-root ##### PACKAGE DESCRIPTION %description -n foomatic-filters Foomatic is a comprehensive, spooler-independent database of printers, printer drivers, and driver descriptions. It contains utilities to generate PPD (Postscript Printer Description) files and printer queues for CUPS, LPD, GNUlpr, LPRng, PPR, and PDQ using the database. There is also the possibility to read the PJL options out of PJL-capable laser printers and take them into account at the driver description file generation. There are spooler-independent command line interfaces to manipulate queues (foomatic-configure) and to print files/manipulate jobs (foomatic printjob). The site http://www.linuxprinting.org/ is based on this database. This package contains the filters needed to run print queues based on Foomatic PPD files. %prep # remove old directory rm -rf $RPM_BUILD_DIR/%{name}-%{version}-* ##### FOOMATIC # Source trees for installation %setup -q -n %{name}-%{version}-%{releasedate} %if 0 # Modifications to make package building on 64-bit-systems perl -p -i -e 's:\blib\b:\$LIB:g' configure.ac perl -p -i -e 's!(AC_PROG_MAKE_SET)!$1 AC_PROG_CC host_os=`uname -s` host_cpu=`uname -m` case \$host_os in *Linux*) # Test if the compiler is 64bit echo "int i;" > conftest.\$ac_ext foomatic_cv_cc_64bit_output=no if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.\$ac_objext` in *"ELF 64"*) foomatic_cv_cc_64bit_output=yes ;; esac fi rm -rf conftest* ;; esac case \$host_cpu:\$foomatic_cv_cc_64bit_output in ppc64:yes | s390x:yes | sparc64:yes | x86_64:yes) LIB="lib64" ;; *:*) LIB="lib" ;; esac!' configure.ac %endif %build # Makefile generation ("./make_configure" for CVS snapshots) ./make_configure %configure # Do not use "make" macro, as parallelized build of Foomatic does not # work. make %install rm -rf %{buildroot} # Make directories install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_sysconfdir} install -d %{buildroot}%{_mandir}/man1 # Install program files make PREFIX=%{_prefix} \ DESTDIR=%buildroot \ install # Remove superfluous file rm -f %buildroot/etc/foomatic/filter.conf.sample # Link to make Foomatic 2.0.x CUPS queues working with Foomatic 3.0.x ln -s ../../../bin/foomatic-rip %buildroot%{_prefix}/lib/cups/filter/cupsomatic # Install documentation install -d %buildroot%{_docdir}/foomatic-filters-%{version} cp README USAGE TODO ChangeLog \ %buildroot%{_docdir}/foomatic-filters-%{version} ##### GENERAL STUFF # Correct permissions for all documentation files chmod -R a+rX %{buildroot}%{_docdir} chmod -R a-x %{buildroot}%{_docdir}/*/* chmod -R go-w %{buildroot}%{_docdir} chmod -R u+w %{buildroot}%{_docdir} %post # 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 # backend index /sbin/service cups condrestart > /dev/null 2>/dev/null || : %postun # 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 # backend index /sbin/service cups condrestart > /dev/null 2>/dev/null || : ##### FILES %files %defattr(-,root,root) %docdir %{_docdir}/%{name}-%{version} %{_docdir}/%{name}-%{version} %_bindir/* %_prefix/lib/cups/filter/* %_prefix/lib/cups/backend/* %_prefix/lib/ppr/interfaces/* %_prefix/lib/ppr/lib/* %{_mandir}/man1/* %dir %config(noreplace) %{_sysconfdir}/foomatic %dir %config(noreplace) %{_sysconfdir}/foomatic/direct %config(noreplace) %{_sysconfdir}/foomatic/filter.conf ##### CLEAN UP %clean rm -rf %{buildroot} %changelog * Sun Aug 27 2006 Till Kamppeter <till@mandriva.com> 3.0.2-1.20060827.1mdv2007.0 - Updated foomatic-filters to the state of the 27/08/2006 (Let foomatic-gswrapper use the built-in output redirection feature of ghostscript ("-sstdout=%stderr") instead of /dev/fd/3). * Fri May 19 2006 Till Kamppeter <till@mandriva.com> 3.0.2-1.20060519.1mdk - Updated foomatic-filters to the state of the 19/05/2006 (Build system and configurability improved). * Mon Apr 3 2006 Till Kamppeter <till@mandriva.com> 3.0.2-1.20060109.3mdk - Moved CUPS filter directory from /usr/lib64/cups/filter to /usr/lib/cups/filter on 64-bit systems. - With the change above applied it gets noarch again. * Wed Jan 18 2006 Till Kamppeter <till@mandriva.com> 3.0.2-1.20060109.2mdk - Adapted spec file to switchover from configure.ac to configure.in. * Mon Jan 9 2006 Till Kamppeter <till@mandriva.com> 3.0.2-1.20060109.1mdk - Updated foomatic-filters to the state of the 09/01/2006 (Multiple copies bug in "beh" fixed; documentation for "beh" added, build system updated to work with current autoconf). - Introduced %%mkrel. * Wed Oct 26 2005 Till Kamppeter <till@mandriva.com> 3.0.2-1.20051026.1mdk - Updated foomatic-filters to the state of the 26/10/2005 (Better JCL support, bug fixes). * Wed Aug 24 2005 Till Kamppeter <till@mandriva.com> 3.0.2-1.20050816.3mdk - Added "BuildRequires: cups", so that CUPS dire4ctories are correctly set on all platforms, including 64 bit. - Perlified patch 0. Now new occurences of "lib" in configure.in get treated automatically. * Tue Aug 23 2005 Laurent MONTEL <lmontel@mandriva.com> 3.0.2-1.20050816.2mdk - Fix build on x86_64 * Mon Aug 15 2005 Till Kamppeter <till@mandriva.com> 3.0.2-1.20050816.1mdk - Updated foomatic-filters to the state of the 16/08/2005 (New configurable "beh" CUPS wrapper backend to handle errors of the CUPS backends, to avoid CUPS disabling print queues). * Tue Aug 2 2005 Till Kamppeter <till@mandriva.com> 3.0.2-1.20050802.1mdk - Updated foomatic-filters to the state of the 02/08/2005 (Fixed regexp for reading config file, added support for inserting job data, as date/time, user name, server host name, ..., into print jobs, fixed quoting problem in foomatic-gswrapper). * Thu May 19 2005 Till Kamppeter <till@mandriva.com> 3.0.2-1.20050519.1mdk - Updated foomatic-filters to the state of the 19/05/2005 (Make EPSF files not be an exception when checking whether the input file is DSC-conforming. They can also be DSC-conforming; Let the "FontPath" defined in /etc/cups/cupsd.conf being used). * Wed Feb 16 2005 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com> 3.0.2-1.20050128.4mdk - lib64 fixes thus making it arch-dependent * Thu Feb 10 2005 Christiaan Welvaart <cjw@daneel.dyndns.org> 3.0.2-1.20050128.3mdk - add BuildRequires: mpage * Fri Jan 28 2005 Till Kamppeter <till@mandrakesoft.com> 3.0.2-1.20050128.2mdk - Removed "debug" flag from the spec file. * Fri Jan 28 2005 Till Kamppeter <till@mandrakesoft.com> 3.0.2-1.20050128.1mdk - Updated foomatic-filters to the state of the 28/01/2005.