PEAR Handbuch | ||
---|---|---|
Zurück | Nach vorne |
The package definition file package.xml is, as the name already implies, a well-formed XML file that contains all information about a PEAR package.
This chapter will describe the allowed elements of the package definition file and it will discuss how to create such a file for your package.
The toplevel element in package.xml is the element <package version="1.0">. The allowed sub elements are:
<name>: The name of the package.
<summary>: Short summary of the package's description.
<description>: Full length description of the package.
<license>: The license of the package (PHP License, LGPL, etc.). Please see the license FAQ for details on acceptable PEAR licenses. The quick summary is that it should be accepted as a free software license by both OSI and the FSF.
<maintainers>: Information about the maintainers of the package.
<maintainer>: Information about a single maintainer. (May be used multiple times, one per developer.)
<user>: The account name of the user.
<role>: The role the user has during package development. (Can be either lead, developer, contributor, helper.)
<name>: The realname of the user.
<email>: The email address of the user.
<release>: Information about the current release.
<version>: The version number of the release.
<state>: The state of the release. (Can be one of alpha, beta, stable, snaphot, devel)
<date>: The date when the release has been rolled.
<notes>: Release notes
<filelist>
<file role="xxx">: Filename
<dir name="xxx" [role="xxx"]>: Name of a subdirectory. This subdirectory can again contain <file role="xxx"> entries.
<changelog>: Changelog-like information about the package.
<release>
<version>: Version of the specific release.
<state>: State of the specific release.
<date>: Date when the specific release has been rolled.
<notes>: Changelog information
Once you have built your package.xml, you can check its conformance with the command
$ pear package-validate package.xml |
Beispiel 9-1. Basic package.xml
|
This package.xml can serve as a template for you as it already contains all necessary elements. In most cases you only need to change the character data between the tags in order to use the example in your package.
Beispiel 9-2. Example for nested directories
|
In this example you get to know a very handy feature: When you have a directory in your package that only contains files of the same type, you can add to role attribute even to the <dir> tag instead of adding it to every singe <file> tag.
With the knowledge you aquired during this chapter you should now be able to produce a package definition file for your own package. If you still have questions concerning the topic, don't hesitate to ask on the mailinglist.
Zurück | Zum Anfang | Nach vorne |
How to contribute code in practice | Nach oben | Supporting PEAR development |