#############################################################
##                                                         ##
## Copyright (c) 2007-2014 by The University of Queensland ##
## Centre for Geoscience Computing                         ##
## http://earth.uq.edu.au/centre-geoscience-computing      ##
##                                                         ##
## Primary Business: Brisbane, Queensland, Australia       ##
## Licensed under the Open Software License version 3.0    ##
## http://www.opensource.org/licenses/osl-3.0.php          ##
##                                                         ##
#############################################################


INSTALLATION
The following instructions describe how to install GenGeo on an Ubuntu distribution of Linux.

1/ Download the GenGeo source code from the Bazaar repository:
bzr branch lp:esys-particle/gengeo gengeo
cd gengeo/build

2/ Create a configure script for your distribution:
./autogen.sh

3/ Create the Makefiles for GenGeo:
./configure

If you are using gcc-4.3 or later, use the following configure command:
./configure CCFLAGS="-fpermissive" CXXFLAGS="-fpermissive"

To install in a location other than the default /usr/local, include the switch "--prefix=" followed by the location in which you want to install the libraries; for example:
./configure --prefix=/home/username/gengeo/install

4/ Build GenGeo:
make

5/ Install the GenGeo libraries:
sudo make install

6/ Update your environment variables (replace "2.6" with your version of Python, and replace "dist-packages" with "site-packages" if this is where your version of Python wants to install the GenGeo python scripts):
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/usr/local/lib/python2.6/dist-packages/gengeo:$PYTHONPATH

If you have installed in another location, e.g., /home/username/gengeo/install (replace 2.6 with your version of python):
export LD_LIBRARY_PATH=/home/myname/gengeo/install/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/home/myname/gengeo/install/lib/python2.6/site-packages/gengeo:$PYTHONPATH

Set these variables permanently by adding the lines to your shell's initialization file in your home directory.  For example, if you are using the Bourne-Again Shell (bash), then add the lines to ~/.bashrc.


REINSTALLATION
To rebuild and reinstall the source code from a clean distribution:
sudo make uninstall
make distclean
./configure /* Add other arguments as needed from step 3 above. */
make
sudo make install


