The components of a package fall into two categories: package objects, the application files to be installed, and control files, which control how, where, and if the package is installed.
To build a package, you must provide the following:
Package objects (the application software files)
Optional information files and installation scripts
The figure below describes the contents of a package.
These are the components that make up the application. They can be:
Files (executable or data)
The pkginfo file
The pkginfo file is a required package information file defining parameter values such as the package abbreviation, the full package name, and the package architecture. For more information, see Creating a pkginfo File and the pkginfo(4) man page.
There are two pkginfo(1) man pages. The first is a section 1 command, which displays information about installed packages. The second is a section 4 file, which describes the characteristics of a package. When accessing the man pages, be sure to specify from which section you want the man page. For example: man -s 4 pkginfo
The prototype file
In the prototype file, there is one entry for each package object, information file, and installation script. An entry consists of several fields of information describing the object. For more information, see Creating a prototype File and the prototype(4) man page.
There are four optional package information files you can include in your package:
Defines previous versions of the package that are compatible with this version.
Indicates other packages with which this package has special relationships.
Defines disk space requirements for the target environment, beyond what is needed by the objects defined in the prototype file. For example, additional space might be needed for files that are dynamically created at installation time.
Defines the text for a copyright message displayed at the time of package installation.
Each package information file should have an entry in the prototype file. See Creating Information Files for more information on creating these files.
Installation scripts are not required. However, you can provide scripts that perform customized actions during the installation of your package. An installation script has the following characteristics.
It is composed of Bourne shell commands.
Its file permissions should be set to 0644.
It does not need to contain the shell identifier (#! /bin/sh).
The request script
The checkinstall script
The checkinstall script is only available with the SolarisTM 2.5 and compatible releases.
Procedure scripts define actions that occur at particular points during package installation and removal. There are four procedure scripts you can create with these predefined names: preinstall, postinstall, preremove, and postremove.
Class Action scripts
Class Action scripts define a set of actions to be performed on a group of objects.
See Creating Installation Scripts for a more information on installation scripts.