
See README for some initial very basic ideas.


HOWTO determine which OpenPrintingPPDs are of interest and
HOWTO download the OpenPrintingPPDs which are supported:

0.
Prepare a working directory:
mkdir OpenPrintingPPDs
cd OpenPrintingPPDs

1.
Run
wget_printers_and_drivers_xml.sh
to download the OpenPrinting database info into the files
printers.xml
and
drivers.xml

2.
Run
determine_drivers_to_be_considered.sh
which creates a list of Ghostscript's built-in drivers
from the currently installed "gs -h" output into the file
drivers.ghostscript.available
then it reads
drivers.xml
and extracts the data of interest from drivers.xml into the file
drivers.digest
which it reads to write a list of drivers of interest into the file
drivers_to_be_considered

3.
Run
determine_drivers_for_printers_to_be_considered.sh
which reads
printers.xml
and extracts the data of interest from printers.xml into the file
printers.digest
which it reads to write a list of drivers for printers of interest into the file
drivers_for_printers_to_be_considered
according to the drivers of interest in the drivers_to_be_considered file
then it reads
drivers_for_printers_to_be_considered
to write a list of examples of printers for the drivers of interest into the file
examples_for_drivers_to_be_considered

4.
Run
wget_driver_examples_ppds.sh
which reads
examples_for_drivers_to_be_considered
to download one PPD file for each examples of printers for the drivers of interest
and stores the downloaded PPDs in the
driver_examples_ppds
directory

5.
Run
determine_supported_drivers_from_examples_ppds.sh
which inspects each PPD in the
driver_examples_ppds
directory regarding a driverType entry in the PPD
and copies each PPD according to its driverType into one of the
driver_examples_ppds.ghostscript
driver_examples_ppds.uniprint
driver_examples_ppds.ijs
driver_examples_ppds.postscript
driver_examples_ppds.filter
driver_examples_ppds.unknown
directories
then it extracts the supported driver names
from the PPDs in the above directories except the
driver_examples_ppds.filter
directory because drivers of type "filter" are not supported 
and writes the supported driver names into the files
supported_drivers.ghostscript
supported_drivers.uniprint
supported_drivers.ijs
supported_drivers.postscript
supported_drivers.unknown

6.
Run
determine_printers_for_one_type_of_driver.sh ghostscript
determine_printers_for_one_type_of_driver.sh uniprint
determine_printers_for_one_type_of_driver.sh ijs
determine_printers_for_one_type_of_driver.sh postscript
determine_printers_for_one_type_of_driver.sh unknown
where each reads
printers.digest
and the matching
supported_drivers.ghostscript
supported_drivers.uniprint
supported_drivers.ijs
supported_drivers.postscript
supported_drivers.unknown
and writes a matching
printers_for_ghostscript_drivers
printers_for_uniprint_drivers
printers_for_ijs_drivers
printers_for_postscript_drivers
printers_for_unknown_drivers
file which contains all printers for each type of driver.

7.
Run
wget_PPDs_for_printers_for_one_type_of_driver.sh ghostscript
wget_PPDs_for_printers_for_one_type_of_driver.sh uniprint
wget_PPDs_for_printers_for_one_type_of_driver.sh ijs
wget_PPDs_for_printers_for_one_type_of_driver.sh postscript
wget_PPDs_for_printers_for_one_type_of_driver.sh unknown
to download all PPDs for all printers for each type of driver
into the
PPDs_for_printers_for_ghostscript_drivers
PPDs_for_printers_for_uniprint_drivers
PPDs_for_printers_for_ijs_drivers
PPDs_for_printers_for_postscript_drivers
PPDs_for_printers_for_unknown_drivers
directories

8.
Run
move_downloaded_PPDs_to_their_actual_type_of_driver.sh
which moves appropriate PPDs from
PPDs_for_printers_for_uniprint_drivers
PPDs_for_printers_for_ijs_drivers
PPDs_for_printers_for_unknown_drivers
to one of the
PPDs_for_printers_for_ghostscript_drivers
PPDs_for_printers_for_postscript_drivers
PPDs_for_printers_for_hpijs_drivers
directories according to the content of the PPD files.

If everything is well, there are no longer PPDs in
PPDs_for_printers_for_uniprint_drivers
PPDs_for_printers_for_ijs_drivers
PPDs_for_printers_for_unknown_drivers
so that all downloaded OpenPrinting PPDs are in
PPDs_for_printers_for_ghostscript_drivers
PPDs_for_printers_for_postscript_drivers
PPDs_for_printers_for_hpijs_drivers

9.
Run
remove_PPDs_with_non_free_license_text_snippets.sh
which removes PPDs that contain known non free license text snippets
from the file non_free_license_text_snippets (only letters and the '_')
to avoid any possible license issue for us and our users and customers
when we would distribute files with unclear license.
Only PPDs are checked in directories from which the tarball for the
OpenPrintingPPDs package will be made in step 11. below i.e. in
PPDs_for_printers_for_ghostscript_drivers
PPDs_for_printers_for_postscript_drivers
PPDs_for_printers_for_hpijs_drivers

