[49073] trunk/dports/print/cups-pdf
blb at macports.org
blb at macports.org
Thu Apr 2 22:45:51 PDT 2009
Revision: 49073
http://trac.macports.org/changeset/49073
Author: blb at macports.org
Date: 2009-04-02 22:45:51 -0700 (Thu, 02 Apr 2009)
Log Message:
-----------
print/cups-pdf - move the link-creation stuff into a separate shell script
so it can just be run instead of having to run commands via copy/paste (and
can be run again if need be); also copy the config file if it doesn't already
exist instead of saying to do so
Modified Paths:
--------------
trunk/dports/print/cups-pdf/Portfile
Added Paths:
-----------
trunk/dports/print/cups-pdf/files/
trunk/dports/print/cups-pdf/files/cups-pdf_links.sh
Modified: trunk/dports/print/cups-pdf/Portfile
===================================================================
--- trunk/dports/print/cups-pdf/Portfile 2009-04-03 02:06:33 UTC (rev 49072)
+++ trunk/dports/print/cups-pdf/Portfile 2009-04-03 05:45:51 UTC (rev 49073)
@@ -3,6 +3,7 @@
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
@@ -73,21 +74,28 @@
}
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-install {
+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, symlink the cups-pdf backend with:"
- ui_msg " sudo ln -s ${prefix}/libexec/cups/backend/cups-pdf /usr/libexec/cups/backend/"
- ui_msg " Next, symlink the color postscript model:"
- ui_msg " sudo ln -s ${prefix}/share/cups/model/CUPS-PDF.ppd /usr/share/cups/model/"
- ui_msg " Then, create the config file:"
- ui_msg " sudo cp ${prefix}/etc/cups/cups-pdf.conf.dist ${prefix}/etc/cups/cups-pdf.conf"
- ui_msg " Edit cups-pdf.conf as needed"
- ui_msg " Finally, tell cupsd to update (it may not be running on 10.5):"
+ 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
Added: trunk/dports/print/cups-pdf/files/cups-pdf_links.sh
===================================================================
--- trunk/dports/print/cups-pdf/files/cups-pdf_links.sh (rev 0)
+++ trunk/dports/print/cups-pdf/files/cups-pdf_links.sh 2009-04-03 05:45:51 UTC (rev 49073)
@@ -0,0 +1,17 @@
+#!/bin/sh
+#
+# Create links necessary for CUPS to see cups-pdf
+
+if [[ `/usr/bin/id -u` != 0 ]]; then
+ exec /usr/bin/sudo $0
+fi
+
+if [[ ! -f /usr/libexec/cups/backend/cups-pdf ]]; then
+ echo "Creating symlink /usr/libexec/cups/backend/cups-pdf"
+ ln -s @@PREFIX@@/libexec/cups/backend/cups-pdf /usr/libexec/cups/backend/
+fi
+if [[ ! -f /usr/share/cups/model/CUPS-PDF.ppd ]]; then
+ echo "Creating symlink /usr/share/cups/model/CUPS-PDF.ppd"
+ ln -s @@PREFIX@@/share/cups/model/CUPS-PDF.ppd /usr/share/cups/model/
+fi
+
Property changes on: trunk/dports/print/cups-pdf/files/cups-pdf_links.sh
___________________________________________________________________
Added: svn:executable
+ *
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090402/ee47dff4/attachment.html>
More information about the macports-changes
mailing list