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

Creating the file using pkgproto

The pkgproto(C) command scans your directories and generates a prototype(F) file. pkgproto cannot assign ftypes of v (volatile files), e (editable files), or x (exclusive directories). You can edit the prototype file and add these ftypes, as well as perform any other fine-tuning you require (for example, adding command lines or classes).

pkgproto(C) writes its output to the standard output. To create a file, redirect the output to a file. The examples shown in this section do not perform redirection to show you what the contents of the file would like.

Creating a basic prototype

The standard format of pkgproto(C) is:

   pkgproto path [ . . . ]
where path is the name of one or more paths to be included in the prototype(F) file. If path is a directory, entries are created for the contents of that directory as well (everything below that directory).

With this form of the command, all objects are placed into the none class and are assigned the same mode owner group as exists on your machine. The following example shows pkgproto being executed to create a file for all objects in the directory /home/pkg:

   $ pkgproto /home/pkg
   d none /home/pkg 755 bin bin
   f none /home/pkg/file1 755 bin bin
   f none /home/pkg/file2 755 bin bin
   f none /home/pkg/file3 755 bin bin
   f none /home/pkg/file4 755 bin bin
   f none /home/pkg/file5 755 bin bin
   $
To create a prototype file that contains the output of the example above, you would execute pkgproto /home/pkg > prototype.


NOTE: If no pathnames are supplied when executing pkgproto standard input (stdin) is assumed to be a list of paths. Refer to the pkgproto(C) manual page for details on this usage.

Assigning objects to a class

You can use the -c class option of pkgproto(C) to assign objects to a class other than none. When using this option, you can only name one class. To define multiple classes in a prototype(F) file created by pkgproto, you must edit the file after its creation.

The following example is the same as above except the objects have been assigned to class1:

   $ pkgproto -c class1 /home/pkg
   d class1 /home/pkg 755 bin bin
   f class1 /home/pkg/file1 755 bin bin
   f class1 /home/pkg/file2 755 bin bin
   f class1 /home/pkg/file3 755 bin bin
   f class1 /home/pkg/file4 755 bin bin
   f class1 /home/pkg/file5 755 bin bin
   $

Renaming pathnames with pkgproto

Use a path1=path2 format on the pkgproto(C) command line to give an object a different pathname in the prototype(F) file than it has on your machine. You can, for example, use this format to define relocatable objects in a prototype file created by pkgproto.

The following example is like the others shown in this section, except that the objects are now defined as bin (instead of /usr/bin) and are thus relocatable:

   $ pkgproto -c class1 /home/pkg=bin
   d class1 bin 755 bin bin
   f class1 bin/file1 755 bin bin
   f class1 bin/file2 755 bin bin
   f class1 bin/file3 755 bin bin
   f class1 bin/file4 755 bin bin
   f class1 bin/file5 755 bin bin
   $

pkgproto and links

pkgproto(C) detects linked files and creates entries for them in the prototype(F) file. If multiple files are linked together, it considers the first path encountered the source of the link.

If you have symbolic links established on your machine, but want to generate an entry for that file with an ftype of f (file), use the -i option of pkgproto(C). This option creates a file entry for all symbolic links.


Next topic: 10. Distributing packages over multiple volumes
Previous topic: Using the command lines

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