10.
Optionally run
cupstestppd_supported_PPDs_for_printers.sh
which runs cupstestppd for the PPDs in
PPDs_for_printers_for_ghostscript_drivers
PPDs_for_printers_for_postscript_drivers
PPDs_for_printers_for_hpijs_drivers
and writes the PPD file names for which cupstestppd fails to
cupstestppd_failed

11.
Make a bzip2 compressed tar-archive of all the stuff
to have a complete source archive (e.g. for our source RPMs).
Determine the current version:
for d in PPDs_for_printers_for_ghostscript_drivers \
         PPDs_for_printers_for_hpijs_drivers \
         PPDs_for_printers_for_postscript_drivers ; \
do grep -oh 'PPD-O-MATIC ([^)]*)' $d/* ; \
done \
| sort -u
This should result a single line like:
PPD-O-MATIC (4.0.0 or newer)
so that the current version is 4.0.0 in this example.
Add a trailing version number suffix for the openSUSE package and
increase it compared to the last openSUSE package version number suffix
(e.g. from "4.0.0.1" to "4.0.0.2") so that openSUSE package upgrades
have a strictly increasing sequence of versions.
Make the source archive:
cd ..
tar -cjvf OpenPrintingPPDs-4.0.0.2.tar.bz2 OpenPrintingPPDs/*

12.
Find out which foomatic-rip version is required
to require the right foomatic-rip version in the RPM package spec file:
for d in PPDs_for_printers_for_ghostscript_drivers \
         PPDs_for_printers_for_hpijs_drivers \
         PPDs_for_printers_for_postscript_drivers ; \
do for p in $d/*.ppd ; \
   do grep -ioh 'Foomatic [0-9].[0-9].[0-9]' $p \
      || echo "No 'Foomatic X,Y.Z' found in $p" ; \
   done ; \
done \
| sort -u
This should result a single line like:
Foomatic 4.0.0
and zillions of lines like
No 'Foomatic X,Y.Z' found in ...
in particular for those PPDs which were supplied to OpenPrinting.org by manufacturers like
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_ghostscript_drivers/Gestetner-10512.pxlmono-Gestetner.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_ghostscript_drivers/Gestetner-CS555.pxlcolor-Gestetner.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_ghostscript_drivers/InfoPrint-Pro_1107EX.pxlmono-InfoPrint.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_ghostscript_drivers/Infotec-4353_MF.pxlmono-Infotec.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_ghostscript_drivers/Infotec-ISC_1024c.pxlcolor-Infotec.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_ghostscript_drivers/Lanier-5622.pxlmono-Lanier.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_ghostscript_drivers/Lanier-LC155.pxlcolor-Lanier.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_ghostscript_drivers/NRG-10515_10518_10512.pxlmono-NRG.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_ghostscript_drivers/NRG-CS555.pxlcolor-NRG.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_ghostscript_drivers/Ricoh-Aficio_1022.pxlmono-Ricoh.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_ghostscript_drivers/Ricoh-Aficio_3224C.pxlcolor-Ricoh.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_ghostscript_drivers/Savin-2522.pxlmono-Savin.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_ghostscript_drivers/Savin-C2410.pxlcolor-Savin.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Brother-DCP-7025.Postscript-Brother.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Epson-AcuLaser_2600PS.Postscript-Epson.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Gestetner-10512.Postscript-Gestetner.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/HP-DesignJet_1050C.Postscript-HP.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Imagistics-im8530.Postscript-Oce.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/InfoPrint-Pro_1107EX.Postscript-InfoPrint.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Infotec-4353_MF.Postscript-Infotec.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/KONICA_MINOLTA-bizhub_1050.Postscript-KONICA_MINOLTA.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Kyocera-CS-1650.Postscript-Kyocera.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Lanier-2132.Postscript-Lanier.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Lexmark-C510.Postscript-Lexmark.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/NRG-10515_10518_10512.Postscript-NRG.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Oce-3145PS.Postscript-Oce.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Oce-3145PS.Postscript2-Oce.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Oki-14i.Postscript-Oki.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Ricoh-Aficio_1022.Postscript-Ricoh.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Savin-2404WD.Postscript-Savin.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Sharp-AR-155FGPS.Postscript-Sharp.ppd
No 'Foomatic X,Y.Z' found in PPDs_for_printers_for_postscript_drivers/Toshiba-GL_1010.Postscript-Toshiba.ppd
which can be ignored

13.
Make RPM packages (e.g. in the "Printing" project in the openSUSE build service)
OpenPrintingPPDs-ghostscript
OpenPrintingPPDs-hpijs
OpenPrintingPPDs-postscript
and install them and then run makePPDtest with a command like
nohup nice ./makePPDtest 1>makePPDtest.stdout 2>makePPDtest.stderr &
to test all OpenPrinting PPDs in a running system.
It needs several hours to test all OpenPrinting PPDs.
Depending on the command line parameters makePPDtest does the following:
 - Test a single PPD with 'LogLevel debug2'
   if the first parameter ends with .ppd or .ppd.gz
 - Test all PPDs in a package
   if the first parameter is an installed package
   and use an optional second parameter as 'egrep' search pattern
   for the PPD file names in the package
 - Fall back to test all PPDs in all installed OpenPrintingPPDs packages
   and show the version of the important RPMs
   and use an optional first parameter as 'egrep' search pattern
   for the PPD file names in the packages

