It is easier to create information files and installation scripts before you create a prototype file. However, this order is not required. You can always edit the prototype file after changing your package contents. For more information on information files and installation scripts, see Chapter 3, Enhancing the Functionality of a Package (Tasks).
Determine which package objects will be absolute and which package objects will be relocatable, if not done already.
For information that will help you complete this step, see The path Field.
Organize your package's objects to mimic their location on the target system.
If you already organized your packages as described in Organizing a Package's Contents, note that you might need to make some changes based on your decisions in Step 1. If you have not organized your package yet, you should do so now. If you do not organize your package, you cannot use the pkgproto command to create a basic prototype file.
If your package has collectively relocatable objects, edit the pkginfo file to set the BASEDIR parameter to the appropriate value.
For information on collectively relocatable objects, see Collectively Relocatable Objects.
If your package has individually relocatable objects, create a request script to prompt the installer for the appropriate path name. Alternatively, create a checkinstall script to determine the appropriate path from file system data.
The following list gives page numbers for your reference regarding common tasks:
Change the owner and group on all of your package components to be the intended owner and group on the target systems.
Use the chown -R and the chgrp -R commands on your package directory and information files directory.
Execute the pkgproto command to create a basic prototype file.
The pkgproto command scans your directories to create a basic file. For example:
$ cd package-directory $ pkgproto ./package-directory > prototype
The prototype file can be located anywhere on your system. Keeping your information files and installation scripts in one place simplifies access and maintenance. For additional information on the pkgproto command, see the pkgproto(1) man page.
Edit the prototype file by using your favorite text editor, and add entries for files of type v, e, x, and i.
For information on the specific changes you might need to make, see Fine-Tuning a prototype File Created With the pkgproto Command.
(Optional) If you are using multiple classes, edit the prototype and pkginfo files. Use your favorite text editor to make the necessary changes, and create corresponding class action scripts.
For information on the specific changes you might need to make, see Fine-Tuning a prototype File Created With the pkgproto Command and Writing Class Action Scripts.
Edit the prototype file by using your favorite text editor to redefine path names and change other field settings.
For more information, see Fine-Tuning a prototype File Created With the pkgproto Command.
(Optional) Edit the prototype file by using your favorite text editor to add functionality to your prototype file.
For more information, see Adding Functionality to a prototype File.
Save your changes and quit the editor.
If you are ready for the next task, see How to Build a Package.