# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: $ DESCRIPTION="Provides a virtual printer for CUPS to produce PDF files." HOMEPAGE="http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/" MY_P="${PN}_${PV/_/}" SRC_URI="http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/${MY_P}.tar.gz" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" IUSE="" DEPEND="net-print/cups" S="${WORKDIR}/${MY_P}" src_compile() { gcc ${CFLAGS} -o cups-pdf cups-pdf.c || die "Compilation failed." } src_install () { dodir /usr/lib/cups/backend exeinto /usr/lib/cups/backend doexe cups-pdf dodir /usr/share/cups/model insinto /usr/share/cups/model doins PostscriptColor.ppd.gz cat > README.gentoo << EOF After restarting CUPS (/etc/init.d/cupsd restart), you will be able to choose "Virtual Printer (PDF Printer)" when setting up a new printer in CUPS. To set up a queue for other UNIX clients you should select Postscript as vendor and the Color Printer as model for your new printer; queues that get their input from samba or netatalk (i.e. Windows, OS/2 or MacOS) can be set up as raw queues. On the Windows, OS/2 or MacOS system choose a color postscript driver for that network printer (the drivers for Minolta Page Works or HP DesignJet printers do a good job). Once you print to the new device the output directory (/var/spool/cups-pdf) will be created and all converted PDF files will be placed in subdirectories named after the owner of the print job. In case the owner cannot be identified (i.e. does not exist on the server) the output is placed in the subdirectory for anonymous operation (ANONYMOUS/). Furthermore, a logfile will be placed in /var/log/cups. The file /usr/share/cups/model/PostscriptColor.ppd.gz is a modified version of the Postscript.ppd.gz that comes with CUPS 1.1.15 that is able to handle color output. EOF dodoc README.gentoo } pkg_postinst () { einfo "You will find some informations about cups-pdf in this file:" einfo "/usr/share/doc/${PF}/README.gentoo.gz" }