Update of /cvsroot/fink/web/xml/packaging In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17650
Modified Files: packaging.en.xml Log Message: Document PatchFile and related fields. Index: packaging.en.xml =================================================================== RCS file: /cvsroot/fink/web/xml/packaging/packaging.en.xml,v retrieving revision 1.86 retrieving revision 1.87 diff -u -d -r1.86 -r1.87 --- packaging.en.xml 9 Feb 2006 02:26:39 -0000 1.86 +++ packaging.en.xml 22 Feb 2006 06:31:55 -0000 1.87 @@ -397,6 +397,14 @@ package is blank. (Introduced in fink-0.20.6) </p> </itemd></item> + +<item><itemt>%{PatchFile}</itemt> +<itemd> +<p> +The full path to the file given in the <code>PatchFile</code> field. +(Introduced in fink-0.24.12) +</p> +</itemd></item> </itemtable> </section> @@ -2286,10 +2294,11 @@ <p> The filename of a patch to be applied with <code>patch -p1 <<em>patch-file</em></code>. This should be just a filename; the -appropriate path will be prepended automatically. Percent expansion is +appropriate path (the same directory where the <code>.info</code> file +is located) will be prepended automatically. Percent expansion is performed on this field, so a typical value is simply <code>%f.patch</code> or <code>%n.patch</code>. The patch is applied -before the PatchScript is run (if any). +in a separate step before the PatchScript is run (if any). </p> <p> Remember that %n includes all %type_ variant data, so you may want to @@ -2300,6 +2309,35 @@ </p> </itemd></item> +<item><itemt>PatchFile</itemt> +<itemd> +<p> +The same syntax as the <code>Patch</code> field. The full path to this +file is available using the <code>%{PatchFile}</code> percent +expansion--do not use <code>%a</code> to access this file. +Unlike <code>Patch</code>, <code>PatchFile</code> is applied as part +of <code>PatchScript</code>. Fink checks that the listed file exists, +is readable, and that its checksum matches +the <code>PatchFile-MD5</code> field. +</p> +<p> +You may not use both <code>Patch</code> and <code>PatchFile</code> in +the same package description. Any package that +uses <code>PatchFile</code> must declare at least +<code>BuildDepends: fink (>= 0.24.12)</code>. Giving a higher version +requirement is allowed if it is necessary for other reasons. +</p> +</itemd></item> + +<item><itemt>PatchFile-MD5</itemt> +<itemd> +<p> +The MD5 checksum of the file given in the <code>PatchFile</code> +field. This field is required if <code>PatchFile</code> is used. +(Introduced in fink-0.24.12) +</p> +</itemd></item> + <item><itemt>PatchScript</itemt> <itemd> <p> @@ -2307,8 +2345,17 @@ to put commands that patch or otherwise modify the package source. See the <xref chapter="reference" section="scripts">note on scripts</xref> below. Before the commands are executed, <xref chapter="format" -section="percent">percent expansion</xref> takes place. There is no -default. +section="percent">percent expansion</xref> takes place. If +a <code>PatchFile</code> field exists, the +default <code>PatchScript</code> is: +</p> +<codeblock> +patch -p1 < %{PatchFile} +</codeblock> +<p> +If there is no <code>PatchFile</code>, the default is blank. If you +have an explicit <code>PatchScript</code>, you must apply +the <code>PatchFile</code> explicitly. </p> </itemd></item> @@ -2996,7 +3043,13 @@ <p>If you use the newer simple package filename convention, use %n insead of %f. These two fields are not mutually-exclusive - you can use both, and they will both be executed. In that case the PatchScript -is executed last.</p> +is executed last. Alternately, you can use the +newer <code>PatchFile</code> instead of <code>Patch</code> and apply +with an implicit or explicit <code>PatchScript</code>--see the +descriptions of the <code>PatchFile</code> +and <code>PatchScript</code> fields for more information.</p> + + <p>Because you may need to have the users chosen prefix in the patch file it is recommended that you have a variable such as <code>@PREFIX@</code> instead of <code>/sw</code> in the patch and then use:</p> ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642 _______________________________________________ Fink-commits mailing list Fink-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-commits