|
|
What steps you take to create a package depend on how customized your package will be; therefore, it is difficult to give you a step-by-step guide on how to proceed. Your first step should be to plan your packaging. For example, you must decide on which package information files and scripts your package needs.
The following list outlines some of the steps you might use in a packaging scenario. Not all of these steps are required and there exists no mandated order for their execution (although you must have all of your package objects together before executing pkgmk(1)). The remainder of this topic gives procedural information for each step.
Every package installed in the UNIX System V Release 4 environment must have a package abbreviation.
You must decide on values for the three package parameters that will make each package instance unique.
You must decide on what installation classes you are going to use before you can create the prototype(4) file and also before you can write your class action scripts.
Package objects can be delivered with either fixed locations, meaning that their location is defined by the package and cannot be changed, or with relocatable locations, meaning that they have no absolute location requirements. All of a package or parts of a package can be defined as relocatable. Decide if package objects will have fixed locations or be relocatable before you write any installation scripts and before you create the prototype file.
You must assess the needs of your package beyond the actions provided by pkgadd(1M) and decide on which type of installation scripts allow you to deliver your customized actions.
You must decide if your package has dependencies on other packages and if any other packages depend on yours.
You must decide if your package requires a copyright message to appear as it is being installed (and removed) and, if so, you must write that message.
You must create a pkginfo(4) file before executing pkgmk(1). It defines basic information concerning the package and can be created with any editor as long as it follows the format described earlier. The format is also described on the pkginfo(4) manual page.
This file is required and must be created before you execute pkgmk(1). It lists all of the objects that belong to a package and information about each object (such as its file type and to which class it belongs). You can create it using any editor and you must follow the format described earlier. The format is also described on the prototype(4) manual page. You can also use the pkgproto(1) command to generate a prototype file.
pkgmk(1) automatically distributes packages over multiple volumes. You must decide if you want to leave those calculations up to pkgmk(1) or customize package placement on multiple volumes.
Create the package using the pkgmk(1) command, which copies objects from the development machine to the installation medium, puts them into the proper structure, and automatically spans them across multiple volumes, if necessary.
If you want to create a datastream structure for your package, you must execute pkgtrans(1) after creating a package with pkgmk(1). This step is optional.