The prototype file is a list of package contents and is a required package component.
You can create the prototype file by using any editor and following the format described in the section ``prototype'' and in the prototype(F) manual page. You can also use the pkgproto(C) command to create one automatically. While creating the prototype file, you must at the very least supply the following three pieces of information about an object:
All of the possible object types are defined in the prototype(F) manual page. f (for a data file), l (for a linked file), and d (for a directory) are examples of object types.
All objects must be assigned a class. If no special handling is required, you can assign the class none.
The pathname can define a fixed pathname such as /mypkg/src/filename, a collectively relocatable pathname such as src/filename, and an individually relocatable pathname such as $BIN/filename or /opt/$PKGINST/filename.
To define links, you must do the following in the prototype entry for the linked object:
If your development area is in a different structure than you want the package to be in on the installation machine, use the prototype entry to map one pathname to the other. You use the path1=path2 format for the pathname as is used to define links. However, because the ftype is not defined as l or s, path1 is interpreted as the pathname you want the object to have on the installation machine, and path2 is interpreted as the pathname the object has on your development machine.
For example, your project might require a development structure that includes a project root directory and numerous src directories. However, on the installation machine you might want all files to go under a package root directory and for all src files to be in one directory. So, a file on your machine might be named /projdir/srcA/filename. If you want that file to be named /pkgroot/src/filename on the installation machine, your prototype entry for this file might look like this:
f class1 /pkgroot/src/filename=/projdir/srcA/filename
You can use the prototype(F) file to define objects that are not actually delivered on the installation medium. pkgadd(ADM) creates objects with the following ftypes if they do not already exist at the time of installation:
For example, if you want a directory created on the installation machine, but do not want to deliver it on the installation medium, an entry for the directory in the prototype file is sufficient. An entry such as the one shown below causes the directory to be created on the installation machine, even if it does not exist on the installation medium.
d none /directoryA 644 root other
The four types of commands that you can put into your prototype(F) file allow you to: