- Split out foomatic-db into separate source package.

This commit is contained in:
Tim Waugh 2009-08-18 08:43:37 +00:00
parent ffa30143e5
commit 6a4cc2b90e
2 changed files with 9 additions and 129 deletions

View File

@ -1,25 +0,0 @@
diff -up foomatic-db-20090702/db/source/driver/stcolor.xml.epson-stylus-color-200 foomatic-db-20090702/db/source/driver/stcolor.xml
--- foomatic-db-20090702/db/source/driver/stcolor.xml.epson-stylus-color-200 2009-07-02 08:49:20.000000000 +0100
+++ foomatic-db-20090702/db/source/driver/stcolor.xml 2009-08-04 16:08:19.378201381 +0100
@@ -22,6 +22,9 @@ better dithering. Try it.</en>
<id>printer/Epson-Stylus_Color</id><!-- Epson Stylus Color -->
</printer>
<printer>
+ <id>printer/Epson-Stylus_Color_200</id><!-- Epson Stylus Color 200 -->
+ </printer>
+ <printer>
<id>printer/Epson-Stylus_Color_300</id><!-- Epson Stylus Color 300 -->
<comments>
<en>Works with the "-dMicroweave" option.</en>
diff -up foomatic-db-20090702/db/source/printer/Epson-Stylus_Color_200.xml.epson-stylus-color-200 foomatic-db-20090702/db/source/printer/Epson-Stylus_Color_200.xml
--- foomatic-db-20090702/db/source/printer/Epson-Stylus_Color_200.xml.epson-stylus-color-200 2009-07-02 08:49:23.000000000 +0100
+++ foomatic-db-20090702/db/source/printer/Epson-Stylus_Color_200.xml 2009-08-04 16:08:19.382201394 +0100
@@ -19,7 +19,7 @@
<autodetect></autodetect>
<functionality>B</functionality>
<!--not "unverified"-->
- <driver>mj500c</driver>
+ <driver>stcolor</driver>
<comments>
<en>Imported from old Red Hat japanese printer database</en>
</comments>

View File

