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

4. Making package objects relocatable

Package objects can be delivered either with fixed locations (their location on the installation machine is defined by the package and cannot be changed) or as relocatable (they have no absolute location requirements on the installation machine). The location for relocatable package objects is determined during the installation process.

You can define two types of relocatable objects: collectively relocatable and individually relocatable. All collectively relocatable objects are placed relative to the same directory once the relocatable root directory is established. Individually relocatable objects are not restricted to the same directory location as collectively relocatable objects.

Defining collectively relocatable objects

Follow these steps to define package objects as collectively relocatable:

  1. Define a value for the BASEDIR parameter.

    Put a definition for the BASEDIR parameter in your pkginfo(F) file. This parameter names a directory where relocatable objects will be placed by default. If you supply no value for BASEDIR, no package objects are considered as collectively relocatable.

  2. Define objects as collectively relocatable in the prototype(F) file.

    An object is defined as collectively relocatable by using a relative pathname in its entry in the prototype file. A relative pathname does not begin with a slash. For example, src/myfile is a relative pathname, while /src/myfile is a fixed pathname.


    NOTE: A package can deliver some objects with relocatable locations and others with fixed locations.

All objects defined as collectively relocatable are put under the same root directory on the installation machine. The root directory value will be one of the following (and in this order):

Defining individually relocatable objects

A package object is defined as individually relocatable by using a variable in its pathname definition in the prototype(F) file. Your request script must query the installer on where such an object should be placed and assign the response value to the variable. pkgadd(ADM) expands the pathname based on the output of your request script at the time of installation. Case study 1 shows an example of the use of variable pathnames and the request script needed to solicit a value for the base directory.


Next topic: 5. Writing your installation scripts
Previous topic: 3. Placing objects into classes

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005