Sophie

Sophie

distrib > Mandriva > cs4.0 > i586 > by-pkgid > e684d10eb8de5ac60419761d63134587 > files > 3

foomatic-db-3.0.2-1.20060818.1mlcs4.src.rpm

%define version 3.0.2
%define releasedate 20060818
%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-db
Version:	%{version}
Release:	%{release}
Epoch:		1
Summary:        Foomatic printer/driver database
License:        GPL
Group:          System/Servers
Url:            http://www.linuxprinting.org/
Requires:       ghostscript, printer-filters, foomatic-db-engine
Conflicts:	postscript-ppds <= 2006-1mdk
BuildArchitectures: noarch

##### BUILDREQUIRES

BuildRequires:	autoconf2.5 automake foomatic-db-engine cups cups-common

##### FOOMATIC SOURCES

# Foomatic packages
Source:		http://www.linuxprinting.org/download/foomatic/%{name}-%{releasedate}.tar.bz2

# Temporarily added the HP PSC 1510.
#Source1:	HP-PSC_1510.xml.bz2

# Perl script to clean up Manufacturer entries in the PPD files, so that
# drivers are sorted by the printer manufacturer in the graphical frontends
Source2:	cleanppd.pl.bz2



##### BUILD ROOT

BuildRoot:	%_tmppath/%name-%version-%release-root



##### PACKAGE DESCRIPTIONS

%description
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 is the Foomatic database, an XML database containing
information about the capabilities of near 1000 printers and around
250 drivers. Especially it contains the information how and with which
options the drivers have to be executed.


%prep
# remove old directory
rm -rf $RPM_BUILD_DIR/%{name}-[0-9]*
mkdir $RPM_BUILD_DIR/%{name}-%{releasedate}

##### FOOMATIC

# Source trees for installation
%setup -q -n %{name}-%{releasedate}
#bzcat %{SOURCE1} > db/source/printer/HP-PSC_1510.xml

%build

cd $RPM_BUILD_DIR/%{name}-%{releasedate}

# Makefile generation ("./make_configure" for CVS snapshots)
./make_configure
# Fix for lib64 architectures, avoid patch
perl -pi -e "s@/usr/lib/(cups|pdq|ppr)@%{_libdir}/\1@g" configure

# We do not compress the PPDs now, so that we can do a clean-up
%configure --disable-gzip-ppds

# "make" is not needed for this package, there is nothing to build

# Delete drivers which are not on the distro (obsolete drivers which are
# replaced by a new driver with a different name)
# "stp" replaced by "gimp-print"/"gutenprint"
rm -f db/source/driver/stp.xml
# "cZ11" replaced by "cZ11somsom"
rm -f db/source/driver/cZ11.xml
# "cZ11somsom" replaced by "lz11"
rm -f db/source/driver/cZ11somsom.xml
# "hpdj" replaced by "pcl3"
rm -f db/source/driver/hpdj.xml
# "lxm3200[mcp]" replaced by "lxm3200"
rm -f db/source/driver/lxm3200[mcp].xml
# "lxm3200" replaced by "lxm3200-tweaked"
rm -f db/source/driver/lxm3200.xml
# Japanese drivers which are not in our GhostScript
rm -f db/source/driver/bjc800j.xml
rm -f db/source/driver/bj10.xml

# These drivers come with their own Foomatic data. Remove the files
# from this package
rm -f db/source/*/gimp-print*.xml
rm -f db/source/*/gutenprint*.xml
rm -f db/source/*/foo2*.xml
rm -f db/source/*/lz11*.xml
rm -f db/source/*/m2300w*.xml
rm -f db/source/*/m2400w*.xml
rm -f db/source/[do]*/*[Pp]touch*.xml


# Delete drivers with empty command line prototype, they would give
# unusable printer/driver combos.
FOOMATICDB=`pwd` %{_sbindir}/foomatic-cleanupdrivers

# Correct the default drivers of the printer entries to have a valid
# default for every printer.
#FOOMATICDB=`pwd` %{_sbindir}/foomatic-preferred-driver

# Correct recommended driver "gimp-print" or "gutenprint", must be 
# "gutenprint-ijs.5.0".
for f in db/source/printer/*.xml; do
	perl -p -i -e 's:<driver>(gimp-|guten)print</driver>:<driver>gutenprint-ijs.5.0</driver>:' $f
done

# Fix HP's PostScript PPDs: "600x600x2dpi" is not Adobe-spec-conforming,
# replace it by "1200x600dpi".
#perl -p -i -e 's/600x600x2dpi/1200x600dpi/' db/source/PPD/*/*/*.ppd

# Fixed default paper tray for HP Business Inkjet 2800.
perl -p -i -e 's/(\*DefaultInputSlot:\s+)Auto/$1Tray1/' db/source/PPD/HP/business_inkjet/HP_Business_Inkjet_2800.ppd
# Fixed device ID lines in the HP PPDs
perl -p -i -e 's/1284DeviceId/1284DeviceID/' db/source/PPD/HP/*/*.ppd

