DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Packaging your software applications

prototype

This required package information file, prototype(F), contains a list of the package contents. The pkgmk(C) command uses this file to identify the contents of a package and its location on the development machine when building the package.

You can create this file in two ways. As with all the package information files, you can use an editor to create a file named prototype. It should contain entries following the description given below. You can also use the pkgproto(C) command to generate the file automatically. To use the second method, you must have a copy of your package on your development machine that is structured exactly as you want it structured on the installation machine and all modes and permissions must be correct. If you are not going to use pkgproto, you do not need a structured copy of your package.

The two types of entries in the prototype file are description lines and command lines.

The description lines

For each deliverable object, you must create one description line that consists of several fields describing the object. This entry describes such information as mode, owner, and group for the object. You can also use this entry to accomplish the following tasks:

The generic format of the descriptive line is:

   [ part ] ftype class pathname [ major minor ] [ mode owner group ]
Definitions for each field are as follows:

part
Designates the part in which an object should be placed. A package can be divided into a number of parts. A part is a collection of files and is the atomic unit by which a package is processed. A developer can choose the criteria for grouping files into a part (for example, by class). If not defined, pkgmk(C) decides in which part the object will be placed.

ftype
Designates the file type of an object. Example file types are f (a standard executable or data file), d (a directory), l (a linked file), and i (a package information file). (Refer to the prototype(F) manual page for a complete list of file types.)

class
Defines the class to which an object belongs. All objects must belong to a class. If the object belongs to no special class, this field should be defined as none.

pathname
Defines the pathname which an object should have on the installation machine. If you do not begin this name with a slash, the object is considered to be relocatable. You can use the form path1=path2 to map the location of an object on your development machine to the pathname it should have when installed on an installation machine.

When a package is stored on an installation medium with an s5 filesystem, each member of the pathname is truncated to 14 characters. When the package is installed on the installation machine with a filesystem that supports longer file names, such as sfs or ufs filesystems, the files are restored with their original pathname length. However, on the s5 filesystem, the pathnames remain truncated.


major/minor
Defines the major and minor numbers for a block or character special device.

mode/owner/group
Defines the mode, owner, and group for an object. The mode, owner, and group must be defined or packaging will fail. If not defined, the defaults defined with the default command are assigned.

Here is an example of this file with only description lines:

   i pkginfo
   i request
   d bin /ncmpbin 0755 root other
   f bin /ncmpbin/dired=/usr/ncmp/bin/dired 0755 root other
   f bin /ncmpbin/less=/usr/ncmp/bin/less 0755 root other
   f bin /ncmpbin/ttype=/usr/ncmp/bin/ttype 0755 root other

The command lines

The four types of commands that can be embedded in the prototype(F) file are:


search pathnames
Specifies a list of directories (separated by white space) in which pkgmk(C) should search when looking for package objects. pathnames is prepended to the basename of each object in the prototype file until the object is located.


NOTE: The search command will not work when invoking pkgmk with the -c option specified to compress all noninformation package files.


include filename
Specifies the pathname of another prototype file that should be merged into this one during processing. (Note that search requests do not span include files. Each prototype file should have its own search command defined, if one is needed.)

default mode owner group
Defines the default mode owner group that should be used if this information is not supplied in a prototype entry that requires the information. (The defaults do not apply to entries in any include files. Each prototype file should have its own default command defined, if one is needed.)

param=value
Places the indicated parameter in the packaging environment. This allows you to expand a variable pathname so that pkgmk can locate the object without changing the actual object pathname. (This assignment will not be available in the installation environment.)
A command line must always begin with an exclamation point (``!''). Commands can have variable substitutions embedded within them.

Here is an example prototype file with both description and command lines:

   !PROJDIR=/usr/myname
   !search /usr/myname/bin /usr/myname/src /usr/myname/hdrs
   !include $PROJDIR/src/prototype
   i pkginfo
   i request
   d bin ncmpbin 0755 root other
   f bin ncmpbin/dired=/usr/ncmp/bin/dired 0755 root other
   f bin ncmpbin/less=/usr/ncmp/bin/less 0755 root other
   f bin ncmpbin/ttype=/usr/ncmp/bin/ttype 0755 root other
   !default 755 root bin

Next topic: compver
Previous topic: -1

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005