cvs: peardoc /en/guide/developers package2.xml /en/guide/developers/package2 usesrole.xml usestask.xml

From: Date: Wed, 30 Mar 2005 19:40:25 +0000
Subject: cvs: peardoc /en/guide/developers package2.xml /en/guide/developers/package2 usesrole.xml usestask.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-5824@lists.php.net to get a copy of this message
cellog Wed Mar 30 14:40:25 2005 EDT Added files: /peardoc/en/guide/developers/package2 usesrole.xml usestask.xml Modified files: /peardoc/en/guide/developers package2.xml Log: add docs for <usesrole> and <usestask> http://cvs.php.net/diff.php/peardoc/en/guide/developers/package2.xml?r1=1.11&r2=1.12&ty=u Index: peardoc/en/guide/developers/package2.xml diff -u peardoc/en/guide/developers/package2.xml:1.11 peardoc/en/guide/developers/package2.xml:1.12 --- peardoc/en/guide/developers/package2.xml:1.11 Sat Mar 19 20:51:50 2005 +++ peardoc/en/guide/developers/package2.xml Wed Mar 30 14:40:25 2005 @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="iso-8859-1" ?> -<!-- $Revision: 1.11 $ --> +<!-- $Revision: 1.12 $ --> <chapter id="guide.developers.package2"> <title>The package definition file <filename>package.xml</filename>, version 2.0</title> <titleabbrev><filename>package.xml 2.0</filename></titleabbrev> @@ -141,13 +141,14 @@ &lt;tasks:replace from=&quot;@php_dir@&quot; to=&quot;php_dir&quot; type=&quot;pear-config&quot; /&gt; &lt;tasks:replace from=&quot;@pear_version@&quot; to=&quot;version&quot; type=&quot;package-info&quot; /&gt; &lt;tasks:replace from=&quot;@include_path@&quot; to=&quot;php_dir&quot; type=&quot;pear-config&quot; /&gt; + &lt;tasks:footask/&gt; &lt;/file&gt; &lt;/dir&gt; &lt;!-- /scripts --&gt; &lt;file name=&quot;package.dtd&quot; role=&quot;data&quot; /&gt; &lt;file name=&quot;postinstall.php&quot; role=&quot;php&quot;&gt; <link linkend="guide.developers.package2.tasks.postinstallscript">&lt;tasks:postinstallscript/&gt;</link> &lt;/file&gt; - &lt;file name=&quot;template.spec&quot; role=&quot;data&quot; /&gt; + &lt;file name=&quot;template.spec&quot; role=&quot;foo&quot; /&gt; &lt;/dir&gt; &lt;!-- / --&gt; &lt;/contents&gt; <link linkend="guide.developers.package2.compatible">&lt;compatible&gt;</link> @@ -221,6 +222,16 @@ &lt;/package&gt; &lt;/group&gt; &lt;/dependencies&gt; + <link linkend="guide.developers.package2.usesrole">&lt;usesrole&gt;</link> + &lt;role&gt;foo&lt;/role&gt; + &lt;package&gt;Foo&lt;/package&gt; + &lt;channel&gt;pear.example.com&lt;/channel&gt; + &lt;/usesrole&gt; + <link linkend="guide.developers.package2.usestask">&lt;usestask&gt;</link> + &lt;task&gt;footask&lt;/task&gt; + &lt;package&gt;Footask&lt;/package&gt; + &lt;channel&gt;pear.example.com&lt;/channel&gt; + &lt;/usestask&gt; <link linkend="guide.developers.package2.release">&lt;phprelease&gt;</link> &lt;installconditions&gt; &lt;os&gt; @@ -330,6 +341,8 @@ &guide.developers.package2.tasks; &guide.developers.package2.compatible; &guide.developers.package2.dependencies; + &guide.developers.package2.usesrole; + &guide.developers.package2.usestask; &guide.developers.package2.release; </sect1> </chapter> http://cvs.php.net/co.php/peardoc/en/guide/developers/package2/usesrole.xml?r=1.1&p=1 Index: peardoc/en/guide/developers/package2/usesrole.xml +++ peardoc/en/guide/developers/package2/usesrole.xml <!-- $Revision: 1.1 $ --> <refentry id="guide.developers.package2.usesrole"> <refnamediv> <refname>&lt;usesrole&gt;</refname> <refpurpose>documenting custom file roles used in &lt;contents&gt;</refpurpose> </refnamediv> <refsect1 id="guide.developers.package2.usesrole.purpose"> <title>Documenting custom file roles</title> <para> Standard file roles provided by default with PEAR are: </para> <para> <itemizedlist> <listitem> <para> php </para> </listitem> <listitem> <para> data </para> </listitem> <listitem> <para> doc </para> </listitem> <listitem> <para> test </para> </listitem> <listitem> <para> src </para> </listitem> <listitem> <para> ext </para> </listitem> </itemizedlist> </para> <para> If your package chooses to use a role provided by a third party that implements some more advanced file installation handling, all you need to do is specify the role in the xml for the &lt;file&gt; tag that contains it like so: </para> <para> <programlisting role="xml"> <![CDATA[ <file role="foo"/> ]]> </programlisting> </para> <para> However, if a user does not have the package installed that provides the custom role &quot;foo&quot;, then the error message on installation will simply say &quot;unknown role 'foo'&quot;, which is not very helpful. </para> <para> The &lt;usesrole&gt; tag instead prompts the installer to tell the user &quot;this package uses the custom role 'foo', install package pear.example.com/Foo to use&quot; </para> <para> <programlisting role="xml"> <![CDATA[ <usesrole> <role>foo</role> <package>Foo</package> <channel>pear.example.com</channel> </usesrole> ]]> </programlisting> </para> <para> Note that static URI packages (channel-less packages) are also supported: </para> <para> <programlisting role="xml"> <![CDATA[ <usesrole> <role>foo</role> <uri>http://pear.example.com/Foo-1.2.0</uri> </usesrole> ]]> </programlisting> </para> </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 --> http://cvs.php.net/co.php/peardoc/en/guide/developers/package2/usestask.xml?r=1.1&p=1 Index: peardoc/en/guide/developers/package2/usestask.xml +++ peardoc/en/guide/developers/package2/usestask.xml <!-- $Revision: 1.1 $ --> <refentry id="guide.developers.package2.usestask"> <refnamediv> <refname>&lt;usestask&gt;</refname> <refpurpose>documenting custom tasks used in &lt;contents&gt;</refpurpose> </refnamediv> <refsect1 id="guide.developers.package2.usestask.purpose"> <title>Documenting custom file tasks</title> <para> Standard file tasks provided by default with PEAR are documented in <link linkend="guide.developers.package2.tasks">this location</link>. </para> <para> If your package chooses to use a task provided by a third party, all you need to do is specify the task as part of the xml for the &lt;file&gt; tag that contains it like so: </para> <para> <programlisting role="xml"> <![CDATA[ <file role="php"> <tasks:foo/> </file> ]]> </programlisting> </para> <para> However, if a user does not have the package installed that provides the custom task &quot;foo&quot;, then the error message on installation will simply say &quot;unknown task 'foo'&quot;, which is not very helpful. </para> <para> The &lt;usestask&gt; tag instead prompts the installer to tell the user &quot;this package uses the custom task 'foo', install package pear.example.com/Foo to use&quot; </para> <para> <programlisting role="xml"> <![CDATA[ <usestask> <task>foo</task> <package>Foo</package> <channel>pear.example.com</channel> </usestask> ]]> </programlisting> </para> <para> Note that static URI packages (channel-less packages) are also supported: </para> <para> <programlisting role="xml"> <![CDATA[ <usestask> <task>foo</task> <uri>http://pear.example.com/Foo-1.2.0</uri> </usesrole> ]]> </programlisting> </para> </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 (#5824) next »