cvs: peardoc /en/guide/developers package2.xml /en/guide/developers/package2 usesrole.xml usestask.xml
| From: | Greg Beaver | 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 @@
<tasks:replace from="@php_dir@" to="php_dir"
type="pear-config" />
<tasks:replace from="@pear_version@" to="version"
type="package-info" />
<tasks:replace from="@include_path@" to="php_dir"
type="pear-config" />
+ <tasks:footask/>
</file>
</dir> <!-- /scripts -->
<file name="package.dtd" role="data" />
<file name="postinstall.php" role="php">
<link
linkend="guide.developers.package2.tasks.postinstallscript"><tasks:postinstallscript/></link>
</file>
- <file name="template.spec" role="data" />
+ <file name="template.spec" role="foo" />
</dir> <!-- / -->
</contents>
<link
linkend="guide.developers.package2.compatible"><compatible></link>
@@ -221,6 +222,16 @@
</package>
</group>
</dependencies>
+ <link
linkend="guide.developers.package2.usesrole"><usesrole></link>
+ <role>foo</role>
+ <package>Foo</package>
+ <channel>pear.example.com</channel>
+ </usesrole>
+ <link
linkend="guide.developers.package2.usestask"><usestask></link>
+ <task>footask</task>
+ <package>Footask</package>
+ <channel>pear.example.com</channel>
+ </usestask>
<link
linkend="guide.developers.package2.release"><phprelease></link>
<installconditions>
<os>
@@ -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><usesrole></refname>
<refpurpose>documenting custom file roles used in
<contents></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 <file> 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
"foo", then the error message on installation will simply say "unknown
role 'foo'", which is not very helpful.
</para>
<para>
The <usesrole> tag instead prompts the installer to tell the user "this
package
uses the custom role 'foo', install package pear.example.com/Foo to use"
</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><usestask></refname>
<refpurpose>documenting custom tasks used in <contents></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 <file> 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
"foo", then the error message on installation will simply say "unknown
task 'foo'", which is not very helpful.
</para>
<para>
The <usestask> tag instead prompts the installer to tell the user "this
package
uses the custom task 'foo', install package pear.example.com/Foo to use"
</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
-->