This file describes the build procedure of the Nordugrid middleware
(ARC) from tarball or from source RPM.


Dependencies
============

Before trying to compile the NorduGrid Toolkit make sure you have installed
the following software packages:

    o GNU make, GNU autotools
    o C++ compiler and library
    o Grid Packaging Tools (GPT) (http://www.gridpackagingtools.org/)
    o pre-WS Globus Toolkit >= 2.4.x (http://www.globus.org/) 
  	- OpenLDAP
	- Cyrus SASL
	- Globus Replica Catalog
	- Globus RLS    
    o gSOAP (http://www.cs.fsu.edu/~engelen/soap.html)
     (gsoap version above 2.7.2 is required)
    o VOMS (http://datagrid.in2p3.fr/cgi-bin/cvsweb.cgi/) 
       (ARC can be built without VOMS)
    o MySQL client libraries
    o libxml2  version 2.4.x or later
    o python development libraries (optional for the python interface 
      for ARCLIB)

Note that NorduGrid provides packaged versions of GPT, Globus, gSOAP, VOMS 
and it is highly recommended to use the nordugrid packages if possible.
The rest of the dependencies are available in any standard Linux distributions.


Basic BUILD with autotools
==========================

The build is using the GNU autotools. This means that a standard installation
can be made with:

  ./configure
  make
  make install

The configure script accepts the usual options with the addition of (defaults in brackets):

  --disable-python-wrappers             Disable Python wrappers for ARCLIB
  --disable-pkgdirs                     Do not use pkg directories. Useful for /opt/nordugrid installation.
  --disable-voms                        Disable VOMS support
  --disable-lcas                        Disable LCAS support
  --disable-lcmaps                      Disable LCMAPS support
  --enable-experimental                 Enable experimental code
  --disable-gridssh                     Disable gridssh client and server
  --disable-rpath-hack                  Do not rpath external and internal libraries in libraries/binaries
  --enable-docs                         Build documentation

  --with-sysv-scripts-location=<PATH>   Location of the SYSV init scripts. [autodetect]
  --with-monitor-prefix=<PATH>          Specify the location of the Grid Monitor WWW scripts.
                                        [/var/www/html/gridmonitor]
  --with-monitor-local-prefix=<PATH>    Specify the relative location of the Grid Monitor WWW scripts
                                        [gridmonitor]
  --with-cron-scripts-prefix=<PATH>     Specify the location of the cron directory. [/etc/cron.d]
  --with-profile-scripts-prefix=<PATH>  Specify the location of the profile directory. [/etc/profile.d]
  --with-gsoap-location=<PATH>          Specify the gSOAP installation path. [autodetect]
  --with-mysql-location=<PATH>          Specify the MySQL installation path. [autodetect]
  --with-libxml-location=<PATH>         Specify the libxml2 installation path. [autodetect]
  --with-gacl-location=<PATH>           Specify the GACL installation path. [/opt/gridsite|autodetect]
  --with-default-globus-location=<PATH> Specify the default globus location. [/opt/globus]
  --with-globus-location=<PATH>         Specify the globus installation path. [/opt/globus]
  --with-gpt-location=<PATH>            Specify the gpt installation path. [/opt/gpt]
  --with-globus-makefile-header         Use globus-makefile-header to generate makefile stubs
  --with-flavor=<flavor>                Specify the globus build flavor. [autodetect]
  --with-voms-location=<PATH>           Specify the VOMS installation path. [/opt/voms]
  --with-lcas-location=<PATH>           Specify the LCAS installation path. [/opt/edg]
  --with-lcmaps-location=<PATH>         Specify the LCMAPS installation path. [/opt/edg]
  --with-qtdir=<PATH>                   Specify the QT installation path [autodetect]


Note that using --disable-pkgdirs will install the software without package
directories suitable for /opt/nordugrid installation:

   /opt/nordugrid/bin
   /opt/nordugrid/lib 
   /opt/nordugrid/libexec
   ..

For a "standard" install the --prefix=/usr/local will place the software in
nordugrid subdirectories:

   /usr/local/bin
   /usr/local/lib/nordugrid 
   /usr/local/libexec/nordugrid 
   ..

'make' builds the full middleware containing server, client, monitor and
documentation, currently modular builds (such as 'make client', or 'make
server') are not supported yet.


Building with RPM
=================

ARC can be built using RPM. From a tar.gz file do:

   rpmbuild -ta nordugrid-arc-<version>.tar.gz

and from a .src.rpm do:

   rpmbuild --rebuild nordugrid-arc-<version>.src.rpm

Source RPMs are configured with the --disable-pkgdirs switch and binary
builds are relocatable (consult the relocation_instructions).
 
In terms of RPMs the build requirements can be satisfied with the following
packages:

   o gpt >= 3.2
   o globus >= 2.4.3-16ng
   o gsoap  >= 2.7.2
   o voms   >= 1.6.9      (ARC RPMs can be built without voms)
   o voms-devel >= 1.6.9  (ARC RPMs can be built without voms)
   o libxml2-devel >= 2.4.0
   o MySQL-devel
   o pyhon devel libraries (optional)
   
Note that the naming convention above might not correspond exactly to the
naming used on your system. Also be aware that on some systems the RPM
dependencies are broken. This means for example that libxml2 is not
explicitly required by libxml2-devel which it should be.


Binary RPMs: runtime requirements
=================================

The RPMs created by rpmbuild are:


   o nordugrid-arc-client         - Client programs
   o nordugrid-arc-server         - Server-side programs   
   o nordugrid-arc-gridmap-utils  - Utilities for managing gridmap-files
   o nordugrid-arc-ca-utils       - Utilities for maintaining CA files 
   o nordugrid-arc-devel          - Development files (headers, static libs)
   o nordugrid-arc-monitor        - Grid monitor web interface (should be installed on a Web server)
   o nordugrid-arc-doc            - Documentation



The strict runtime RPM dependencies are:

   o nordugrid-arc-client -> globus
   o nordugrid-arc-server -> globus, voms >= 1.6.7, libxml2 >= 2.4.0
   o nordugrid-arc-gridmap-utils -> perl module Net::LDAP
   o nordugrid-arc-ca-utils -> wget

Requirements not expressed in the RPM requirements

   o nordugrid-arc-ca-utils      -> openssl (native or globus-provided)
   o nordugrid-arc-gridmap-utils -> openssl (native or globus-provided)
                                    and optional (preferably) curl >= 7.9.8


Special requirements of the Grid Monitor (not expressed in RPM requirements):

In order to have a fully functional Grid Monitor you should follow the
instructions given in the README file of the nordugrid-arc-monitor rpm


INSTALLATION
============

For server or client setup and configuration please refer to the server or
client installation instructions available from the www.nordugrid.org.
Reading the relocation_instructions.html available in the doc/ can be useful as 
well. The middleware comes with documented server-side configuration templates
(nordugrid.conf.template).  Client installation is also discussed in the
"NorduGrid User Guide".
