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

Approach

To create a database file at the time of installation and save a copy on removal, you must:

  1. Create three classes.

    This package requires three classes:

  2. Make the package collectively relocatable.

    Notice in the sample prototype(F) file that none of the pathnames begin with a slash or a variable. This indicates that they are collectively relocatable.

  3. Calculate the amount of space the database file will require and create a space(F) file to deliver with the package. This file notifies pkgadd(ADM) that this package requires extra space and how much extra space. For an example, see the sample space file for this package.

  4. Create an installation class action script for the admin class.

    The sample script initializes a database using the data files belonging to the admin class. To perform this task, it:

    No special action is required for the admin class at removal time so no removal class action script is created. This means that all files and directories in the admin class will simply be removed from the system.

  5. Create a removal class action script for the cfgdata class.

    The sample removal script makes a copy of the database file before it is deleted during package removal. No special action is required for this class at installation time, so no installation class action script is needed.

    Remember that the input to a removal script is a list of pathnames to remove. Pathnames always appear in lexical order with the directories appearing first. This script captures directory names so that they can be acted upon later and copies any files to a directory named /tmp. When all of the pathnames have been processed, the script then goes back and removes all directories and files associated with the cfgdata class.

    The outcome of this removal script is to copy config.data to /tmp and then remove the config.data file and the data directory.


Next topic: pkginfo file
Previous topic: Techniques

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