@ -1,5 +1,3 @@
%define dbver_rel 4.0
%define dbver_snap 20090702
%define enginever 4.0.2
%define filtersver 4.0.2
%define hpijsver 20090701
@ -7,19 +5,13 @@
Summary: Database of printers and printer drivers
Name: foomatic
Version: %{enginever}
Release: 5%{?dist}
Release: 6%{?dist}
License: GPLv2+
Group: System Environment/Libraries
# Generated by:
# NOW=`date '+%Y%m%d'`
# cvs -d:pserver:anonymous@cvs.linuxprinting.org:/usr/local/cvs export -D $NOW foomatic
# tar cjf foomatic-1.9-$NOW.tar.bz2 foomatic
Source0: http://www.openprinting.org/download/foomatic/foomatic-db-engine-%{enginever}.tar.gz
Source1: http://www.linuxprinting.org/download/foomatic/foomatic-filters-%{filtersver}.tar.gz
Source2: http://www.linuxprinting.org/download/foomatic/foomatic-db-%{dbver_rel}-%{dbver_snap}.tar.gz
Source3: http://www.linuxprinting.org/download/foomatic/foomatic-db-hpijs-%{hpijsver}.tar.gz
## PATCHES FOR FOOMATIC-FILTERS (PATCHES 1 TO 100)
@ -39,9 +31,6 @@ Patch102: foomatic-bad-utf8.patch
## PATCHES FOR FOOMATIC-DB-HPIJS (PATCHES 201 TO 300)
## PATCHES FOR FOOMATIC-DB (PATCHES 301 TO 400)
Patch301: foomatic-epson-stylus-color-200.patch
Url: http://www.linuxprinting.org
BuildRequires: perl >= 3:5.8.1
BuildRequires: perl(ExtUtils::MakeMaker)
@ -58,17 +47,7 @@ PreReq: fileutils initscripts
# foomatic-filters checks for a conversion utility (bug #124931).
BuildRequires: mpage
# We need ghostscript to have the gimp-print-4.2.0 driver, and hpijs 1.1.
Conflicts: ghostscript < 7.05
Conflicts: hpijs < 1.5
# We don't use the printconf hooks now, so require that they are gone.
Conflicts: system-config-printer < 0.7.0
# The foomatic oki8w driver works for printers that this old package
# use to drive:
Obsoletes: oki4linux < 2.1gst-5
# Note: no "Provides:" as it was not a dependency of any package.
Requires: foomatic-db
%description
Foomatic is a comprehensive, spooler-independent database of printers,
@ -85,7 +64,7 @@ queues (foomatic-configure) and to print files/manipulate jobs
The site http://www.linuxprinting.org/ is based on this database.
%prep
%setup -q -c -a 1 -a 2 -a 3
%setup -q -c -a 1
pushd foomatic-filters-%{filtersver}
%patch1 -p1 -b .libdir
@ -98,36 +77,6 @@ chmod a+x mkinstalldirs
%patch102 -p1
popd
pushd foomatic-db-hpijs-%{hpijsver}
popd
pushd foomatic-db-%{dbver_snap}
%patch301 -p1 -b .epson-stylus-color-200
cd db/source
# For gutenprint printers, use gutenprint-ijs-simplified.5.2.
perl -pi -e 's,>gutenprint<,>gutenprint-ijs-simplified.5.2<,' printer/*.xml
# Remove references to foo2zjs, foo2oak, foo2hp and foo2qpdl (bug #208851).
# Also foo2lava, foo2kyo, foo2xqx (bug #438319).
for x in zjs oak hp qpdl lava kyo xqx
do
find printer -name '*.xml' |xargs grep -l "<driver>foo2${x}"|xargs rm -vf
rm -f driver/foo2${x}.xml opt/foo2${x}-*
done
# Same for m2300w/m2400w
find printer -name '*.xml' |xargs grep -l '<driver>m2[34]00w<'|xargs rm -vf
rm -f driver/m2300w.xml driver/m2400w.xml opt/m2300w-*
# Same for all these.
for x in drv_x125 ml85p pbm2lwxl pbmtozjs bjc800j
do
find printer -name '*.xml' |xargs grep -l "<driver>${x}</driver>"|xargs rm -vf
rm -vf driver/${x}.xml opt/${x}-*
done
popd
%build
export LIB_CUPS=/usr/lib/cups # /usr/lib NOT libdir
export CUPS_BACKENDS=/usr/lib/cups/backend # /usr/lib NOT libdir
@ -144,16 +93,6 @@ pushd foomatic-db-engine-%{enginever}
make PREFIX=%{_prefix} CFLAGS="$RPM_OPT_FLAGS"
popd
pushd foomatic-db-%{dbver_snap}
%configure
make PREFIX=%{_prefix} CFLAGS="$RPM_OPT_FLAGS"
popd
pushd foomatic-db-hpijs-%{hpijsver}
%configure
make PREFIX=%{_prefix} CFLAGS="$RPM_OPT_FLAGS"
popd
%install
rm -rf $RPM_BUILD_ROOT
@ -175,42 +114,9 @@ make DESTDIR=%buildroot PREFIX=%{_prefix} \
install
popd
pushd foomatic-db-%{dbver_snap}
make DESTDIR=%buildroot PREFIX=%{_prefix} \
INSTALLSITELIB=$RPM_BUILD_ROOT/$installvendorlib \
INSTALLSITEARCH=$RPM_BUILD_ROOT/$installvendorarch \
install
popd
pushd foomatic-db-hpijs-%{hpijsver}
make DESTDIR=%buildroot PREFIX=%{_prefix} \
INSTALLSITELIB=$RPM_BUILD_ROOT/$installvendorlib \
INSTALLSITEARCH=$RPM_BUILD_ROOT/$installvendorarch \
install
popd
# Remove ghostscript UPP drivers that are gone in 7.07
rm -f %{buildroot}%{_datadir}/foomatic/db/source/driver/{bjc6000a1,PM760p,PM820p,s400a1,sharp,Stc670pl,Stc670p,Stc680p,Stc760p,Stc777p,Stp720p,Stp870p}.upp.xml
# Remove drivers with no command line.
pushd foomatic-db-engine-%{enginever}
perl -Ilib ./foomatic-cleanupdrivers %{buildroot}%{_datadir}/foomatic
popd
# Update any old-style printer IDs still left around.
echo '#!/usr/bin/perl -pi' > convert-printerids.pl
sed -e 's|^\(.*\) \(.*\)$|s,printer/\1,printer/\2,g;|' \
%{buildroot}%{_datadir}/foomatic/db/oldprinterids \
>> convert-printerids.pl
chmod a+x convert-printerids.pl
./convert-printerids.pl %{buildroot}%{_datadir}/foomatic/db/source/{opt,driver}/*.xml
find %{buildroot}%{_datadir}/foomatic/db/source/ -type f | xargs chmod 0644
# Use relative, not absolute, symlink for CUPS filter.
ln -sf ../../../bin/foomatic-rip %{buildroot}/usr/lib/cups/filter/foomatic-rip
mkdir $RPM_BUILD_ROOT%{_datadir}/foomatic/db/source/PPD/Custom
mkdir -p $RPM_BUILD_ROOT%{_var}/cache/foomatic
echo cups > $RPM_BUILD_ROOT%{_sysconfdir}/foomatic/defaultspooler
@ -218,11 +124,9 @@ echo cups > $RPM_BUILD_ROOT%{_sysconfdir}/foomatic/defaultspooler
# Remove things we don't ship.
rm -rf $RPM_BUILD_ROOT%{_libdir}/perl5/site_perl \
$RPM_BUILD_ROOT%{_libdir}/ppr \
$RPM_BUILD_ROOT%{_sysconfdir}/foomatic/filter.conf.sample
find $RPM_BUILD_ROOT -name .packlist -o -name '*.xml.*' | xargs rm -f
rm -f $RPM_BUILD_ROOT%{_datadir}/foomatic/db/source/PPD/Kyocera/*.txt \
$RPM_BUILD_ROOT%{_datadir}/foomatic/db/source/PPD/Kyocera/*.htm \
$RPM_BUILD_ROOT%{_datadir}/cups/model/3-distribution
$RPM_BUILD_ROOT%{_sysconfdir}/foomatic/filter.conf.sample \
$RPM_BUILD_ROOT%{_datadir}/foomatic/templates
find $RPM_BUILD_ROOT -name .packlist | xargs rm -f
%post
/bin/rm -f /var/cache/foomatic/*
@ -241,12 +145,13 @@ rm -fr %buildroot $RPM_BUILD_DIR/%{name}
%{_prefix}/lib*/perl5/vendor_perl/*/Foomatic
%dir /usr/lib/cups
/usr/lib/cups/*
%{_datadir}/foomatic
%{_datadir}/cups/model/foomatic-db-ppds
%{_mandir}/*/*
%{_var}/cache/foomatic
%changelog
* Tue Aug 18 2009 Tim Waugh <twaugh@redhat.com> 4.0.2-6
- Split out foomatic-db into separate source package.
* Tue Aug 4 2009 Tim Waugh <twaugh@redhat.com> 4.0.2-5
- Use stcolor driver for Epson Stylus Color 200 (bug #513676).
- Don't ship 3-distribution symlink as CUPS already searches