[MacPorts] PortfileRecipes modified

MacPorts noreply at macports.org
Sat Oct 17 09:48:24 PDT 2009


Changed page "PortfileRecipes" by ryandesign at macports.org from 24.243.5.71*
Page URL: <http://trac.macports.org/wiki/PortfileRecipes>
Diff URL: <http://trac.macports.org/wiki/PortfileRecipes?action=diff&version=12>
Revision 12
Comment: add "installing additional documentation files" section

-------8<------8<------8<------8<------8<------8<------8<------8<--------
Index: PortfileRecipes
=========================================================================
--- PortfileRecipes (version: 11)
+++ PortfileRecipes (version: 12)
@@ -138,3 +138,24 @@
 The current solution is to rename any config files to append a ''.dist'' or ''.sample'' extension to them so that the proper name of the config file is not part of the port.  Then, in a post-activate phase, the port can test for the file's existence and, if it doesn't exist yet, copy it (copied in post-activate directly in ${prefix} keeps the file from being recorded as part of the port).
 
 The [browser:trunk/dports/net/squid/Portfile squid Portfile] and [browser:trunk/dports/security/stegdetect/Portfile stegdetect Portfile] are good examples.
+
+== Installing additional documentation files == #doc
+
+Many ports come with documentation files, like "README" and "ChangeLog", which are part of the source but not installed anywhere. If these files are of value to the end user, they should be installed by the port in the post-destroot phase. (Files such as "INSTALL", which contain only installation instructions, are not of value to the end user and should not be installed.) 
+
+{{{
+post-destroot {
+    set docdir ${destroot}${prefix}/share/doc/${name}
+    xinstall -d ${docdir}
+    xinstall -m 644 -W ${worksrcpath} \
+        AUTHORS \
+        COPYING \
+        NEWS \
+        README \
+        ${docdir}
+}
+}}}
+
+This example is taken from [browser:trunk/dports/www/spawn-fcgi/Portfile spawn-fcgi].
+
+Note: Ensure you use the correct capitalization for each filename. For example, many projects typically use all-caps for most of the documentation files, except for ChangeLog, which is often written in camel-case. If you fail to use the correct capitalization, the port may still install on your system, but will fail for users with case-sensitive filesystems.

-------8<------8<------8<------8<------8<------8<------8<------8<--------

* The IP shown here might not mean anything if the user or the server is
behind a proxy.

--
MacPorts <http://www.macports.org/>
Ports system for Mac OS

This is an automated message. Someone at http://www.macports.org/ added your email
address to be notified of changes on PortfileRecipes. If it was not you, please
report to .


More information about the macports-changes mailing list