3 - Packaging Your Software with EPM

This chapter describes how to use EPM to package your own software packages.

The Basics

EPM reads one or more software "list" files that describe a single software package. Each list file contains one or more lines of ASCII text containing product or file information. Comments start with the # character, directives start with the % character, variable start with the $ character, and files, directories, and symlinks start with a letter.

Product Information

Every list file needs to define the product name, copyright, description, license, README file, vendor, and version:

The %license and %readme directives specify files for the license agreement and README files for the package, respectively.

The %product, %copyright, %vendor, and %description directives take text directly from the line.

The %version directive specifies the version numbers of the package. The first number is the human-readable version number, while the second number is the integer version number. If you omit the integer version number, EPM will calculate one for you.

Files, Directories, and Symlinks

Each file in the distribution is listed on a line starting with a letter. The format of all lines is:

Regular files use the letter f for the type field:

Configuration files use the letter c for the type field:

Directories use the letter d for the type field and use a source path of "-":

Finally, symbolic links use the letter l (lowercase L) for the type field:

The source field specifies the file to link to and can be a relative path.

Wildcards

Wildcard patterns can be used in the source field to include multiple files on a single line:

Building a Software Distribution

The epm(1) program is used to build software distributions from list files. To build a portable software distribution for an application called "foo", type the following command:

If your application uses a different base name than the list file, you can specify the list filename on the command-line as well:

EPM can also produce vendor-specific distributions using the -f option:

The format option can be one of the following keywords:

Everything in the software list file stays the same - you just use the -f option to select the format. For example, to build an RPM distribution of EPM, type:

The result will be an RPM distribution file instead of the portable distribution file.

Installing the Software Package

Once you have created the software distribution, you can install it. Portable distributions create an install script called product.install, where "product" is the name of the package:

After answering a few yes/no questions, the software will be installed. To bypass the questions, run the script with the now argument:

Including the Setup GUI

EPM also provides an optional graphical setup program. To include the setup program in your distributions, create a product logo image in XPM format and use the --setup-image option when creating your distribution: