Cups-pdf version 2.5.0 - How to Download and Install on Mac OS X
Sunday the 21st of March, 2010

    cups-pdf  most recent diff


    version 2.5.0

      View the most recent changes for the cups-pdf port at: cups-pdf.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for cups-pdf.
      The raw portfile for cups-pdf 2.5.0 is located here:
      http://cups-pdf.darwinports.com/dports/print/cups-pdf/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/cups-pdf


      The cups-pdf Portfile 57886 2009-09-18 06:56:37Z blb macports.org $

      PortSystem 1.0
      Name: cups-pdf
      Version: 2.5.0
      Revision: 2
      Category: 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.

      Platform: 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
      if {${os.platform} == "darwin" && ${os.major} > 9} {
      reinplace "s|#Out .*|Out ${prefix}/var/spool/cups-pdf/\${USER}/|" ${destroot}${prefix}/etc/cups/cups-pdf.conf.dist
      } else {
      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 {${os.platform} == "darwin" && ${os.major} > 9} {
      ui_msg "As of Mac OS X 10.6, cups can no longer write into user"
      ui_msg "directories, so the output directory for ${name} has been"
      ui_msg "updated to reflect this. ${name} will now write PDF files"
      ui_msg "into ${prefix}/var/spool/cups-pdf/\$USER . You can create a"
      ui_msg "symlink to this location from Desktop to have it behave as"
      ui_msg "before:"
      ui_msg " ln -s ${prefix}/var/spool/cups-pdf/\$USER ~/Desktop/cups-pdf"
      }
      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
      } else {
      if {${os.platform} == "darwin" && ${os.major} > 9} {
      ui_msg "Note that your ${prefix}/etc/cups/cups-pdf.conf file is"
      ui_msg "not being touched, and may need to have the Out parameter"
      ui_msg "updated; see the ${prefix}/etc/cups/cups-pdf.conf.dist file"
      ui_msg "for an example"
      }
      }
      }

      livecheck.type freshmeat
      livecheck.name cupspdf
      livecheck.regex {CUPS-PDF (.*)}


    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/cups-pdf
      % sudo port install cups-pdf
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching cups-pdf
      ---> Verifying checksum for cups-pdf
      ---> Extracting cups-pdf
      ---> Configuring cups-pdf
      ---> Building cups-pdf with target all
      ---> Staging cups-pdf into destroot
      ---> Installing cups-pdf
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using cups-pdf with these commands:
      %  man cups-pdf
      % apropos cups-pdf
      % which cups-pdf
      % locate cups-pdf

     Where to find more information:

    Darwin Ports



    Lightbox this page.