# $Id$ PortSystem 1.0 name cups-pdf version 2.5.0 revision 1 categories print textproc maintainers blb description Provides a print-to-PDF feature through CUPS long_description \ This software is designed to produce PDF files in a heterogeneous \ network by providing a PDF printer on the central fileserver. platforms darwin homepage http://www.cups-pdf.de/ master_sites ${homepage}src/ distname ${name}_${version} worksrcdir ${name}-${version} checksums md5 9194af099a8c0e9aa213505b29ec6818 \ sha1 3fa7aa012fe7be15e840e810565135243560a053 \ rmd160 589decb377f00a571a9c3dedbec72eda40e04c01 post-patch { reinplace "s|/etc|${prefix}/etc|" ${worksrcpath}/src/cups-pdf.h reinplace "s|/var/spool|${prefix}/var/spool|" \ ${worksrcpath}/src/cups-pdf.h reinplace "s|/var/log|${prefix}/var/log|" ${worksrcpath}/src/cups-pdf.h } use_configure no build { system "cd ${worksrcpath}/src && ${configure.cc} -Os -o cups-pdf cups-pdf.c" } destroot { xinstall -m 755 -d ${destroot}${prefix}/libexec/cups/backend \ ${destroot}/${prefix}/etc/cups ${destroot}${prefix}/share/cups/model \ ${destroot}/${prefix}/share/doc/${name} \ ${destroot}${prefix}/var/spool/cups-pdf \ ${destroot}${prefix}/var/log/cups xinstall -m 700 ${worksrcpath}/src/cups-pdf \ ${destroot}${prefix}/libexec/cups/backend xinstall -m 644 ${worksrcpath}/extra/cups-pdf.conf \ ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist xinstall -m 644 ${worksrcpath}/extra/CUPS-PDF.ppd \ ${destroot}${prefix}/share/cups/model xinstall -m 644 -W ${worksrcpath} README COPYING ChangeLog \ ${destroot}${prefix}/share/doc/${name} # Some initial changes to the conf file reinplace "s|#Out .*|Out \${HOME}/Desktop/cups-pdf/|" \ ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist reinplace "s| /var/spool| ${prefix}/var/spool|" \ ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist reinplace "s| /var/log| ${prefix}/var/log|" \ ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist reinplace "s|#Cut .*|Cut 3|" \ ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist reinplace "s|#Label .*|Label 1|" \ ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist reinplace "s|#Log |Log |" \ ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist reinplace "s|#Log |Log |" \ ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist reinplace "s|#GhostScript .*|GhostScript /usr/bin/pstopdf|" \ ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist reinplace "s|#GSCall .*|GSCall %s %s -o %s %s|" \ ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist reinplace "s|#PDFVer .*|PDFVer |" \ ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist } destroot.keepdirs ${destroot}${prefix}/var/spool/cups-pdf \ ${destroot}${prefix}/var/log/cups post-destroot { xinstall -m 755 -W ${filespath} cups-pdf_links.sh \ ${destroot}${prefix}/libexec/ reinplace "s|@@PREFIX@@|${prefix}|g" \ ${destroot}${prefix}/libexec/cups-pdf_links.sh } post-activate { ui_msg "\n*************************************************************" ui_msg "If this is the first installation, there are a couple of items" ui_msg "to do:" ui_msg "- First, symlinks in /usr are needed for CUPS to see cups-pdf, so" ui_msg " run (it will run sudo so may ask for your password):" ui_msg " ${prefix}/libexec/cups-pdf_links.sh" ui_msg "- Edit ${prefix}/etc/cups/cups-pdf.conf as needed" ui_msg "- Finally, tell cupsd to update (it may not be running on 10.5):" ui_msg " sudo killall -1 cupsd" ui_msg "\n*************************************************************" if {![file exists ${prefix}/etc/cups/cups-pdf.conf]} { copy ${prefix}/etc/cups/cups-pdf.conf.dist \ ${prefix}/etc/cups/cups-pdf.conf } } livecheck.check freshmeat livecheck.name cupspdf livecheck.regex {CUPS-PDF (.*)}