Blame SPECS/foomatic-db.spec

96a07f
%global dbver_rel 4.0
96a07f
# When you change dbver_snap, rebuild also foomatic against this build to pick up new IEEE 1284 Device IDs.
96a07f
# The postscriptdriver tags get put onto foomatic, because that's there the actual CUPS driver lives.
96a07f
%global dbver_snap 20130911
96a07f
96a07f
Summary: Database of printers and printer drivers
96a07f
Name: foomatic-db
96a07f
Version: %{dbver_rel}
96a07f
Release: 39.%{dbver_snap}%{?dist}
96a07f
License: GPLv2+
96a07f
Group: System Environment/Libraries
96a07f
Requires: %{name}-filesystem = %{version}-%{release}
96a07f
Requires: %{name}-ppds = %{version}-%{release}
96a07f
96a07f
Source0: http://www.openprinting.org/download/foomatic/foomatic-db-%{dbver_rel}-%{dbver_snap}.tar.gz
96a07f
96a07f
Patch1: foomatic-db-device-ids.patch
96a07f
96a07f
Url: http://www.openprinting.org
96a07f
BuildArch: noarch
96a07f
96a07f
# Make sure we get postscriptdriver tags.
96a07f
BuildRequires: python-cups
96a07f
96a07f
# Build requires cups so that configure knows where to put PPDs.
96a07f
BuildRequires: cups
96a07f
96a07f
%description
96a07f
This is the database of printers, printer drivers, and driver options
96a07f
for Foomatic.
96a07f
96a07f
The site http://www.openprinting.org/ is based on this database.
96a07f
96a07f
%package filesystem
96a07f
Summary: Directory layout for the foomatic package
96a07f
License: Public Domain
96a07f
Group: System Environment/Base
96a07f
96a07f
%description filesystem
96a07f
96a07f
Directory layout for the foomatic package.
96a07f
96a07f
%package ppds
96a07f
Summary: PPDs from printer manufacturers
96a07f
License: GPLv2+ and MIT
96a07f
Group: System Environment/Libraries
96a07f
# We ship a symlink in a directory owned by cups
96a07f
BuildRequires: cups
96a07f
Requires: cups
96a07f
Requires: sed
96a07f
Requires: %{name}-filesystem = %{version}-%{release}
96a07f
96a07f
%description ppds
96a07f
PPDs from printer manufacturers.
96a07f
96a07f
%prep
96a07f
%setup -q -n foomatic-db-%{dbver_snap}
96a07f
96a07f
find -type d | xargs chmod g-s
96a07f
96a07f
pushd db/source
96a07f
96a07f
# For gutenprint printers, use gutenprint-ijs-simplified.5.2.
96a07f
perl -pi -e 's,>gutenprint<,>gutenprint-ijs-simplified.5.2<,' printer/*.xml
96a07f
96a07f
# Remove Samsung-CLP-300/315 (bug #625505), Samsung-CLP-610/620 (bug #967930)
96a07f
find printer -name '*.xml' |grep -E 'Samsung-CLP-300|Samsung-CLP-315|Samsung-CLP-610|Samsung-CLP-620'|xargs rm -vf
96a07f
# Remove references to foo2zjs, foo2oak, foo2hp and foo2qpdl (bug #208851).
96a07f
# foo2zjs-z1, foo2zjs-z2, foo2zjs-z3 (bug #967930)
96a07f
# foo2lava, foo2kyo, foo2xqx (bug #438319)
96a07f
# foo2slx and foo2hiperc (bug #518267)
96a07f
for x in zjs zjs-z1 zjs-z2 zjs-z3 oak oak-z1 hp qpdl lava kyo xqx slx hiperc
96a07f
do
96a07f
  find printer -name '*.xml' |xargs grep -l "<driver>foo2${x}"|xargs rm -vf
96a07f
  rm -f driver/foo2${x}.xml opt/foo2${x}-*
96a07f
done
96a07f
# Same for m2300w/m2400w
96a07f
find printer -name '*.xml' |xargs grep -l '<driver>m2[34]00w<'|xargs rm -vf
96a07f
rm -f driver/m2300w.xml driver/m2400w.xml opt/m2300w-*
96a07f
# Same for all these.
96a07f
for x in drv_x125 ml85p pbm2lwxl pbmtozjs bjc800j
96a07f
do
96a07f
  find printer -name '*.xml' |xargs grep -l "<driver>${x}</driver>"|xargs rm -vf
96a07f
  rm -vf driver/${x}.xml opt/${x}-*
96a07f
done
96a07f
96a07f
# Remove Brother P-touch (bug #560610, comment #10)
96a07f
rm -vf driver/ptouch.xml
96a07f
rm -vf printer/Brother-PT-*.xml
96a07f
rm -vf printer/Brother-QL-*.xml
96a07f
rm -vf opt/Brother-Ptouch-*.xml
96a07f
96a07f
popd
96a07f
96a07f
# foomatic-db patches
96a07f
# Don't use "-b" when patching PPD files as the backups will be packaged.
96a07f
96a07f
# Device IDs for:
96a07f
# Brother MFC-8840D (#678065)
96a07f
# HP LaserJet M1522nf MFP (#745499)
96a07f
# Lexmark C453 (#770169)
96a07f
# HP DeskJet 720C (bug #797099)
96a07f
# Kyocera FS-1118MFP (bug #782377)
96a07f
# Brother HL-2040 (bug #999040)
96a07f
%patch1 -p1
96a07f
96a07f
# Use sed instead of perl in the PPDs (bug #512739).
96a07f
find db/source/PPD -type f -name '*.ppd' | xargs perl -pi -e 's,perl -p,sed,'
96a07f
96a07f
%build
96a07f
%configure
96a07f
make PREFIX=%{_prefix}
96a07f
96a07f
96a07f
%install
96a07f
make	DESTDIR=%buildroot PREFIX=%{_prefix} \
96a07f
	install
96a07f
96a07f
# Remove ghostscript UPP drivers that are gone in 7.07
96a07f
rm -f %{buildroot}%{_datadir}/foomatic/db/source/driver/{bjc6000a1,PM760p,PM820p,s400a1,sharp,Stc670pl,Stc670p,Stc680p,Stc760p,Stc777p,Stp720p,Stp870p}.upp.xml
96a07f
96a07f
find %{buildroot}%{_datadir}/foomatic/db/source/ -type f | xargs chmod 0644
96a07f
96a07f
mkdir %{buildroot}%{_datadir}/foomatic/db/source/PPD/Custom
96a07f
96a07f
rm -f	%{buildroot}%{_datadir}/foomatic/db/source/PPD/Kyocera/*.htm \
96a07f
	%{buildroot}%{_datadir}/cups/model/3-distribution
96a07f
96a07f
# Convert absolute symlink to relative.
96a07f
rm -f %{buildroot}%{_datadir}/cups/model/foomatic-db-ppds
96a07f
ln -sf ../../foomatic/db/source/PPD %{buildroot}%{_datadir}/cups/model/foomatic-db-ppds
96a07f
96a07f
%files filesystem
96a07f
%dir %{_datadir}/foomatic
96a07f
%dir %{_datadir}/foomatic/db
96a07f
%dir %{_datadir}/foomatic/db/source
96a07f
96a07f
%files
96a07f
%doc db/source/PPD/Kyocera/*.htm
96a07f
%doc README
96a07f
%{_datadir}/foomatic/db/oldprinterids
96a07f
%{_datadir}/foomatic/db/source/printer
96a07f
%{_datadir}/foomatic/db/source/driver
96a07f
%{_datadir}/foomatic/db/source/opt
96a07f
%{_datadir}/foomatic/xmlschema
96a07f
96a07f
%files ppds
96a07f
%doc COPYING
96a07f
%{_datadir}/foomatic/db/source/PPD
96a07f
%{_datadir}/cups/model/foomatic-db-ppds
96a07f
96a07f
%changelog
96a07f
* Wed Sep 11 2013 Jiri Popelka <jpopelka@redhat.com> - 4.0-39.20130911
96a07f
- Updated to foomatic-db-4.0-20130911
96a07f
- Device ID for Brother HL-2040 (bug #999040)
96a07f
96a07f
* Tue Jun 04 2013 Jiri Popelka <jpopelka@redhat.com> - 4.0-38.20130604
96a07f
- Remove some file conflicts (bug #967930)
96a07f
- Updated to foomatic-db-4.0-20130604
96a07f
96a07f
* Tue May 07 2013 Jiri Popelka <jpopelka@redhat.com> - 4.0-37.20130507
96a07f
- Updated to foomatic-db-4.0-20130507
96a07f
- Removed old 'Obsoletes: oki4linux'
96a07f
96a07f
* Tue Mar 12 2013 Jiri Popelka <jpopelka@redhat.com> - 4.0-36.20130312
96a07f
- Updated to foomatic-db-4.0-20130312
96a07f
96a07f
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-35.20121011
96a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
96a07f
96a07f
* Thu Oct 11 2012 Jiri Popelka <jpopelka@redhat.com> 4.0-34.20120719
96a07f
- Updated to foomatic-db-4.0-20121011
96a07f
96a07f
* Thu Jul 19 2012 Jiri Popelka <jpopelka@redhat.com> 4.0-33.20120719
96a07f
- Updated to foomatic-db-4.0-20120719
96a07f
96a07f
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-32.20120103
96a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
96a07f
96a07f
* Fri Feb 24 2012 Tim Waugh <twaugh@redhat.com> 4.0-31.20120103
96a07f
- Device IDs for:
96a07f
  - HP DeskJet 720C (bug #797099)
96a07f
  - Kyocera FS-1118MFP (bug #782377)
96a07f
96a07f
* Wed Jan 04 2012 Jiri Popelka <jpopelka@redhat.com> 4.0-30.20120103
96a07f
- Updated to foomatic-db-4.0-20120103
96a07f
- spec modernized
96a07f
- Device IDs for:
96a07f
  - Brother MFC-8840D (#678065)
96a07f
  - HP LaserJet M1522nf MFP (#745499)
96a07f
  - Lexmark C453 (#770169)
96a07f
96a07f
* Tue Jun 14 2011 Tim Waugh <twaugh@redhat.com> 4.0-29.20110614
96a07f
- Updated to foomatic-db-4.0-20110614.
96a07f
96a07f
* Mon Feb 21 2011 Tim Waugh <twaugh@redhat.com> 4.0-28.20110221
96a07f
- Updated to foomatic-db-4.0-20110221.
96a07f
- No longer need hpijs data.
96a07f
96a07f
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.0-27.20101123
96a07f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
96a07f
96a07f
* Fri Jan 28 2011 Tim Waugh <twaugh@redhat.com> 4.0-26.20101123
96a07f
- Rebuilt to pick up postscriptdriver tags now that python-cups
96a07f
  provides the machinery for this.
96a07f
- Build requires cups so that configure knows where to put PPDs.
96a07f
96a07f
* Wed Jan 19 2011 Jiri Popelka <jpopelka@redhat.com> 4.0-25.20101123
96a07f
- Removed Brother P-touch (bug #560610, comment #10)
96a07f
96a07f
* Mon Dec 06 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-24.20101123
96a07f
- The pycups requirement is now python-cups.
96a07f
96a07f
* Mon Dec 06 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-23.20101123
96a07f
- Device IDs for:
96a07f
  - HP Deskjet D4100 (bug #658091)
96a07f
  - HP Color LaserJet CM4730 MFP (bug #658838)
96a07f
  - HP LaserJet 4050/4100/4350/5100/8000/P3005 (bug #659041)
96a07f
  - HP Color LaserJet 2500/3700/4550/4650/4700/5550 (bug #659042)
96a07f
96a07f
* Tue Nov 23 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-22.20101123
96a07f
- Updated to foomatic-db-4.0-20101123 (bug #655238).
96a07f
- Device ID for Canon iR 3225 (bug #651500).
96a07f
96a07f
* Wed Nov 03 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-21.20100819
96a07f
- Remove wrong Device ID for Canon iR 3170C (bug #617493).
96a07f
96a07f
* Fri Aug 20 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-20.20100819
96a07f
- Removed printer/Samsung-CLP-300|315.xml (bug #625505).
96a07f
- Removed references to foo2oak-z1.
96a07f
96a07f
* Thu Aug 19 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-19.20100819
96a07f
- Updated to foomatic-db-4.0-20100819, foomatic-db-hpijs-20090901.tar.gz
96a07f
- Device ID for Canon iR 3170C (bug #617493).
96a07f
96a07f
* Mon Jul 12 2010 Jiri Popelka <jpopelka@redhat.com> 4.0-18.20100204
96a07f
- Moved COPYING file to ppds sub-package.
96a07f
96a07f
* Mon May 17 2010 Tim Waugh <twaugh@redhat.com> 4.0-17.20100204
96a07f
- Don't ship backup files.
96a07f
96a07f
* Sun May 16 2010 Tim Waugh <twaugh@redhat.com> 4.0-16.20100204
96a07f
- Device IDs for another 1302 Ricoh PPDs.
96a07f
96a07f
* Thu May  6 2010 Tim Waugh <twaugh@redhat.com> 4.0-15.20100204
96a07f
- Device IDs for:
96a07f
  - HP Color LaserJet 2605dn (bug #583909).
96a07f
  - HP DeskJet F300 (bug #585644).
96a07f
  - HP OfficeJet 6200 (bug #215063).
96a07f
  - HP PSC 1400 (bug #586381).
96a07f
  - Ricoh Aficio MP C3500 (bug #589527).
96a07f
  - Ricoh Aficio SP C420DN (bug #589533).
96a07f
96a07f
* Fri Apr 16 2010 Tim Waugh <twaugh@redhat.com> 4.0-14.20100204
96a07f
- Device IDs for:
96a07f
  - Canon BJC-4100 (bug #583060)
96a07f
  - HP Color LaserJet 3800 (bug #581936).
96a07f
  - HP DeskJet D2300 (bug #580341).
96a07f
  - HP DeskJet F2100 (bug #579245).
96a07f
  - HP OfficeJet 7300 (bug #577897).
96a07f
  - Lexmark E120 (bug #577881).
96a07f
  - HP DeskJet 1280 (bug #577870).
96a07f
  - HP PhotoSmart 7400 (bug #577866).
96a07f
  - Brother HL-2140 (bug #577863).
96a07f
  - HP OfficeJet 6200 (bug #215063).
96a07f
  - HP PSC 2400 (bug #188419).
96a07f
96a07f
* Fri Mar 26 2010 Tim Waugh <twaugh@redhat.com> 4.0-13.20100204
96a07f
- Device IDs for HP PhotoSmart 2570, HP DeskJet 959C and HP OfficeJet
96a07f
  Pro K550 (bug #577280, bug #577293, bug #577296).
96a07f
96a07f
* Thu Mar 25 2010 Tim Waugh <twaugh@redhat.com> 4.0-12.20100402
96a07f
- Fixed missing units in driver margins (bug #576370).
96a07f
96a07f
* Fri Mar 19 2010 Tim Waugh <twaugh@redhat.com> 4.0-11.20100402
96a07f
- Device ID for Kyocera Mita FS-1020D (bug #575063).
96a07f
96a07f
* Thu Feb  4 2010 Tim Waugh <twaugh@redhat.com> 4.0-10.20100402
96a07f
- Rebuild for postscriptdriver tags.
96a07f
96a07f
* Thu Feb  4 2010 Tim Waugh <twaugh@redhat.com> 4.0-9.20100402
96a07f
- Updated to foomatic-db-4.0-20100402.
96a07f
96a07f
* Fri Dec  4 2009 Tim Waugh <twaugh@redhat.com> 4.0-8.20091126
96a07f
- Added foomatic-db-hpijs tarball back in.
96a07f
96a07f
* Thu Nov 26 2009 Tim Waugh <twaugh@redhat.com> 4.0-7.20091126
96a07f
- Updated to foomatic-db-4.0-20091126 (bug #538994).
96a07f
96a07f
* Thu Aug 20 2009 Tim Waugh <twaugh@redhat.com> 4.0-6.20090819
96a07f
- Removed references to foo2slx and foo2hiperc (bug #518267).
96a07f
96a07f
* Wed Aug 19 2009 Tim Waugh <twaugh@redhat.com> 4.0-5.20090819
96a07f
- Updated to foomatic-db-4.0-20090819.
96a07f
- Removed deprecated foomatic-db-hpijs tarball.
96a07f
- Use buildroot macro throughout.
96a07f
96a07f
* Tue Aug 18 2009 Tim Waugh <twaugh@redhat.com> 4.0-4.20090702
96a07f
- Use stcolor driver for Epson Stylus Color 200 (bug #513676).
96a07f
96a07f
* Mon Aug 17 2009 Tim Waugh <twaugh@redhat.com> 4.0-3.20090702
96a07f
- License for ppds sub-package should include GPLv2+.
96a07f
- Ship COPYING file in main package.
96a07f
- Added filesystem sub-package for directory ownership.
96a07f
96a07f
* Mon Aug  3 2009 Tim Waugh <twaugh@redhat.com> 4.0-2.20090702
96a07f
- Move foomatic-db-ppds symlink to ppds sub-package.
96a07f
- Use sed instead of perl in raster PPDs (bug #512739).
96a07f
- Removed code to convert old-style printer IDs (there are none).
96a07f
- Ship README file.
96a07f
96a07f
* Mon Aug  3 2009 Tim Waugh <twaugh@redhat.com> 4.0-1.20090702
96a07f
- Split database out from main foomatic package.