%install

cd $RPM_BUILD_DIR/%{name}-%{releasedate}

rm -rf %{buildroot}

# Do not use "make" macro, as parallelized build of Foomatic does not
# work.

# Install data files
make	PREFIX=%{_prefix} \
        DESTDIR=%buildroot \
        install

# Install documentation
install -d %buildroot%{_docdir}/foomatic-db-%{version}
cp README USAGE TODO ChangeLog \
	%buildroot%{_docdir}/foomatic-db-%{version}

# Uncompress Perl script for cleaning up the PPD files
bzcat %{SOURCE2} > ./cleanppd.pl
chmod a+rx ./cleanppd.pl

# Do the clean-up
find %buildroot%{_datadir}/foomatic/db/source/PPD -name "*.ppd" -exec ./cleanppd.pl '{}' \;

# Remove PPDs which are not Adobe-compliant and therefore not working with
# CUPS 1.1.20 or newer
for ppd in `find %buildroot%{_datadir}/foomatic/db/source/PPD -name "*.ppd.gz" -print`; do cupstestppd -q $ppd || (rm -f $ppd && echo "$ppd not Adobe-compliant. Deleted." && echo $ppd >> deletedppds-%{name}-%{version}-%{release}.txt); done



##### 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}
for f in %{buildroot}%{_datadir}/foomatic/db/source/*/*.xml; do
  chmod a-x $f
done
chmod a-x %{buildroot}%{_datadir}/foomatic/db/oldprinterids



##### FILES

%files -n foomatic-db
%defattr(-,root,root)
%docdir %{_docdir}/foomatic-db-%{version}
%{_docdir}/foomatic-db-%{version}
%_datadir/foomatic/db
%_datadir/cups/model/foomatic-db-ppds



##### SCRIPTS

# 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

%post
/sbin/service cups condrestart > /dev/null 2>/dev/null || :

%postun
/sbin/service cups condrestart > /dev/null 2>/dev/null || :



##### CLEAN UP

%clean
rm -rf %{buildroot}

%changelog
* Fri Aug 18 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060818.1mdv2007.0
- Updated foomatic-db to the state of the 26/07/2006 (Added PPD files
  for new printers from Gestetner, Infotec, Lanier, NRG, Ricoh, Savin,
  and Okidata, added SiPix Pocket Printer A6).

* Wed Jul 26 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060726.1mdv2007.0
- Updated foomatic-db to the state of the 26/07/2006 (Added PPD files for
  new Sharp and Kyocera printers, added Kyocera FS-1016MFP).
- Fixed device ID lines in some HP PPDs.

* Sun Jul  2 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060630.1mdv2007.0
- Updated foomatic-db to the state of the 30/06/2006 (Added PPD file for
  Epson EPL-N2550 PostScript printer)

* Thu Jun  8 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060608.1mdv2007.0
- Updated foomatic-db to the state of the 08/06/2006 (Added auto-detection
  information for the Konica Minolta magicolor DL series printers, thanks
  to Sean Zhan from Konica Minolta).

* Tue Jun  7 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060607.1mdv2007.0
- Updated foomatic-db to the state of the 07/06/2006 (Unprintable margin
  definitions for the HP LaserJet 1022, added new HP inkjet printers, to be 
  supported with HPLIP 0.9.12: HP DeskJet D1300, D2300, D4100, PhotoSmart
  A430, A510, A610, A710, C3100, C4100, D7300).

* Tue Jun  6 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060606.1mdv2007.0
- Updated foomatic-db to the state of the 06/06/2006 (Updated "foo2zjs"
  and "foo2hp" driver data, added HP Color LaserJet 1600 and LaserJet 1018,
  updated HP LaserJet 1022 to use "foo2zjs" as default driver).

* Fri May 19 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060519.1mdk
- Updated foomatic-db to the state of the 19/05/2006 (Added Konica Minolta
  magicolor DL series, added new HP PostScript printers to "Postscript"
  driver entry, so that their PostScript PPDs appear in printer setup
  tools).

* Wed May 10 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060510.1mdk
- Updated foomatic-db to the state of the 10/05/2006 (Added HP Color
  LaserJet 2605, LaserJet 5200, 5200L, OfficeJet 4300, 6300, many printers
  from Ricoh and partners).

* Wed Mar 29 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060329.1mdk
- Updated foomatic-db to the state of the 29/03/2006 (Added Brother P-Touch
  label printers, updated data for Epson laser printer drivers "eplaser" and
  "eplase-jp", added Epson LP-S4500 and LP-S6500, fixed entry for HP
  DeskJet F300).

* Tue Mar  7 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060307.1mdk
- Updated foomatic-db to the state of the 07/03/2006 (HP Color LaserJet 2600
  and HP LaserJet 1020 now supported by "foo2zjs", HP DeskJet F300 added).
- Removed fixing "600x600x2dpi" resolutions in HP's PPDs, this is fixxed
  upstream now.

* Mon Feb 27 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060227.1mdk
- Updated foomatic-db to the state of the 27/02/2006 (Added ANSI paper
  sizes for large format printers).

* Sat Feb 25 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060225.1mdk
- Updated foomatic-db to the state of the 25/02/2006 (Added HP DesignJet
  100, 500, 800, 5000, updated HP DesignJet 5500).

* Fri Feb 24 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060224.1mdk
- Updated foomatic-db to the state of the 24/02/2006 (Printer entries for 
  all printers which are supported by Gutenprint).

* Thu Feb 23 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060223.1mdk
- Updated foomatic-db to the state of the 23/02/2006 (New PPD files from
  Ricoh: LockedPrint, UserCode, SamplePrint, DocumentServer also on
  the Ricoh, Gestetner, Infotec, Lanier, NRG, and Savin PostScript printers
  now).
- Removed source 3, merged upstream.

* Fri Feb 17 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060217.1mdk
- Updated foomatic-db to the state of the 17/02/2006 (New PPD files from
  Sharp and Kyocera, new HP printers, new Epson printers, fixes for HP
  DeskJet 520, ...).
- Fixed HP's PostScript PPDs: "600x600x2dpi" is not Adobe-spec-conforming,
  replaced it by "1200x600dpi".
- Fixed default paper tray in PostScript PPD for HP Business Inkjet 2800.

* Fri Jan  6 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060105.2mdk
- Fixed file conflict with printer-filters package
  (/usr/share/foomatic/db/source/driver/m2400w.xml).
- Introduced %%mkrel.

* Thu Jan  5 2006 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20060105.1mdk
- Updated foomatic-db to the state of the 05/01/2006 (Brother PostScript 
  PPD files; Minolta PagePro 1400, magicolor 2400W, HP Color LaserJet 
  3000, 3800; many new Ricoh and partners PPDs and Locked Print/user Code 
  support for PCL-XL printers from Ricoh and partners; bug fixes and new
  device IDs).

* Wed Oct 26 2005 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20051026.1mdk
- Updated foomatic-db to the state of the 26/10/2005 (Moved
  manufacturer-supplied PPD files into the foomatic-db package).

* Thu Sep  1 2005 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20050825.2mdk
- Added HP PSC 1510.

* Wed Aug 24 2005 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20050825.1mdk
- Updated foomatic-db to the state of the 25/08/2005 (Fixed PPD file link
  for HP LaserJet 4250, separated broken "lj4dith" driver from "ljet4"
  driver).

* Mon Aug 15 2005 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20050816.1mdk
- Updated foomatic-db to the state of the 16/08/2005 (Fix in paper tray
  selection for PCL-6/XL drivers).

* Tue Aug  2 2005 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20050802.1mdk
- Updated foomatic-db to the state of the 02/08/2005 (Tons of new printer
  models after LE 2005, a lot of new auto-detection data from Red Hat,
  Well-Tempered Screening for black-and-white laser printer GhostScript
  drivers, bug fixes).

* Wed May 29 2005 Till Kamppeter <till@mandriva.com> 1:3.0.2-1.20050529.1mdk
- Updated foomatic-db to the state of the 29/05/2005 (Added Epson Stylus
  Photo R1800; updates for Gutenprint 5.0.x; many smaller bug fixes, 
  mainly from Red Hat).

* Wed May 18 2005 Till Kamppeter <till@mandrakesoft.com> 1:3.0.2-1.20050518.1mdk
- Updated foomatic-db to the state of the 18/05/2005 (Updates for HPLIP 
  0.9.3/HPIJS 2.1.3; many smaller bug fixes, mainly from Red Hat).

* Mon Apr  4 2005 Till Kamppeter <till@mandrakesoft.com> 1:3.0.2-1.20050404.1mdk
- Updated foomatic-db to the state of the 04/04/2005 (New printers: HP 
  DesignJet 500ps, HP DesignJet 100plus, HP LaserJet 4240, HP LaserJet 9040,
  HP Color LaserJet 4610, HP LaserJet 1022, HP Business Inkjet 1000; updates
  for HPLIP 0.9.1/HPIJS 2.1.1; "Resolution" option for "dnj650c" driver).

* Wed Mar 30 2005 Till Kamppeter <till@mandrakesoft.com> 1:3.0.2-1.20050330.1mdk
- Updated foomatic-db to the state of the 30/03/2005 (New printers: HP
  Color LaserJet 35xx, Lexmark Optra E321 (bug 15026); HP LaserJet 101x 
  now used with HPIJS driver, tray selection foe Generic and Lexmark
  PostScript printers (bug 15055), updates for HPLIP 0.9/HPIJS 2.1).

* Thu Mar 17 2005 Till Kamppeter <till@mandrakesoft.com> 1:3.0.2-1.20050318.1mdk
- Updated foomatic-db to the state of the 18/03/2005 (New printers: HP
  DskJet 6600, 9800).

* Fri Mar  4 2005 Till Kamppeter <till@mandrakesoft.com> 1:3.0.2-1.20050304.1mdk
- Updated foomatic-db to the state of the 04/03/2005 (Added 162 new printer
  entries contributed by Ricoh: PostScript printers of the brands
  Ricoh, Lanier, Infotec, Gestetner, Savin, NRG).

* Thu Mar  3 2005 Till Kamppeter <till@mandrakesoft.com> 1:3.0.2-1.20050303.1mdk
- Updated foomatic-db to the state of the 03/03/2005 (Added 33 new Epson
  laser printers: Japanese Epson LP series, Epson AcuLaser C9100; renamed
  driver entry "epkowa-laser" to "eplaser", new driver entry "eplaser-jp").

* Fri Feb 25 2005 Till Kamppeter <till@mandrakesoft.com> 1:3.0.2-1.20050225.1mdk
- Updated foomatic-db to the state of the 25/02/2005 (Corrected recommended
  driver for printers to be used with the "lxm3200-tweaked" driver).

* Thu Feb 24 2005 Till Kamppeter <till@mandrakesoft.com> 1:3.0.2-1.20050224.1mdk
- Updated foomatic-db to the state of the 24/02/2005 (Added support
  for the "oki4w" GhostScript driver for Okidata Okipage 4W and
  compatible printers).

* Tue Feb 22 2005 Till Kamppeter <till@mandrakesoft.com> 1:3.0.2-1.20050222.2mdk
- Updated foomatic-db from CVS again (fixes for the new Ricoh entries).

* Tue Feb 22 2005 Till Kamppeter <till@mandrakesoft.com> 1:3.0.2-1.20050222.1mdk
- Updated foomatic-db to the state of the 22/02/2005 (Added printer
  entries contributed by Ricoh: PostScript printers of the brands
  Ricoh, Lanier, Infotec, Gestetner, Savin, NRG, fixed PPD files
  generated by the "Postscript" driver, they failed "cupstestppd" due
  to the "NotCapable" choice in the "Duplex" option).
- Let version number contain the version of Foomatic again.

* Sat Feb 12 2005 Till Kamppeter <till@mandrakesoft.com> 20050212-2mdk
- Fixed entry for HP DeskJet 6540.

* Fri Feb 11 2005 Till Kamppeter <till@mandrakesoft.com> 20050211-1mdk
- Updated foomatic-db to the state of the 12/02/2005 (full support
  for HP LaserJet 1010/1012 and more).
- Removed Foomatic files for drivers which have their own Foomatic data.

* Thu Feb 10 2005 Till Kamppeter <till@mandrakesoft.com> 20050128-4mdk
- Corrected Gimp-Print as recommended driver, must be "gimp-print-ijs".

* Tue Feb  8 2005 Till Kamppeter <till@mandrakesoft.com> 20050128-3mdk
- Removed the call of "foomatic-preferred-driver".

* Fri Feb  4 2005 Till Kamppeter <till@mandrakesoft.com> 20050128-2mdk
- Added "BuildRequires: foomatic-db-engine".

* Fri Jan 28 2005 Till Kamppeter <till@mandrakesoft.com> 20050128-1mdk
- Updated foomatic-db to the state of the 28/01/2005.