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:
Create complete entries for objects with file types v (volatile files), e (editable files), x (exclusive directories), or i (information files or installation scripts)
Support multiple classes with a single invocation
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:
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:
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.
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.
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.
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.
There needs to be an entry for the pkginfo file.
The path fields need to be changed to the path1=path2 format because the package source is in /home/jane. Since the package source is a hierarchical directory, and the !search command does not search recursively, it might be easier to use the path1=path2 format.
The owner and group fields should contain the names of existing users and groups on the target system. That is, the owner jane will result in an error because this owner is not part of the SunOSTM operating system.
The modified prototype file looks like the following:
i pkginfo=/home/jane/InfoFiles/pkginfo d none SUNWcadap=/home/jane/SUNWcadap 0755 root sys d none SUNWcadap/demo=/home/jane/SUNWcadap/demo 0755 root bin f none SUNWcadap/demo/file1=/home/jane/SUNWcadap/demo/file1 0555 root bin d none SUNWcadap/srcfiles=/home/jane/SUNWcadap/srcfiles 0755 root bin f none SUNWcadap/srcfiles/file5=/home/jane/SUNWcadap/srcfiles/file5 0555 root bin f none SUNWcadap/srcfiles/file6=/home/jane/SUNWcadap/srcfiles/file6 0555 root bin d none SUNWcadap/lib=/home/jane/SUNWcadap/lib 0755 root bin f none SUNWcadap/lib/file2=/home/jane/SUNWcadap/lib/file2 0644 root bin d none SUNWcadap/man=/home/jane/SUNWcadap/man 0755 bin bin f none SUNWcadap/man/windex=/home/jane/SUNWcadap/man/windex 0644 root other d none SUNWcadap/man/man1=/home/jane/SUNWcadap/man/man1 0755 bin bin f none SUNWcadap/man/man1/file4.1=/home/jane/SUNWcadap/man/man1/file4.1 0444 bin bin f none SUNWcadap/man/man1/file3.1=/home/jane/SUNWcadap/man/man1/file3.1 0444 bin bin