17b66cf61Sopenharmony_ciINSTALL - OpenPrinting CUPS Filters v1.28.17 - 2023-01-24
27b66cf61Sopenharmony_ci---------------------------------------------------------
37b66cf61Sopenharmony_ci
47b66cf61Sopenharmony_ciThis file describes how to compile and install OpenPrinting CUPS
57b66cf61Sopenharmony_ciFilters from source code. For more information on OpenPrinting CUPS
67b66cf61Sopenharmony_ciFilters see the file called "README.txt".  A complete change log can
77b66cf61Sopenharmony_cibe found in "CHANGES.txt".
87b66cf61Sopenharmony_ci
97b66cf61Sopenharmony_ci**** IF YOU HAVE A NON-POSTSCRIPT PRINTER AND ARE NOT       ****
107b66cf61Sopenharmony_ci**** RUNNING MAC OS X, YOU WILL ALSO NEED TO INSTALL GPL    ****
117b66cf61Sopenharmony_ci**** GHOSTSCRIPT WITH THE "cups" DRIVER AFTER YOU INSTALL   ****
127b66cf61Sopenharmony_ci**** CUPS AND BEFORE YOU INSTALL THIS PACKAGE.              ****
137b66cf61Sopenharmony_ci
147b66cf61Sopenharmony_ci
157b66cf61Sopenharmony_ciBEFORE YOU BEGIN
167b66cf61Sopenharmony_ci
177b66cf61Sopenharmony_ci    You'll need ANSI-compliant C and C++ compilers, plus a make program and
187b66cf61Sopenharmony_ci    POSIX-compliant shell (/bin/sh).  The GNU compiler tools and Bash work well
197b66cf61Sopenharmony_ci    and we have tested the current CUPS code against several versions of GCC
207b66cf61Sopenharmony_ci    with excellent results.
217b66cf61Sopenharmony_ci
227b66cf61Sopenharmony_ci    The makefiles used by the project should work with most versions of make.
237b66cf61Sopenharmony_ci    We've tested them with GNU make as well as the make programs shipped by
247b66cf61Sopenharmony_ci    Compaq, HP, SGI, and Sun.  BSD users should use GNU make (gmake) since BSD
257b66cf61Sopenharmony_ci    make does not support "include".
267b66cf61Sopenharmony_ci
277b66cf61Sopenharmony_ci    Poppler, freetype, fontconfig, and liblcms (liblcms2 recommended)
287b66cf61Sopenharmony_ci    must be installed to be able to compile this package.
297b66cf61Sopenharmony_ci
307b66cf61Sopenharmony_ci    Note that Poppler has to be compiled with the
317b66cf61Sopenharmony_ci    "--enable-poppler-cpp" configure option (or the
327b66cf61Sopenharmony_ci    "libpoppler-cpp-dev(el)" package has to be installed if the
337b66cf61Sopenharmony_ci    Poppler packages from a Linux distribution are used).
347b66cf61Sopenharmony_ci
357b66cf61Sopenharmony_ci    Besides these tools you'll want the JPEG, PNG, TIFF, ZLIB libraries for
367b66cf61Sopenharmony_ci    image support. CUPS Filters will compile and run without these, however
377b66cf61Sopenharmony_ci    you'll miss out on many of the features provided by CUPS Filters.
387b66cf61Sopenharmony_ci
397b66cf61Sopenharmony_ci    To get cups-browsed, the daemon to browse Bonjour broadcasts of
407b66cf61Sopenharmony_ci    remote CUPS queues and make the queues available locally, you also
417b66cf61Sopenharmony_ci    need libavahi-common and libavahi-client.
427b66cf61Sopenharmony_ci
437b66cf61Sopenharmony_ciCOMPILING THE BZR REPOSITORY CODE
447b66cf61Sopenharmony_ci
457b66cf61Sopenharmony_ci    The CUPS Filters BZR repository doesn't hold a copy of the pre-built
467b66cf61Sopenharmony_ci    configure script.  You'll need to run the GNU autoconf software (2.65 or
477b66cf61Sopenharmony_ci    higher) to create it:
487b66cf61Sopenharmony_ci
497b66cf61Sopenharmony_ci        ./autogen.sh
507b66cf61Sopenharmony_ci
517b66cf61Sopenharmony_ci
527b66cf61Sopenharmony_ciCONFIGURATION
537b66cf61Sopenharmony_ci
547b66cf61Sopenharmony_ci    CUPS Filters uses GNU autoconf, so you should find the usual "configure"
557b66cf61Sopenharmony_ci    script in the main CUPS Filters source directory.  To configure CUPS 
567b66cf61Sopenharmony_ci    Filters for your system, type:
577b66cf61Sopenharmony_ci
587b66cf61Sopenharmony_ci	./configure
597b66cf61Sopenharmony_ci
607b66cf61Sopenharmony_ci    The default installation will put the CUPS Filters software in the
617b66cf61Sopenharmony_ci    "/etc" and "/usr" directories on your system, which will overwrite
627b66cf61Sopenharmony_ci    some of the original filters and their auxiliary files of CUPS
637b66cf61Sopenharmony_ci    1.5.x or earlier and the auxiliary files of bannertops in all CUPS
647b66cf61Sopenharmony_ci    versions including version 1.6.x (see also the section "PACKAGING
657b66cf61Sopenharmony_ci    THE SOFTWARE FOR OPERATING SYSTEM DISTRIBUTIONS" below). The
667b66cf61Sopenharmony_ci    system will still have the same functionality as before, but CUPS
677b66cf61Sopenharmony_ci    will not convert all incoming files into PostScript any more, it
687b66cf61Sopenharmony_ci    will convert them into PDF instead and after applying page
697b66cf61Sopenharmony_ci    management (N-up, selected pages, reverse order, ...) by the
707b66cf61Sopenharmony_ci    pdftopdf filter and convert PDF into the printer's native format
717b66cf61Sopenharmony_ci    then (PDF-based printing workflow). CUPS 1.6.x or later does not
727b66cf61Sopenharmony_ci    contain any filters which this package provides. It requires the
737b66cf61Sopenharmony_ci    installation of this package for printing with filters and drivers
747b66cf61Sopenharmony_ci    under Linux (or other non-Mac-OS-X operation systems).
757b66cf61Sopenharmony_ci
767b66cf61Sopenharmony_ci    Use the "--prefix" option to install the CUPS Filters software in another
777b66cf61Sopenharmony_ci    location:
787b66cf61Sopenharmony_ci
797b66cf61Sopenharmony_ci	./configure --prefix=/some/directory
807b66cf61Sopenharmony_ci
817b66cf61Sopenharmony_ci    To see a complete list of configuration options, use the --help option:
827b66cf61Sopenharmony_ci
837b66cf61Sopenharmony_ci        ./configure --help
847b66cf61Sopenharmony_ci
857b66cf61Sopenharmony_ci    If any of the dependent libraries are not installed in a system default
867b66cf61Sopenharmony_ci    location (typically "/usr/include" and "/usr/lib") you'll need to set the
877b66cf61Sopenharmony_ci    CFLAGS, CPPFLAGS, CXXFLAGS, DSOFLAGS, and LDFLAGS environment variables
887b66cf61Sopenharmony_ci    prior to running configure:
897b66cf61Sopenharmony_ci
907b66cf61Sopenharmony_ci	setenv CFLAGS "-I/some/directory"
917b66cf61Sopenharmony_ci	setenv CPPFLAGS "-I/some/directory"
927b66cf61Sopenharmony_ci	setenv CXXFLAGS "-I/some/directory"
937b66cf61Sopenharmony_ci	setenv DSOFLAGS "-L/some/directory"
947b66cf61Sopenharmony_ci	setenv LDFLAGS "-L/some/directory"
957b66cf61Sopenharmony_ci	./configure ...
967b66cf61Sopenharmony_ci
977b66cf61Sopenharmony_ci    or:
987b66cf61Sopenharmony_ci
997b66cf61Sopenharmony_ci	CFLAGS="-I/some/directory" \
1007b66cf61Sopenharmony_ci	CPPFLAGS="-I/some/directory" \
1017b66cf61Sopenharmony_ci	CXXFLAGS="-I/some/directory" \
1027b66cf61Sopenharmony_ci	DSOFLAGS="-L/some/directory" \
1037b66cf61Sopenharmony_ci	LDFLAGS="-L/some/directory" \
1047b66cf61Sopenharmony_ci	./configure ...
1057b66cf61Sopenharmony_ci
1067b66cf61Sopenharmony_ci    Once you have configured things, just type:
1077b66cf61Sopenharmony_ci
1087b66cf61Sopenharmony_ci	make ENTER
1097b66cf61Sopenharmony_ci
1107b66cf61Sopenharmony_ci    or if you have FreeBSD, NetBSD, or OpenBSD type:
1117b66cf61Sopenharmony_ci
1127b66cf61Sopenharmony_ci	gmake ENTER
1137b66cf61Sopenharmony_ci
1147b66cf61Sopenharmony_ci    to build the software.
1157b66cf61Sopenharmony_ci
1167b66cf61Sopenharmony_ci
1177b66cf61Sopenharmony_ciINSTALLING THE SOFTWARE
1187b66cf61Sopenharmony_ci
1197b66cf61Sopenharmony_ci    Once you have built the software you need to install it.  The "install"
1207b66cf61Sopenharmony_ci    target provides a quick way to install the software on your local system:
1217b66cf61Sopenharmony_ci
1227b66cf61Sopenharmony_ci	make install ENTER
1237b66cf61Sopenharmony_ci
1247b66cf61Sopenharmony_ci    or for FreeBSD, NetBSD, or OpenBSD:
1257b66cf61Sopenharmony_ci
1267b66cf61Sopenharmony_ci	gmake install ENTER
1277b66cf61Sopenharmony_ci
1287b66cf61Sopenharmony_ciPACKAGING THE SOFTWARE FOR OPERATING SYSTEM DISTRIBUTIONS
1297b66cf61Sopenharmony_ci
1307b66cf61Sopenharmony_ci    The use of cups-filters is supported for CUPS from version 1.5.x
1317b66cf61Sopenharmony_ci    on (to switch to the PDF-based printing workflow already now) and
1327b66cf61Sopenharmony_ci    required for CUPS 1.6.x (as it does not ship a complete filter set
1337b66cf61Sopenharmony_ci    any more). In both cases cups-filters ships some files which exist
1347b66cf61Sopenharmony_ci    also in CUPS, but the versions of cups-filters have to be used to
1357b66cf61Sopenharmony_ci    assure that printing works correctly. So in the packaging of CUPS
1367b66cf61Sopenharmony_ci    the files should be removed.
1377b66cf61Sopenharmony_ci
1387b66cf61Sopenharmony_ci    Use the alternatives facility (see update-alternatives(8)) only if
1397b66cf61Sopenharmony_ci    your CUPS version is 1.5.x and you want to make the use of
1407b66cf61Sopenharmony_ci    cups-filters optional. Note that then the files of cups-filters
1417b66cf61Sopenharmony_ci    need to have priority.
1427b66cf61Sopenharmony_ci
1437b66cf61Sopenharmony_ci    When using cups-filters with CUPS 1.5.x, many of the original CUPS
1447b66cf61Sopenharmony_ci    filters get replaced or at least useless. Please remove the
1457b66cf61Sopenharmony_ci    following files from your CUPS package:
1467b66cf61Sopenharmony_ci
1477b66cf61Sopenharmony_ci	/usr/lib/cups/backend/serial
1487b66cf61Sopenharmony_ci	/usr/lib/cups/backend/parallel
1497b66cf61Sopenharmony_ci	/usr/lib/cups/filter/bannertops
1507b66cf61Sopenharmony_ci	/usr/lib/cups/filter/commandtoescpx
1517b66cf61Sopenharmony_ci	/usr/lib/cups/filter/commandtopclx
1527b66cf61Sopenharmony_ci	/usr/lib/cups/filter/imagetops
1537b66cf61Sopenharmony_ci	/usr/lib/cups/filter/imagetoraster
1547b66cf61Sopenharmony_ci	/usr/lib/cups/filter/pdftops
1557b66cf61Sopenharmony_ci	/usr/lib/cups/filter/rastertoescpx
1567b66cf61Sopenharmony_ci	/usr/lib/cups/filter/rastertopclx
1577b66cf61Sopenharmony_ci	/usr/lib/cups/filter/texttops
1587b66cf61Sopenharmony_ci	/usr/share/cups/banners/*
1597b66cf61Sopenharmony_ci	/usr/share/cups/data/testprint
1607b66cf61Sopenharmony_ci	/usr/share/cups/data/psglyphs
1617b66cf61Sopenharmony_ci	/usr/share/cups/fonts/*
1627b66cf61Sopenharmony_ci
1637b66cf61Sopenharmony_ci    Also comment out all conversion rules which use any of the removed
1647b66cf61Sopenharmony_ci    filters. You can do it with the following command line:
1657b66cf61Sopenharmony_ci
1667b66cf61Sopenharmony_ci	perl -p -i -e 's:^(.*\s+(pdftops|texttops|imagetops|bannertops|imagetoraster)\s*)$:#\1:' /usr/share/cups/mime/mime.convs
1677b66cf61Sopenharmony_ci
1687b66cf61Sopenharmony_ci    If you use CUPS 1.6.x there is less to remove from the CUPS
1697b66cf61Sopenharmony_ci    package. It is only bannertops and its auxiliary files which are
1707b66cf61Sopenharmony_ci    in the way for bannertopdf:
1717b66cf61Sopenharmony_ci
1727b66cf61Sopenharmony_ci	/usr/lib/cups/filter/bannertops
1737b66cf61Sopenharmony_ci	/usr/share/cups/banners/*
1747b66cf61Sopenharmony_ci	/usr/share/cups/data/testprint
1757b66cf61Sopenharmony_ci
1767b66cf61Sopenharmony_ci    The conversion rules get commented out via:
1777b66cf61Sopenharmony_ci
1787b66cf61Sopenharmony_ci	perl -p -i -e 's:^(.*\s+bannertops\s*)$:#\1:' /usr/share/cups/mime/mime.convs
1797b66cf61Sopenharmony_ci
1807b66cf61Sopenharmony_ci    For CUPS 1.6.x a bug report/feature request is posted to ask for
1817b66cf61Sopenharmony_ci    (at least optional) removal of bannertops:
1827b66cf61Sopenharmony_ci
1837b66cf61Sopenharmony_ci	http://www.cups.org/str.php?L4120
184