Application Packaging Developer's Guide

Example—Specifying Different Source Directories for Information Files and Package Objects

If you put package information files (such as pkginfo and prototype) and the package objects in two different directories, you can create your package by using the -b base-src-dir and -r rootpath options to the pkgmk command. If you have your package objects in a directory called /product/pkgbin and the other package information files in a directory called /product/pkgsrc, you could use the following command to place the package in the /var/spool/pkg directory:

$ pkgmk -b /product/pkgbin -r /product/pkgsrc -f /product/pkgsrc/prototype

Optionally, you could use this command to do the same:

$ cd /product/pkgsrc
$ pkgmk -o -b /product/pkgbin

In this example, the pkgmk command uses the current working directory to find the remaining parts of the package (like the prototype and pkginfo information files).