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(C)). 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(F) 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(ADM) 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(F) file before executing pkgmk(C). 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(F) manual page.
This file is required and must be created before you execute pkgmk(C). 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(F) manual page. You can also use the pkgproto(C) command to generate a prototype file.
pkgmk(C) automatically distributes packages over multiple volumes. You must decide if you want to leave those calculations up to pkgmk(C) or customize package placement on multiple volumes.
Create the package using the pkgmk(C) 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(C) after creating a package with pkgmk(C). This step is optional.