Controlling the package build process

From IHRIS Wiki
Revision as of 16:07, 21 July 2009 by MarkAHershberger (talk | contribs) (start)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This page contains a brief overview of how to build Debian packages from the source for the iHRIS Suite. The package building scripts are bootstrapped when the I2CE package is built. The packaging scripts reside in modules/PackageUtils/.

One Module, One Package

There is a one-to-one correspondence between modules and debian packages. The package name corresponds to the name attribute of the I2CEConfiguration element in the XML file. An “i2ce-” prefix is given to each generated package to reduce the changes of naming conflicts. (The only exception to this is the I2CE package itself which is named simply “i2ce”.)

Package Building

The PackageUtils module (i2ce-package-utils) is set up so that it could be run from the root of a checkout of I2CE code (e.g. the results of =bzr co lp:i2ce= or =bzr co lp:ihris-manage=) and, from a single command, create packages for all modules in that source tree. Another aspect of the current design was to eliminate the need to maintain dozens of different configuration files that are all similar and duplicate information found in the XML configuration files.

For this reason, PackageUtils relies on a modules XML configuration for all of its information. This information is put into some templates (which are found in the =templates= subdirectory of the PackageUtils module) to produce a =debian/= directory that is used to build the entire package. Source packages are also produced during the build process. The source packages are needed so that Launchpad can build the packages using standard Debian tools.