cvs: peardoc /en/guide/developers/package2 tasks.xml

From: Date: Mon, 14 Mar 2005 05:01:01 +0000
Subject: cvs: peardoc /en/guide/developers/package2 tasks.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-5664@lists.php.net to get a copy of this message
cellog Mon Mar 14 00:01:01 2005 EDT Added files: /peardoc/en/guide/developers/package2 tasks.xml Log: add tasks documentation (postinstallscript is incomplete) http://cvs.php.net/co.php/peardoc/en/guide/developers/package2/tasks.xml?r=1.1&p=1 Index: peardoc/en/guide/developers/package2/tasks.xml +++ peardoc/en/guide/developers/package2/tasks.xml <!-- $Revision: 1.1 $ --> <refentry id="guide.developers.package2.tasks"> <refnamediv> <refname>tasks for &lt;file&gt;s</refname> <refpurpose>specialized file installation and manipulation</refpurpose> </refnamediv> <refsect1 id="guide.developers.package2.tasks.overview"> <title>Using tasks to customize file installation</title> <para> Tasks provide a flexible and customizable way to manipulate file contents or to perform complex installation tasks (hence the name &quot;tasks&quot;). By default, PEAR comes with 4 tasks, but customized tasks can be added simply by adding a file into the PEAR/Tasks directory that follows the conventions of existing tasks. This page does not describe how to create a custom task, only how to use them in package.xml. </para> <para> There are 3 basic tasks and 1 complex task distributed with PEAR. The basic tasks are &quot;replace&quot;, &quot;windowseol&quot;, and &quot;unixeol&quot;. The complex task is &quot;postinstallscript&quot;. &quot;replace&quot; is nearly identical to the old &lt;replace&gt; tag from package.xml 1.0, and does a text search-and-replace of a file's contents. &quot;windowseol&quot; and &quot;unixeol&quot; manipulate the line endings of a file to ensure that the correct line endings are in place for critical files like DOS .bat batch files and unix shell scripts. &quot;postinstallscript&quot; allows users to choose to run a script to perform further installation functions. </para> <refsect2 id="guide.developers.package2.tasks.replace"> <title>&lt;tasks:replace&gt; - customizing file contents</title> <para> The replace task has 3 required attributes: </para> <para> <orderedlist> <listitem> <para> <emphasis>type</emphasis> - This must be either package-info or pear-config. package-info replacements extract information from package.xml itself to use as the replacement text. pear-config replacements use the value of a configuration variable (as displayed by <screen>pear config-show</screen>) as the text for replacement. </para> </listitem> <listitem> <para> <emphasis>from</emphasis> - Text to search for in a file. Traditionally, this text is enclosed in &quot;@&quot; to differentiate it from normal text, as in from=&quot;@version@&quot; </para> </listitem> <listitem> <para> <emphasis>to</emphasis> - Abstract item to use as a replacement for all occurences of &quot;from&quot;. package-version replacements can be one of version, release_date, release_state, release_license, release_notes, apiversion, name, summary, description, notes, time, date, and for some packages extends, srcpackage, srcuri, and providesextension. </para> </listitem> </orderedlist> </para> <para> Note that package-info replacements are performed at packaging time, so files contain package-info replacements inside a .tgz/.tar release. pear-config replacements can only occur on the installation system, and are performed at install-time. </para> </refsect2> <refsect2 id="guide.developers.package2.tasks.windowseol"> <title>&lt;tasks:windowseol&gt; - converting line endings to \r\n</title> <para> This task can be used to enable packaging of windows-specific files (like DOS batch files) on a non-windows system, such as unix systems that convert line endings to \n. Note that this task is performed at package-time, as well as at install-time, so files will contain the correct line endings inside a .tgz/.tar release. </para> </refsect2> <refsect2 id="guide.developers.package2.tasks.unixeol"> <title>&lt;tasks:unixeol&gt; - converting line endings to \n</title> <para> This task can be used to enable packaging of unix-specific files (like sh shell scripts) on a non-unix system, such as windows systems that convert line endings to \r\n. Note that this task is performed at package-time, as well as at install-time, so files will contain the correct line endings inside a .tgz/.tar release. </para> </refsect2> <refsect2 id="guide.developers.package2.tasks.postinstallscript"> <title>&lt;tasks:postinstallscript&gt; - extreme customization</title> <para> The postinstallscript task informs the installer that the file it references is a post-installation script. </para> <para> For security reasons, post-install scripts must be manually executed by the users, and as such the installer has special code that is separate from other tasks. </para> <para> The &lt;postinstallscript&gt; tag may define parameters that are used by the installer to retrieve user input. In order to support both the web installer and the command-line installer, all processing of input is performed by PEAR and passed to the post-install script in a strict format. All you need to do is define the parameters using xml inside the &lt;postinstallscript&gt; tag. </para> <para> Note: documentation is not yet finished for postinstallscript, but will be soon. </para> </refsect2> </refsect1> </refentry> <!-- Keep this comment at the end of the file Local variables: mode: sgml sgml-omittag:t sgml-shorttag:t sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-indent-step:1 sgml-indent-data:t sgml-parent-document:nil sgml-default-dtd-file:"../../../../manual.ced" sgml-exposed-tags:nil sgml-local-catalogs:nil sgml-local-ecat-files:nil End: vim600: syn=xml fen fdm=syntax fdl=2 si vim: et tw=78 syn=sgml vi: ts=1 sw=1 -->

« previous php.pear.doc (#5664) next »