1. How to install this setld kit:

   setld -l rgs650/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: 
rgs650/data  with kit description files
rgs650/kit   with distribution media
You need also rgs650/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): 650
names for the subsets: RGS<some_uppercase_name>650
There has to be at least one base subset (here RGSBAS650) with code 0 
optional subsets have code 2 (see RGS650.k) 

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

Filenames are stored in the master inventory file RGS650.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 rgs650/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/RGS650 and copy my files into rgs650/src/usr/opt/RGS650 .
This process is done by the makesrc.sh script. It modifies also some
pathnames and copies shared libraries form thei build system.

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

  newinv ../src

You are prompted to edit various lines of the inventory file and to convert 
them into valid form (see above). 

Finally you build the kit with 

  kits RGS650.k ../src ../kit
  
The only files you have to tar and distribute are under the rgs650/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 RGS650.mi ../src updates files in the master inventory file
   (new packages need to be added to RGS650.k in parallel)
4. ./makescps.sh prepares the subset control programs (needs an uptodate
    key file RGS650.k)
5. kits RGS650.k ../src ../kit does the final packaging
6. tar und distribute rgs650/kit

......................................................................
| Albrecht Gebhardt          Tel.: (++43 463) 2700/837               |
| 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                                         |
`--------------------------------------------------------------------'

