Specifying a Package Architecture (ARCH)
The ARCH parameter in the pkginfo file identifies which architectures are associated with the package. The architecture name has a maximum length of 16 alphanumeric characters. If a package is associated with more than one architecture, specify them in a comma-separated list.
For example, a package architecture specification in a pkginfo file might be:
Specifying a Package Instruction Set Architecture (SUNW_ISA)
The SUNW_ISA parameter in the pkginfo file identifies which instruction set architecture is associated with a Sun Microsystems package. The values are:
sparcv9, for a package containing 64-bit objects
sparc, for a package containing 32-bit objects
For example, the SUNW_ISA value in a pkginfo file for a package containing 64-bit objects would be:
If SUNW_ISA is not set, the default instruction set architecture of the package is set to the value of the ARCH parameter.
Specifying a Package Version (VERSION)
The VERSION parameter in the pkginfo file identifies the version of the package. The version has a maximum length of 256 ASCII characters, and cannot begin with a left parenthesis.
An example version specification in a pkginfo file might be:
Defining a Package Name (NAME)
A package name is the full name of the package, which is defined via the NAME parameter in the pkginfo file.
Because system administrators often use package names to determine whether or not a package needs to be installed, it is important to write clear, concise, and complete package names. Package names should:
State when a package is needed (for example, to provide certain commands or functionality, or state if it is needed for specific hardware).
State what the package is used for (for example, the development of device drivers).
Include a description of the package abbreviation mnemonic, using key words that indicate the abbreviation is a short form of the description (for example, the package name for the package abbreviation SUNWbnuu is "Basic Networking UUCP Utilities, (Usr)").
Name the partition into which the package is installed.
Use terms consistently with their industry meaning.
Take advantage of the 256 character limit.
An example package name defined in a pkginfo file might be:
NAME=Chip designers need CAD application software to design abc chips. Runs only on xyz hardware and is installed in the usr partition.
Defining a Package Category (CATEGORY)
The CATEGORY parameter in the pkginfo file specifies in which categories a package belongs. At a minimum, a package must belong to either the system or application category. Category names:
Have a maximum length of 16 characters.
Are case insensitive.
If a package belongs to more than one category, specify them in a comma-separated list.
An example CATEGORY specification in a pkginfo file might be:
How to Create a pkginfo File
Using your favorite text editor, create a file named pkginfo.
You can create this file anywhere on your system.
Edit the file and define the five required parameters.
The five required parameters are: PKG, ARCH, VERSION, NAME, and CATEGORY. For more information on these parameters, see "Creating a pkginfo File".
Add any other parameters that you like to the file.
Create your own parameters or see pkginfo(4) for information on the standard parameters.
Save your changes and quit the editor.
Where to Go Next
If you are ready to go to the next task, see "How to Organize A Package's Contents".
Example--Creating a pkginfo File
This example shows the contents of a valid pkginfo file, with the five required parameters defined, as well as the BASEDIR parameter. The BASEDIR parameter is discussed in more detail in "The path Field".
PKG=SUNWcadap NAME=Chip designers need CAD application software to design abc chips. Runs only on xyz hardware and is installed in the usr partition. ARCH=sparc VERSION=release 1.0 CATEGORY=system BASEDIR=/opt
Organizing a Package's Contents
Organize your package objects in a hierarchical directory structure that mimics how you want them to be on the target system after installation. If you do this step before you create a prototype file, you can save yourself some time and effort when creating that file.
How to Organize A Package's Contents
For help in completing this step, see "Things to Think About Before Building a Package".
For each package you need to build, make a directory.
You can create this directory anywhere on your system and name it anything you like. The examples in this chapter assume that a package directory has the same name as the package abbreviation.
$ cd /home/jane $ mkdir SUNWcadap
For each package, organize package objects into a directory structure beneath their corresponding package directory, which mimics how they will be located on the target system.
For example, the CAD application package, SUNWcadap, requires the following directory structure.
Decide where you will keep your information files and, if appropriate, make a directory to keep them in one location.
This example assumes that the example pkginfo file from "How to Create a pkginfo File" was created in Jane's home directory.
$ cd /home/jane $ mkdir InfoFiles $ mv pkginfo InfoFiles