Packaging your software applications


To set up selective installation, you must:

  1. Define a class for each type of object which can be installed.

    In this case study, the three object types are the package executables, the manual pages, and the emacs executables. Each type has its own class: bin, man, and emacs, respectively. Notice in the example prototype file that all of the object files belong to one of these three classes.

  2. Initialize the CLASSES parameter in the pkginfo(F) file as null.

    Normally when you define a class, you want the CLASSES parameter to list all classes that will be installed. Otherwise, no objects in that class will be installed. For this example, the parameter is initially set to null. CLASSES will be given values by the request script based on the package pieces chosen by the installer. This way, CLASSES is set to only those object types that the installer wants installed. For an example, see the sample pkginfo file associated with this package. Notice that the CLASSES parameter is set to null.

  3. Define object pathnames in the prototype(F) file with variables.

    These variables will be set by the request script to the value which the installer provides. pkgadd(ADM) resolves these variables at installation time and so knows where to install the package.

    The three variables used in this example are:

    Look at the example prototype file to see how to define the object pathnames with variables.

  4. Create a request script to ask the installer which parts of the package should be installed and where they should be placed.

    The request script for this package asks two questions:

    These two questions are repeated for each of the three object types.

    At the end of the request script, the parameters are made available to the installation environment for pkgadd(ADM) and any other packaging scripts. In the case of this example, no other scripts are provided.

    When looking at the request script for this example, notice that the questions are generated by the data validation tools ckyorn and ckpath.

Next topic: pkginfo file
Previous topic: Techniques

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