Changeset 211

Show
Ignore:
Timestamp:
08/01/07 23:02:23 (1 year ago)
Author:
hans
Message:

#128 - Adding basic documentation for pearpkg2

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/docs/phing_guide/book/chapters/appendixes/AppendixC-OptionalTasks.html

    r203 r211  
    418418  to completely script the building of a PEAR pacakge. 
    419419</p> 
     420<p><strong>Note that this task creates a <em>version 1</em> package.xml file.</strong></p> 
    420421 
    421422<p> 
     
    486487      <td>No</td> 
    487488        </tr> 
     489  </tbody> 
     490</table> 
     491 
     492<h3>Supported Nested Tags</h3> 
     493<ul> 
     494  <li>fileset</li> 
     495  <li>option</li> 
     496  <li>mapping</li> 
     497</ul> 
     498 
     499 
     500<h2><a name="PearPackage2Task"></a>PearPackage2Task</h2> 
     501<p> 
     502  With the PearPackage2Task, you can create a <em>version 2</em> package.xml which can be installed 
     503  using the PEAR installer. Use this in conjunction with the <a href="#Tasks.TarTask">TarTask</a> 
     504  to completely script the building of a PEAR pacakge. 
     505</p> 
     506 
     507<p> 
     508  This task uses the PEAR_PackageFileManager2 class.  In order to be maximally flexible, the majority 
     509  of options are set generically (using <em>&lt;option&gt;</em> tag) and are set using PEAR_PackageFileManager::setOptions(). 
     510  Use the <em>&lt;mapping&gt;</em> tag to represent complex values. 
     511</p> 
     512 
     513<p> 
     514 Note that  Travis Swicegood  has created a more complete implementation of this functionality which can be found here: <a href="http://pear.domain51.com/index.php?package=Phing_d51PearPkg2Task">http://pear.domain51.com/index.php?package=Phing_d51PearPkg2Task</a>. 
     515</p> 
     516 
     517<h3>Example</h3> 
     518<pre>&lt;pearpkg2 name="phing" dir="${build.src.dir}"&gt; 
     519   &lt;option name=&quot;outputdirectory&quot; value=&quot;./build&quot;/&gt;<br />   &lt;option name=&quot;packagefile&quot; value=&quot;package2.xml&quot;/&gt;<br />   &lt;option name=&quot;packagedirectory&quot; value=&quot;./${build.dist.dir}&quot;/&gt;<br />   &lt;option name=&quot;baseinstalldir&quot; value=&quot;${pkg.prefix}&quot;/&gt;<br />   &lt;option name=&quot;channel&quot; value=&quot;my.pear-channel.com&quot;/&gt;<br />   &lt;option name=&quot;summary&quot; value=&quot;${pkg.summary}&quot;/&gt;<br />   &lt;option name=&quot;description&quot; value=&quot;${pkg.description}&quot;/&gt;<br />   &lt;option name=&quot;apiversion&quot; value=&quot;${pkg.version}&quot;/&gt;<br />   &lt;option name=&quot;apistability&quot; value=&quot;beta&quot;/&gt;<br />   &lt;option name=&quot;releaseversion&quot; value=&quot;${pkg.version}&quot;/&gt;<br />   &lt;option name=&quot;releasestability&quot; value=&quot;beta&quot;/&gt;<br />   &lt;option name=&quot;license&quot; value=&quot;none&quot;/&gt;<br />   &lt;option name=&quot;phpdep&quot; value=&quot;5.0.0&quot;/&gt;<br />   &lt;option name=&quot;pearinstallerdep&quot; value=&quot;1.4.6&quot;/&gt;<br />   &lt;option name=&quot;packagetype&quot; value=&quot;php&quot;/&gt;<br />   &lt;option name=&quot;notes&quot; value=&quot;${pkg.relnotes}&quot;/&gt;<br />   &lt;mapping name=&quot;maintainers&quot;&gt;<br />    &lt;element&gt;<br />     &lt;element key=&quot;handle&quot; value=&quot;hlellelid&quot;/&gt;<br />     &lt;element key=&quot;name&quot; value=&quot;Hans&quot;/&gt;<br />     &lt;element key=&quot;email&quot; value=&quot;hans@xmpl.org&quot;/&gt;<br />     &lt;element key=&quot;role&quot; value=&quot;lead&quot;/&gt;<br />    &lt;/element&gt;<br />   &lt;/mapping&gt;<br />&lt;/pearpkg2&gt;</pre> 
     520 
     521<h3>Attributes</h3> 
     522<table> 
     523  <thead> 
     524    <tr> 
     525      <th>Name</th> 
     526      <th>Type</th> 
     527      <th>Description</th> 
     528      <th>Default</th> 
     529      <th>Required</th> 
     530    </tr> 
     531  </thead> 
     532  <tbody> 
     533    <tr> 
     534      <td>name</td> 
     535      <td>String</td> 
     536      <td> 
     537        The name of the PEAR package.      </td> 
     538      <td>n/a</td> 
     539      <td>Yes</td> 
     540    </tr> 
     541    <tr> 
     542      <td>dir</td> 
     543      <td>String</td> 
     544      <td> 
     545        The base directory of files to add to package.      </td> 
     546      <td>n/a</td> 
     547      <td>Yes</td> 
     548    </tr> 
    488549  </tbody> 
    489550</table>