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 Globus Toolkit 2.4.3 (http://www.globus.org/) which contains
    	- OpenSSl
	- OpenLDAP
	- Cyrus SASL
	- Globus Replica Catalog
	- Globus RLS    
    o gSOAP (http://www.cs.fsu.edu/~engelen/soap.html)
    o GACL (http://www.gridpp.ac.uk/authz/gacl/)    
    o VOMS (http://datagrid.in2p3.fr/cgi-bin/cvsweb.cgi/)
    o MySQL client libraries
    o libxml2

Note that NorduGrid provides packaged versions of GPT, Globus, gSOAP and
VOMS while GACL is distributed within the nordugrid source. 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:

  --enable-experimental                  Enable experimental code
  --enable-rpath-hack                    Do not rpath Globus libraries in binaries
  --enable-docs                          Build the documentation
  --with sysv-scripts-location=<PATH>    Location of the SYSV init scripts (e.g. /etc/init.d)
  --with-monitor-prefix=<PATH>           Specify the location of the Grid Monitor WWW scripts
  --with-monitor-local-prefix=<PATH>     Specify the relative location of the Grid Monitor WWW scripts
  --with-gsoap-location=<PATH>           Specify the gSOAP installation path
  --with-mysql-location=<PATH>           Specify the MySQL installation path
  --with-libxml-location=<PATH>          Specify the libxml installation path
  --with-nordugrid-location=<PATH>       Specify the nordugrid installation path
  --with-globus-location=<PATH>          Specify the globus installation path
  --with-gpt-location=<PATH>             Specify the gpt installation path
  --with-globus-makefile-header          Use globus-makefile-header to generate makefile stubs
  --with-flavor=<flavor>                 Specify the globus build flavor or without-flavor
                                         for a flavor independent

Note that using --with-nordugrid-location=/opt/nordugrid switch will install
the software using the /opt/nordugrid prefix _and_ place the software in
subdirectories:

   /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 
   ..

Please note that as of the 0.4 Release the "standard install" is not fully
supported yet, we recommend to use the --with-nordugrid-location switch.
Furthermore, '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
=================

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

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

and from a .src.rpm do:

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

Source RPMs are configured with the --with-nordugrid-location switch and 
binary builds are fully relocatable.
 
In terms of RPMs the build requirements can be satisfied with the following
packages:

   o gpt >= 3
   o globus >= 2.4.3-9ng
   o gsoap  >= 2.5.2
   o voms    = 1.1.39
   o voms-devel = 1.1.39
   o libxml2-devel
   o MySQL-devel
 
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 lixml2-devel which it should be.


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

The RPMs created by rpmbuild are:


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



The strict runtime RPM dependencies are:

   o nordugrid-client -> globus
   o nordugrid-server -> globus, globus-config, voms = 1.1.39, libxml2
   o nordugrid-gridmap-utils -> perl-perl-ldap, perl-libwww-perl
   o nordugrid-ca-utils -> wget

Requirements not expressed in the RPM requirements

   o nordugrid-server -> standard Perl environment
   o nordugrid-ca-utils -> openssl (native or globus-provided)
   o nordugrid-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-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.txt 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".
