cvs: peardoc /ru/guide/developers packagedef.xml

From: Date: Fri, 09 Dec 2005 20:58:59 +0000
Subject: cvs: peardoc /ru/guide/developers packagedef.xml
Groups: php.pear.doc 
Request: Send a blank email to pear-doc+get-7286@lists.php.net to get a copy of this message
wiesemann Fri Dec 9 15:58:59 2005 EDT Modified files: /peardoc/ru/guide/developers packagedef.xml Log: As nobody was able to fix all errors in Russian version of the manual, I have copied english contents to packagedef.xml because <sect2> must not be empty. This is not an ideal solution but now he have error-free versions of PEAR manual for all languages.

http://cvs.php.net/diff.php/peardoc/ru/guide/developers/packagedef.xml?r1=1.4&r2=1.5&ty=u Index: peardoc/ru/guide/developers/packagedef.xml diff -u peardoc/ru/guide/developers/packagedef.xml:1.4 peardoc/ru/guide/developers/packagedef.xml:1.5 --- peardoc/ru/guide/developers/packagedef.xml:1.4 Sun Dec 4 15:11:06 2005 +++ peardoc/ru/guide/developers/packagedef.xml Fri Dec 9 15:58:59 2005 @@ -189,9 +189,48 @@ </sect2> <sect2 id="developers.packagedef.characters"> + <title>Allowed characters</title> + <para> + The letters allowed inside elements are A-Z and a-z. + Other characters, such as <literal>&eacute;</literal> + must use entities + (in this case: <literal>&amp;eacute;</literal>). + </para> + <para> + If you create your package.xml files using the + PEAR_PackageFileManager, upgrade your PEAR installation + to version 1.4.0a2 or greater and you won't have + to worry about this because the file manager takes care + of this automatically. + </para> + <para> + If you write your package.xml files manually, you will + need to enter the entities yourself. + A list of the most common entities can be found at: + <ulink url="&url.xml.entities.common;"> + &url.xml.entities.common;</ulink> + If the characters you need aren't in that list, go to + <ulink url="&url.xml.entities.all;"> + &url.xml.entities.all;</ulink> + and look at the other entity lists. + </para> </sect2> <sect2 id="developers.packagedef.validating"> + <title>Validing</title> + + <para> + In order to validate <filename>package.xml</filename> files one + can use the <command>xmllint</command> tool that comes with + <ulink url="&url.libxml;">libxml2</ulink>. + </para> + <para> + <command> + <userinput> + xmllint --dtdvalid http://pear.php.net/dtd/package-1.0 --noout package.xml + </userinput> + </command> + </para> </sect2> <sect2 id="developers.packagedef.creating"> @@ -297,11 +336,316 @@ </sect2> <sect2 id="developers.packagedef.roles"> + <title>The file roles</title> + <para> + The <literal>role</literal>-attribute in the &lt;file&gt; tag + defines what type the file has and in which location it should + be installed. + <table> + <title>Possible values</title> + <tgroup cols="3"> + <thead> + <row> + <entry>Value</entry> + <entry></entry> + <entry>Destination dir</entry> + </row> + </thead> + <tbody> + + <row> + <entry>php</entry> + <entry>PHP source file</entry> + <entry>the directory is determined by the package name</entry> + </row> + + <row> + <entry>ext</entry> + <entry>Extension, dynamically loadable library</entry> + <entry>the PHP extension directory or + <constant>PHP_PEAR_EXTENSION_DIR</constant> + if defined</entry> + </row> + + <row> + <entry>doc</entry> + <entry>Documentation file</entry> + <entry>{PEAR_documentation_dir}/Package_Name/</entry> + </row> + + <row> + <entry>data</entry> + <entry>Package related data files (graphics, data tables etc)</entry> + <entry>{PEAR_data_dir}/Package_Name/</entry> + </row> + + <row> + <entry>test</entry> + <entry>Package related test files (unit-tests etc)</entry> + <entry>{PEAR_test_dir}/Package_Name/</entry> + </row> + + <row> + <entry>script</entry> + <entry>Package related shell scripts</entry> + <entry>the PHP binary directory or + <constant>PHP_PEAR_BIN_DIR</constant> + if defined</entry> + </row> + + <row> + <entry>src and extsrc</entry> + <entry>C or C++ source code</entry> + <entry>not copied directly - used to build a + extension</entry> + </row> + + </tbody> + </tgroup> + </table> + </para> + </sect2> <sect2 id="guide.developers.packagedef.deps"> - </sect2> + <title>Defining Dependencies</title> + + <para> + The PEAR Package Manager supports checking for + different system capabilities. You define those + dependencies with the <literal>&lt;dep&gt;</literal> tag: + <example> + <title><filename>package.xml</filename> with dependencies</title> + <simpara> + The following example shows how to specificy dependencies for + PHP 4.3.0 or better and <classname>XML_Parser</classname> 1.0. + </simpara> + <programlisting role="xml"> + <![CDATA[ +<?xml version="1.0" encoding="ISO-8859-1" ?> + +[...] + </release> + <deps> + <dep type="php" rel="ge" version="4.3.0" /> + <dep type="pkg" rel="has" version="1.0">XML_Parser</dep> + </deps> +</package> + ]]> + </programlisting> + </example> + </para> + <sect3> + <title>The <literal>type</literal>-attribute</title> + <para> + The following <literal>type</literal>s are supported: + <table> + <title>type values</title> + <tgroup cols="4"> + <thead> + <row> + <entry>Value</entry> + <entry></entry> + <entry>Meaning</entry> + <entry>Example</entry> + </row> + </thead> + <tbody> + + <row> + <entry>pkg</entry> + <entry>Package</entry> + <entry>depends on a certain Package</entry> + <entry><quote>HTML_Flexy</quote></entry> + </row> + + <row> + <entry>ext</entry> + <entry>Extension</entry> + <entry>depends on a certain PHP extension</entry> + <entry><quote>curl</quote></entry> + </row> + + <row> + <entry>php</entry> + <entry>PHP</entry> + <entry>depends on a certain PHP version</entry> + <entry><quote>4.2</quote></entry> + </row> + <row> + <entry>prog</entry> + <entry>Program</entry> + <entry> + depends on a certain Program avaible in the + system path. This is not supported in the PEAR installer. + </entry> + <entry><quote>latex</quote></entry> + </row> + + <row> + <entry>os</entry> + <entry>Operating System</entry> + <entry>depends on a certain OS version</entry> + <entry><quote>Linux</quote></entry> + </row> + + <row> + <entry>sapi</entry> + <entry>Server API</entry> + <entry>depends on a certain Server API. This is not supported in the PEAR installer.</entry> + <entry><quote>Apache</quote></entry> + </row> + + <row> + <entry>zend</entry> + <entry>Zend</entry> + <entry>depends on a certain version of the Zend API. + This is not supported in the PEAR installer.</entry> + <entry><quote>2</quote></entry> + </row> + </tbody> + </tgroup> + </table> + + </para> + <warning> + <simpara> + The DTD for the package definition file supports + further types, but those are not supported yet. + </simpara> + </warning> + </sect3> + <sect3> + <title>The <literal>rel</literal>-attribute</title> + <para> + The <literal>rel</literal>-attribute + defines the relationship between the existing + capability and the required. + </para> + <table> + <title>rel values</title> + <tgroup cols="4"> + <thead> + <row> + <entry>Value</entry> + <entry></entry> + <entry>Meaning</entry> + <entry>Can be used with</entry> + </row> + </thead> + <tbody> + + <row> + <entry>has</entry> + <entry>has</entry> + <entry> + the existing capability must have the + requirement - version-attribute is + ignored + </entry> + <entry>pkg, ext, php, prog, os, sapi, zend</entry> + </row> + + <row> + <entry>eq</entry> + <entry>equal</entry> + <entry> + the the existing capability must exactly match the + version value + </entry> + <entry>pkg, ext, php, prog, os, sapi, zend</entry> + </row> + + <row> + <entry>lt</entry> + <entry>less than</entry> + <entry> + the existing capability must be less than the version value + </entry> + <entry>pkg, ext, php, zend</entry> + </row> + + <row> + <entry>le</entry> + <entry>less than or equal</entry> + <entry> + the existing capability must be less than or equal to the + version value + </entry> + <entry>pkg, ext, php, zend</entry> + </row> + + <row> + <entry>gt</entry> + <entry>greater than</entry> + <entry> + the existing capability must be greater than the version + value + </entry> + <entry>pkg, ext, php, zend</entry> + </row> + + <row> + <entry>ge</entry> + <entry>greater than or equal</entry> + <entry> + the existing capability must greater than or equal to the + version value + </entry> + <entry>pkg, ext, php, zend</entry> + </row> + + <row> + <entry>not</entry> + <entry>conflicting dependency</entry> + <entry> + the dependency conflicts with the package, the two cannot co-exist. + version is ignored. + </entry> + <entry>ext, php</entry> + </row> + + </tbody> + </tgroup> + </table> + <para> + <literal>Has</literal> will be used if no other value has been + defined. Note that rel is required in PEAR 1.4.0 and newer. + </para> + </sect3> + <sect3> + <title>The <literal>version</literal>-attribute</title> + + <para> + The attribute <literal>version</literal> defines the version + that is used to compare. + </para> + </sect3> + <sect3> + <title>The <literal>optional</literal>-attribute</title> + + <para> + The attribute <literal>optional</literal> can be used when + a dependency is not required but having the package installed + can bring enhanced functionalities. The only legal values are &quot;yes&quot; + and &quot;no&quot;. If the optional attribute is not present, a dependency is + required. + When <literal>optional=&quot;yes&quot;</literal> is used, this attribute + will result in installation messages similar to the following messages: + </para> + <para> + <screen> + <userinput> +&dollar; pear install &lt;package&gt; +Optional dependencies: +Package `XML_Tree' is recommended to utilize some features. +Package `MDB' is recommended to utilize some features. + </userinput> + </screen> + </para> + </sect3> + </sect2> </sect1> </chapter>
« previous php.pear.doc (#7286) next »