# $Header: /magellan-cvs/smage/cups-pdf/cups-pdf-2.4.7-r1.smage2,v 1.2 2008/04/18 21:40:03 niro Exp $ PNAME="cups-pdf" PVER="2.4.7" PBUILD="r1" PCATEGORIE="net-print" STATE="unstable" DESCRIPTION="cups-pdf produces PDF files by providing a PDF printer via cups." HOMEPAGE="http://cip.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/" DEPEND=">= net-print/cups-1.3 >= app-text/ghostscript-esp-8" SRCFILE="${PNAME}_${PVER}.tar.gz" SRCDIR="${BUILDDIR}/${PNAME}-${PVER}" sminclude mtools SRC_URI=( http://www.physik.uni-wuerzburg.de/~vrbehr/${PNAME}/src/${SRCFILE} mirror://${PNAME}/${SRCFILE} ) src_prepare() { munpack ${SRCFILE} || die cd ${SRCDIR}/src # set cups user to lp instead of nobody sed -i "s:nobody:lp:" cups-pdf.h || die # setup log verbosity level to 2 (status) sed -i "s:CPLOGTYPE 3:CPLOGTYPE 2:" cups-pdf.h || die } src_compile() { cd ${SRCDIR}/src gcc ${CFLAGS} -o cups-pdf cups-pdf.c || die } src_install() { cd ${SRCDIR} # needed directories minstalldir /etc/cups || die minstalldir /usr/$(mlibdir)/cups/backend || die minstalldir /usr/share/cups/model || die # binary minstallexec src/cups-pdf /usr/$(mlibdir)/cups/backend || die # perms *must* be 0700 or cups doesn't find anything mchmod 0700 /usr/$(mlibdir)/cups/backend || die # printer description minstallfile extra/CUPS-PDF.ppd /usr/share/cups/model || die # config minstallfile extra/cups-pdf.conf /etc/cups || die minstalldocs COPYING ChangeLog README || die } postinstall() { echo echo "You need to restart the cups daemon in order to use this software." echo "After that you will be able to add a pdf printer to your system." echo echo "Select 'Virtual Printer (PDF Printer)' and than as driver vendor 'Postscript'" echo "You should find there a 'Generic postscript color printer'" echo "Now your system is ready to provide a network pdf-printer :)" echo }