Application Packaging Developer's Guide

Fine-Tuning a prototype File Created With the pkgproto Command

Although the pkgproto command is useful in creating an initial prototype file, it does not create entries for every package object that needs to be defined. This command does not make complete entries. The pkgproto command does not do any of the following:

Creating Object Entries With File Types v, e, x, and i

At the very least, you need to modify the prototype file to add objects with file type i. If you stored your information files and installation scripts in the first level of your package directory (for example, /home/jane/SUNWcadap/pkginfo), then an entry in the prototype file would look like the following:


i pkginfo

If you did not store your information files and installation scripts in the first level of your package directory, then you need to specify their source location. For example:


i pkginfo=/home/jane/InfoFiles/pkginfo

Or, you can use the !search command to specify the location for the pkgmk command to look when building the package. See Providing a Search Path for the pkgmk Command for more information.

To add entries for objects with file types v, e, and x, follow the format described in Format of the prototype File, or refer to the prototype(4) man page.


Note –

Remember to always assign a class to files with a file type of e (editable) and have an associated class action script for that class. Otherwise, the files will be removed during package removal, even if the path name is shared with other packages.


Using Multiple Class Definitions

If you use the pkgproto command to create your basic prototype file, you can assign all the package objects to the none class or to one, specific class. As shown in Example—Creating a prototype File With the pkgproto Command, the basic pkgproto command assigns all objects to the none class. To assign all objects to a specific class, you can use the -c option. For example:


$ pkgproto -c classname /home/jane/SUNWcadap > /home/jane/InfoFiles/prototype

If you use multiple classes, you might need to manually edit the prototype file and modify the class field for each object. If you use classes, you also need to define the CLASSES parameter in the pkginfo file and write class action scripts. Using classes is an optional feature and is discussed in detail in Writing Class Action Scripts.

Example—Fine-Tuning a prototype File Created Using the pkgproto Command

Given the prototype file created by the pkgproto command in Example—Creating a prototype File With the pkgproto Command, several modifications need to be made.