| | 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><option></em> tag) and are set using PEAR_PackageFileManager::setOptions(). |
|---|
| | 510 | Use the <em><mapping></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><pearpkg2 name="phing" dir="${build.src.dir}"> |
|---|
| | 519 | <option name="outputdirectory" value="./build"/><br /> <option name="packagefile" value="package2.xml"/><br /> <option name="packagedirectory" value="./${build.dist.dir}"/><br /> <option name="baseinstalldir" value="${pkg.prefix}"/><br /> <option name="channel" value="my.pear-channel.com"/><br /> <option name="summary" value="${pkg.summary}"/><br /> <option name="description" value="${pkg.description}"/><br /> <option name="apiversion" value="${pkg.version}"/><br /> <option name="apistability" value="beta"/><br /> <option name="releaseversion" value="${pkg.version}"/><br /> <option name="releasestability" value="beta"/><br /> <option name="license" value="none"/><br /> <option name="phpdep" value="5.0.0"/><br /> <option name="pearinstallerdep" value="1.4.6"/><br /> <option name="packagetype" value="php"/><br /> <option name="notes" value="${pkg.relnotes}"/><br /> <mapping name="maintainers"><br /> <element><br /> <element key="handle" value="hlellelid"/><br /> <element key="name" value="Hans"/><br /> <element key="email" value="hans@xmpl.org"/><br /> <element key="role" value="lead"/><br /> </element><br /> </mapping><br /></pearpkg2></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> |
|---|