Packaging your software applications

9. Creating the prototype file

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:

Creating links

To define links, you must do the following in the prototype entry for the linked object:

  1. Define its ftype as l (a link) or s (a symbolic link).

  2. Define its pathname with the format path1=path2 where path1 is the destination and path2 is the source file.

Mapping development pathnames to installation pathnames

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

Defining objects for pkgadd to create

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:

To request that one of these objects be created on the installation machine, add an entry for it in the prototype file using the appropriate ftype.

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

Using the command lines

The four types of commands that you can put into your prototype(F) file allow you to:

Next topic: Creating the file using pkgproto
Previous topic: 8. Creating the pkginfo file

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003