XOE Developers Guide v1.0: A guide to application development within the XOE framework | ||
---|---|---|
Prev | Appendix A. Reference Material | Next |
This is an example package description file.
<?xml version="1.0"?> <!DOCTYPE package PUBLIC "-//TVT//DTD XOEPKG 1.0//EN" "http://www.xoe.org/DTD/xoe-package.dtd"> <package name="libmp3-native" version="0.1"> <info> <name>Native MP3 playback library</name> <description> Native code for MP3 audio playback. Install this package if you want to be able to play MP3s on your device. These libraries are based on libmad which will also be installed if you select this package. </description> <homepage>http://www.xoe.org/packages/libmp3-native</homepage> <maintainer> <name>Sam Clegg</name> <email>samc@transvirtual.com</email> </maintainer> <copyright> <year>2001</year> <holder>Transvirtual Technologies Inc.</holder> <email>info@transvirtual.com</email> </copyright> <licence type="open" common="GPL" /> </info> <requires> <dep name="libmad-native" predepends="true" ns='http://www.xoe.org/installer/base/package' /> </requires> </package>
Notice that the package description contains four parts: <info/>, <provides/>, <requires/>, and <conflicts/>. In addition there are several attributes that go directly on the top-level <package/> element.
The package tag has two mandatory attributes, and one optional attribute.
name (mandatory)
version (mandatory)
task (optional)
If task is set to true, the package will be shown in 'basic' queries. The default is false.
The info section contains information meant to be read by the user. Types of information include:
<name /> This is a "friendly name" that may contain spaces and other characters not allowed in the name included on the package tag.
<description /> This is a long description that will be displayed when the user views a specific package.
<summary /> This is a short description that will be displayed in listings of multiple packages.
<keywords /> A whitespace separated list of searchable keywords.
<copyright /> Information about the copyright holders of any intellectual property contained in the package.
<license /> Information about the license under which the package is distributed.
...
This section can contain multiple 'dep' elements. Each element specifies a dependency on another package. The dep element has two mandatory attributes and one optional attribute. Depending on the type of dependency there may be more optional attributes and optional child elements.
(mandatory)
The ns specifies the type of dependency. Dependency types include Package Dependencies (a named package, with an optional range of versions) and Service Dependencies (a service supplying some functionality). Custom dependency types may be implemented by custom package installers but your package must depend (directly or indirectly) on the package supplying the custom installer.
(mandatory)
The name has a different meaning depending on the type of dependency.
(optional)
If set to 'true', the dependency is a predependency. If package A predepends on package B, package B must be _completely_ installed before package A is installed. Otherwise, the order of installation is arbitrary (package A might be installed first, but the operation will not complete until package B is installed). The default is 'false'.
At build time, each dependency will be expanded by the appropriate Installer module. This includes creating an XPath representation of the dependency. The XPath will match any package description containing the appropriate proviso.
...