
The psconfig system allows the user to build and install the IPP
software suite into a location which is flexibly defined by the user.
The tools here also set up the user's environment variables (PATH,
PERL5LIB, LIBRARY_PATH, etc) to make use of the installed software.
With the psconfig tools, it is easy to switch between different
installed versions or to recompile subsets of the IPP tree.

0. Choose a target installation directory.

Choose a location to store the installed software and configuration
files.  The psconfig system places the installed binary files by
default in directories below ~/psconfig.  There will be one directory
for each version of the installation for a given hardware
architecture.  To use a different location, place the following line
in ~/.psconfigrc (otherwise, this is not needed):

set PSCONFDIR = INSTALL_PATH

where INSTALL_PATH is the top-level directory for all binary
installations. 

1. Set up the psconfig system.

If you have not previously installed the IPP suite, and do not the
psconfig scripts installed, you need to generate the scripts for your
install directory.  Run the following command in this directory
(ipp/psconfig):

psbuild -bootstrap INSTALL_PATH

where INSTALL_PATH is the top-level directory for all binary
installations.  Then, follow the instructions supplied by that
command:

** if you use csh, tcsh or equivalent as your shell, add the following to your .cshrc
    if (-e /home/kiawe/eugene/psconfig/psconfig.csh) then
      alias  psconfig        "source /home/kiawe/eugene/psconfig/psconfig.csh"
    else
      alias  psconfig        "echo psconfig not available"
    endif
    psconfig default

** if you use sh, bash or equivalent as your shell, add the following to your .bashrc
    if [ -f /home/kiawe/eugene/psconfig/psconfig.csh ]; then
      alias psconfig='source /home/kiawe/eugene/psconfig/psconfig.bash'
    else
      alias psconfig='echo psconfig not available'
    fi
    psconfig default

Though, in your case, "/home/kiawe/eugene/psconfig/" will be replaced
by the value of INSTALL_PATH.  After you have set up this alias, you
will need to source the .cshrc / .bashrc, or open a new shell, to have
these aliases available.

2. Using psconfig to set / examine your install system:

Before running or compiling the IPP, it is necessary to use psconfig
to set the installation version:

psconfig (version)

This command sets aliases and environment variables for the current
shell to point at the IPP installation labeled with the given version
name and hardware architecture.  For example:

psconfig default

will set the PATH to include ~/psconfig/default.linux/bin on a 32-bit
linux system, and the other paths to point at the corresponding
installation directories.

3. Dependencies

NOTE: It is possible to use the tools discussed below to manually check on the
external dependencies.  However, the psbuild system now allows you to
build the full suite including dependencies in a single pass.  To use
this method, skip to section 5.

3.1. External C libraries

The program 'pschecklibs' in this directory will check for required
system libraries and headers.  It examines the system libraries,
libraries defined by LD_LIBRARY_PATH, and the installation library
defined by psconfig.  Any missing dependencies will be listed.
Tarballs for these libraries may be found on the Pan-STARRS web site
at:

http://pan-starrs.ifa.hawaii.edu/project/IPP/software/extlibs-2.5.tgz
http://pan-starrs.ifa.hawaii.edu/project/IPP/software/extperl-2.5.tgz

These should be installed so they will be available in the user's
path.  The psconfig commands can be used to install these libraries in
the psconfig location:

'psautogen' replaces autogen.sh
'psconfigure' replaces configure

3.2 External Perl Modules

The program 'pscheckperl' in this directory will check for required
Perl modules, and can be used to install them in the appropriate user
location in the psconfig system.  The command defaults to the latest
perl installation table (eg, tagsets/ipp-2.5.perl).

pscheckperl

will test for the perl modules specified for the latest ipp release.
if any modules are missing, they can be download from the Pan-STARRS
web site:

http://pan-starrs.ifa.hawaii.edu/project/IPP/software/extperl

The tarballs should be placed in a directory extperl parallel to the
ipp directory (two levels up from this directory).  If the tarballs
are in the correct location, they can be built by supplying the -build
flag to pscheckperl:

pscheckperl -build

4. Building

To build the full IPP tree using the psconfig system, run 'psbuild' in
this directory:

psbuild

For additional information on using psbuild, see the listing of
options below (or type psbuild -help)

5. Single-Pass Build with External Dependencies

If you have not already done so, download the tarball with the
external libraries and perl modules from:

http://pan-starrs.ifa.hawaii.edu/project/IPP/software/extlibs-2.5.tgz
http://pan-starrs.ifa.hawaii.edu/project/IPP/software/extperl-2.5.tgz

It should be possible to build the full IPP installation by issuing
the single command in this directory (ipp/psconfig):

psbuild -extbuild

------

More options for psbuild:

USAGE: psbuild [options] (distribution)
     : -version (version) : specify alternate psconfig installation version
     : -verbose           : give additional information
     : -extlibs (tarball) : specify the location of the extlibs tarball
     : -extperl (tarball) : specify the location of the extlibs tarball
     : -extcheck          : check (but do not build) the external dependencies
     : -extbuild          : check and build (if needed) the external dependencies
     : -clean             : clean the source directories before building
     : -rebuild           : run 'configure (and autogen for developer)' (C code)
     : -optimize          : set flags for optimized code
     : -only (module)     : only build the specified module
     : -start (module)    : begin build at specified module
     : -stop (module)     : stop build after specified module

     : -dev               : build modules not distributed in tarball

     : psbuild -bootstrap : generate the psconfig scripts
     : psbuild -list      : list the available distributions
     : psbuild -h         : this help listing
     : psbuild -help      : this help listing
     : psbuild --help     : this help listing

Summary of psconfig operations:

psdist -tag        : tag CVS tree
psdist -dist       : build tarball from tagged tree
psdist -dist -head : build tarball from head
psbuild            : build and install software in tree
pschecklibs        : check for needed external software
pscheckperl        : check for needed perl modules
pscheckperl -build : build and install external modules

