MidCOM component packaging
PEAR packages are used for installation of MidCOM components. To make installation as easy as possible, the packages are served through the pear.midcom-project.org PEAR channel.
While components can be installed without packaging, the PEAR package mechanism makes version control much easier. Here is how to package a component.
Package configuration
PEAR package definitions are handled through component manifests. The manifest keys that are relevant to packaging are:
name: The component name is used as the package's name with dots converted to underscores (e.g.net_nemein_calendar)version: Component's version is used as the package release version. It must correspond to the version numbering guidelines (e.g.1.0.0)state: The release status of the component (e.g.stable)package.xml: Array of PEAR packaging specific configurationssummary: Short package descriptiondescription: More verbose package descriptionmaintainers: Array of package maintainers with the Midgard website username as the key and array with person details as value:name: Full name of the maintaineremail: Email address of the maintainerrole: Role of the maintainer (e.g.lead)
dependencies: Array of package dependencies of the component with the package name as the key
Example package.xml contents
'package.xml' => Array(
'summary' => 'Weblog pinger service',
'description' => 'Tool that pings weblogs.com and other services when de.linkm.newsticker postings have been updated',
'maintainers' => Array(
'bergie' => Array(
'name' => 'Henri Bergius',
'email' => 'henri.bergius@iki.fi',
'role' => 'lead',
),
),
'dependencies' => Array(
'de.linkm.newsticker' => Array(),
'XML_RPC' => Array(
'channel' => 'pear.php.net',
),
),
),
Generating the package
The easiest way to generate a package is to use the phing command. Standing in the src/ directory of your MidCOM svn checkout, run the following:
$phing package -Dpackage=net.nehmer.blog
The result of running this command should be a PEAR package file (e.g. net_nehmer_blog-1.0.0.tgz) that can be installed with the pear install command.
Role_Mgdschema package installed.
Submitting packages to the channel
To make package installation easier you can upload them to the MidCOM PEAR channel. Contact Henri Bergius for access rights.
