      $Id: README,v 1.5 2007-02-06 13:59:46 omsynge Exp $

Structure of Build framework:



      <TOP>: --\
               |-build.xml
               \-common-\
                        |-common.xml
                        |-rpms.properties
                        |-cvs.properties
                        |javac.properties
               |
               \-modules-build-\
                               |-cells-build.xml
                               |-dcache-core-build.xml
                               |-dcap-build.xml
                               |-srm-build.xml
                               |-srmclient-build.xml
                               |infoProvider-build.xml
               |
               \-rpm-\
                     |-dcache-client.spec.template
                     |-dcache-server.spec.template
                     |-rpmmacros.template
                     |-rpmrc.template
               
               |
               \-skel-\
                      |
                      \-bin-\
                            |-dcache-core
                            |-dcache-pool
                      |
                      \-etc-\
                            |-dcache.kpwd.template
                            |-dCacheSetup.template
                            |-node_config.template
                            |-pd_dump-s-U_enstore.sql
                            |-pool_path.template
                            |-psql_drop_companion.sql
                            |-psql_drop_dcache.sql
                            |-psql_drop.replicas.sql
                            |-psql_install_companion.sql
                            |-psql_install_replicas.sql

                      |
                      \-libexec-\
                                |-migrate-from-1.9.5.sh

To be able to use build environment ANT >= 1.6 should
be installed on the system. Please note, that there is no possibility to
have two different versions of ANT in parallel.

                                
1. Setup the Build environment

   # checkout build framework
   cvs co -d dCacheBuild Build
   
   # create modules directory
   cd dCacheBuild   
   mkdir modules
   
   # checkout modules
   # cross module dependencies:
   #    cells       : no dependencies
   #    cells-log4j : external
   #    dCache      : cells
   #    dCache-srm  : dCache, srm, gPlazma, external
   #    srm         : cells, external
   #    srmclient   : srm, cells , external
   #    gPlazma     : external
   
   cd modules
   cvs co cells dCache srm srmclient dcap infoProvider external
   # goto top of build
   cd .. 
   
   
   By defining cvs.autocheckout modules checked out automatically:
   
   ant -Dcvs.autocheckout=true cells
   
   To check out the modules by tag:
   
   ant checkout.all -Dcvs.tag=build_0_0_4
   
2. Build modules

  The valid targets are: cells, dcache-core, dcache-srm, srm, srmclient, dcap, javatunnel
  The output is located in <TOP>/dist/classes
  
  ant dcache-srm
  
  
3. Binary distribution

   To provide binary-ready distributions there is a special targets:
   cells.bin, cells-log4j.bin, dcache.bin, dcache-srm.bin, dcap.bin, infoProvider.bin, srm.bin, srmclient.bin, javatunnel.bin
   
   The result is 'ready to run' binary distribution located in <TOP>/dist/d-cache. The location may be
   overwritten by flag binDir:
   
   ant -DbinDir=/opt/d-cache dcache-srm.bin
   
4.  RPMs


   there is two targets to create rpms: server.rpm and client.rpm
   The file common/rpms.properties contains variables for server and client version and release numbers.
   
   ant server.rpm client.rpm  
   
   or
   
   ant all
  
  The output is located at <TOP>/dist/noarch directory with name 
    dcache-<clinet/server>-<version>-<release>.noarch.rpm

