1. How to install this setld kit:

   setld -l rgs901/kit


DON'T READ BELOW, if you ONLY want TO INSTALL the setld kit


2. How to build this setld kit (a very short description!):

First read man pages for setld, kits and newinv and (if installed)
the "Guide to Preparing Product Kits" in your DOCLIB path.
(I have it at http://localhost/doclib/online/DOCS/HTML/AQYW7BTE/TITLE.HTM)

You already have the directories: 
rgs901/data  with kit description files
rgs901/kit   with distribution media
You need also rgs901/src to hold your modified binaries.

There are some names to create:
the PRODUCT key (3 upcase letters): RGS (stands for "R - Gnu S")
the PRODUCT vesion (3 numbers): 901 (stands for 0.90.0)
names for the subsets: RGS<some_uppercase_name>901
There has to be at least one base subset (here RGSBAS901) with code 0 
optional subsets have code 2 (see RGS901.k) 

Package and subpackage ("subsets") names and description go into the 
key file RGS901.k  
The line format is
<subsetname>  .  <code> 'Description'

I had to shorten the Descriptions, sometimes resulting in incomplete
description of some libraries.

Filenames are stored in the master inventory file RGS901.mi
The lines have the format:
bits    ./<pathname>/[<filename>]    <subsetname> (or RESERVED for system
                                                   directories like ./usr )
bits: 0 -- a fixed file
      2 -- a file that can be changed during installation (in a postinstall
           script)
      4 -- files that shoud be linked into the /usr hierarchy (see below 
           for subset control programs)
	   
Install scripts (scps = subset control programs) have a special format (see
example.scp attached below) and are stored under the scps/ directory with 
the names <subsetname>.scp

After compling and installing the programs you have to copy it into a temporary
place, rebuilding the original directory structure. I use rgs901/src.

The best idea is to place files finally under a 

  /usr/opt/<product code><version> 

tree with bin/ lib/ and man/ subdirs, then the scp will create links into
/usr/bin and so on if the flag for these files is set to 4 (see above). 
I use /usr/opt/RGS901 and copy my files into rgs901/src/usr/opt/RGS901 .
This process is done by the makesrc.sh script. It modifies also some
pathnames and copies shared libraries form the build system.

To update the master inventory file call "newinv" from rgs901/data as 

  newinv ../src

You are prompted to edit various lines of the inventory file and to convert 
them into valid form (see above). This is the crucial task, especially if
many files or packages are added or removed.

Finally you build the kit with 

  kits RGS901.k ../src ../kit
  
The only files you have to tar and distribute are under the rgs901/kit 
directory (no compression needed, these are already tar.Z files.)

I have little script (makespcs.sh) which creates tth scp files under scps/
All R libraries have the same scp.

Now the example subset control program from the 
"Guide to Preparing Product Kits"
### example.scp #### snip ###########
#!/sbin/sh
#
# Subset Control Program for OATODB??? subset

# INCLUDE SCP LIBRARY FUNCTIONS

[ `/bin/machine` = alpha ] &&
    . /usr/share/lib/shell/libscp

# BEGIN EXECUTION HERE

case $ACT in

M)
    case $1 in
    -l)
        # hardware platform check
        [ "`./bin/machine`" = alpha ] || exit 1
        ;;
    esac
    ;;

PRE_L)
    # dependency checking
    STL_ScpInit
    STL_DepInit

    STL_DepEval ${_PCODE}TOOLS??? ||
    {
        _OOPS="$_OOPS
    Orpheus Authoring Tools (${_PCODE}TOOLS)"
    }

    STL_DepEval ${_PCODE}BASE[2-9]?? ||
    {
        _OOPS="$_OOPS
    Orpheus Authoring Base Tools, Version 2.0 or later (${_PCODE}TOOLS)"
    }

    [ "$_OOPS ] &&
    {
        echo "
The $_DESC requires the existence of
the following uninstalled subset(s):
$_OOPS

Please install these subsets before retrying the installation.
" >&2
        exit 1
    }
    ;;
POST_L)
    # create symbolic links
    STL_ScpInit
    STL_LinkCreate

    # dependency locking
    STL_LockInit
    STL_DepLock $_SUB ${_PCODE}TOOLS??? ${_PCODE}BASE[2-9]?? and
    ;;
C)
    STL_ScpInit
    case $1 in
    INSTALL)
        echo "
Installation of the $_DESC ($_SUB)
subset is complete.

Before using the tools in this subset, please read the README.odb
file located in the /usr/lib/br directory for information on the
kit's contents and for release information.
"
        ;;
    esac
    ;;
PRE_D)
    # remove symbolic links
    STL_ScpInit
    STL_LinkRemove

    # dependency unlocking
    STL_LockInit
    STL_DepUnLock $_SUB ${_PCODE}TOOLS??? ${_PCODE}BASE[2-9]?? and
    ;;

ESAc

exit 0
          
####### end ######

That means a setld build consists of the steps:
 
1. rpm build and full rpm installation.
2. ./makesrc.sh makes a copy from the rpm installation
3. newinv RGS901.mi ../src updates files in the master inventory file
   (new packages need to be added to RGS901.k in parallel)
4. ./makescps.sh prepares the subset control programs (needs an uptodate
    key file RGS901.k)
5. kits RGS901.k ../src ../kit does the final packaging
6. tar und distribute rgs901/kit


......................................................................
| Albrecht Gebhardt          Tel.: (++43 463) 2700/832               |
| Institut fuer Mathematik   Fax : (++43 463) 2700/834               |
| Universitaet Klagenfurt    mailto:albrecht.gebhardt@uni-klu.ac.at  |
| Villacher Str. 161         http://www-stat.uni-klu.ac.at/~agebhard |
| A-9020 Klagenfurt, Austria                                         |
`--------------------------------------------------------------------'

