To set up selective installation, you must:
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.
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.
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.
The request script for this package asks two questions:
When the answer is yes, then the appropriate class name is added to the CLASSES parameter. For example, when the question ``Should the manual pages associated with this package be installed'' is answered yes, the class man is added to the CLASSES parameter.
The appropriate variable is given the value of the response to this question. In the manual page example, the variable $NCMPMAN is set to this value.
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.