<?xml version="1.0" encoding="ISO-8859-1" ?> <package version="1.0"> <name>Money_Fast</name> <summary>Make money fast.</summary> <description> This package helps you to make money pretty fast. </description> <maintainers> <maintainer> <user>foo</user> <name>Joe Foo</name> <email>foo@example.com</email> <role>lead</role> </maintainer> </maintainers> <release> <version>1.0</version> <date>2002-05-27</date> <state>stable</state> <notes> This is the first release. </notes> <filelist> <dir name="/" baseinstalldir="Money"> <file role="php">Fast.php</file> </dir> </filelist> </release> </package>
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.
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 single <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.
The attribute optional can be used when a dependency is not required but having the package installed can bring enhanced functionalities. The only legal values are "yes" and "no". If the optional attribute is not present, a dependency is required. When optional="yes" is used, this attribute will result in installation messages similar to the following messages:
$ pear install <package> Optional dependencies: Package `XML_Tree' is recommended to utilize some features. Package `MDB' is recommended to utilize some features.
Deliver First Class Web Sites: 101 Essential Checklists Want to learn how to make your web sites usable and accessible? Want to ensure that your sites meet current best practice, without spending hours trawling through incomprehensible specifications and recommendations from dozens of different books, research papers, and web sites? Want to make sure that the sites you build are "right the first time," requiring no costly redevelopments?