Index: /gs2-extensions/gsdl-amp/trunk/src/CASCADE-MAKE.sh
===================================================================
--- /gs2-extensions/gsdl-amp/trunk/src/CASCADE-MAKE.sh	(revision 23004)
+++ /gs2-extensions/gsdl-amp/trunk/src/CASCADE-MAKE.sh	(revision 23004)
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+cd cascade-make/lib ; source cascade-lib.bash ; cd ../..
+
+for d in packages ; do
+  echo "Running $d/CASCADE-MAKE.sh"
+
+  (cd $d ; ./CASCADE-MAKE.sh $*)
+
+  if [ $? != 0 ] ; then
+    echo "Error encountered running $d/CASCADE-MAKE.sh"
+    exit 1
+  fi
+done
+
+
Index: /gs2-extensions/gsdl-amp/trunk/src/build.xml
===================================================================
--- /gs2-extensions/gsdl-amp/trunk/src/build.xml	(revision 23004)
+++ /gs2-extensions/gsdl-amp/trunk/src/build.xml	(revision 23004)
@@ -0,0 +1,19 @@
+<project name="amp" basedir="." default="install">
+  <property environment="env"/>
+  <property name="installdir" value="${basedir}/installed/linux"/>
+  
+  <target name="install">
+    <exec executable="/bin/bash">
+      <arg value="-c"/>
+      <arg value="source setup.bash ; ./CASCADE-MAKE.sh"/>
+    </exec>
+  </target>
+
+  <target name="uninstall">
+    <exec executable="/bin/bash">
+      <arg value="-c"/>
+      <arg value="./CASCADE-MAKE.sh distclean"/>
+    </exec>
+    <delete dir="${installdir}"/>
+  </target>
+</project>
Index: /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE.sh
===================================================================
--- /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE.sh	(revision 23004)
+++ /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE.sh	(revision 23004)
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+list=
+if [ "x$COMPILE_UP_MYSQL" = "x1" ] ; then
+  list="MYSQL LIBPNG APACHE PHP"
+else  
+  list="LIBPNG APACHE PHP"
+fi
+
+for d in $list ; do
+  echo "    Running CASCADE-MAKE/$d.sh $*"
+
+  ./CASCADE-MAKE/$d.sh $*
+
+  if [ $? != 0 ] ; then
+    echo "  Error encountered running CASCADE-MAKE/$d.sh"
+    exit 1
+  fi
+done
Index: /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE/APACHE.sh
===================================================================
--- /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE/APACHE.sh	(revision 23004)
+++ /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE/APACHE.sh	(revision 23004)
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+package=httpd
+version=-2.2.15
+
+progname=$0
+
+source ../cascade-make/lib/cascade-lib.bash
+
+prefix=$GEXTAMP_INSTALLED
+
+if [ "$COMPILE_UP_APACHE_HTTPD" = "1" ] ; then
+  opt_run_untar $force_untar $auto_untar $package $version
+  opt_run_configure $force_config $auto_config $package $version $prefix --with-layout=Apache --enable-so
+
+  opt_run_make $compile   $package $version
+  opt_run_make $install   $package $version "install"
+  opt_run_make $clean     $package $version "clean"
+  opt_run_make $distclean $package $version "distclean"
+
+  opt_run_tarclean $tarclean $package $version
+else
+  echo "Using Apache HTTPD that is provided externally to the extension at:"
+  echo "  $APACHE_HTTPD_HOME"
+  echo ""
+fi
Index: /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE/LIBPNG.sh
===================================================================
--- /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE/LIBPNG.sh	(revision 23004)
+++ /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE/LIBPNG.sh	(revision 23004)
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+package=libpng
+version=-1.2.29
+
+progname=$0
+
+source ../cascade-make/lib/cascade-lib.bash
+
+prefix=$GEXTAMP_INSTALLED
+
+opt_run_untar $force_untar $auto_untar $package $version
+opt_run_configure $force_config $auto_config $package $version $prefix
+
+opt_run_make $compile   $package $version
+opt_run_make $install   $package $version "install"
+opt_run_make $clean     $package $version "clean"
+opt_run_make $distclean $package $version "distclean"
+
+opt_run_tarclean $tarclean $package $version
+
+
+
+
Index: /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE/MYSQL.sh
===================================================================
--- /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE/MYSQL.sh	(revision 23004)
+++ /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE/MYSQL.sh	(revision 23004)
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+package=mysql
+version=-5.1.47
+
+progname=$0
+
+source ../cascade-make/lib/cascade-lib.bash
+
+prefix=$GEXTAMP_INSTALLED
+
+opt_run_untar $force_untar $auto_untar $package $version
+opt_run_configure $force_config $auto_config $package $version $prefix --exec-prefix=$prefix
+
+opt_run_make $compile   $package $version
+opt_run_make $install   $package $version "install"
+opt_run_make $clean     $package $version "clean"
+opt_run_make $distclean $package $version "distclean"
+
+opt_run_tarclean $tarclean $package $version
+
+
+
+
Index: /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE/PHP.sh
===================================================================
--- /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE/PHP.sh	(revision 23004)
+++ /gs2-extensions/gsdl-amp/trunk/src/packages/CASCADE-MAKE/PHP.sh	(revision 23004)
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+package=php
+version=-5.3.2
+
+progname=$0
+
+source ../cascade-make/lib/cascade-lib.bash
+
+prefix=$GEXTAMP_INSTALLED
+mysqlprefix=
+if [ "x$COMPILE_UP_MYSQL" = "x1" ] ; then
+  mysqlprefix=$GEXTAMP_INSTALLED
+else
+  if [ -n "$GEXTMYSQL_INSTALLED" ] ; then
+    mysqlprefix=$GEXTMYSQL_INSTALLED
+  fi
+fi
+
+opt_run_untar $force_untar $auto_untar $package $version
+
+opt_run_configure $force_config $auto_config $package $version $prefix --with-mysql=$mysqlprefix --with-png-dir=$prefix --with-apxs2=$prefix/bin/apxs --with-gd
+
+opt_run_make $compile   $package $version
+opt_run_make $install   $package $version "install"
+opt_run_make $clean     $package $version "clean"
+opt_run_make $distclean $package $version "distclean"
+
+opt_run_tarclean $tarclean $package $version
Index: /gs2-extensions/gsdl-amp/trunk/src/setup.bash
===================================================================
--- /gs2-extensions/gsdl-amp/trunk/src/setup.bash	(revision 23004)
+++ /gs2-extensions/gsdl-amp/trunk/src/setup.bash	(revision 23004)
@@ -0,0 +1,55 @@
+
+extdesc="the Apache-MySql-Php (AMP) Extension"
+
+full_setup=`pwd`/${BASH_SOURCE}
+fulldir=${full_setup%/*}
+fulldir=${fulldir%/.}
+
+source cascade-make/lib/cascade-lib.bash
+
+if [ "x$GEXTAMP" = "x" ] ; then
+  export GEXTAMP=$fulldir
+  export GEXTAMP_INSTALLED=$GEXTAMP/$GSDLOS
+
+  export PATH=$GEXTAMP_INSTALLED/bin:$PATH
+
+  if [ "x$LD_LIBRARY_PATH" = "x" ] ; then
+    export LD_LIBRARY_PATH=$GEXTAMP_INSTALLED/lib
+  else
+    export LD_LIBRARY_PATH=$GEXTAMP_INSTALLED/lib:$LD_LIBRARY_PATH
+  fi
+
+  export APACHE_HTTPD_HOME="$GEXTAMP_INSTALLED";
+  export COMPILE_UP_APACHE_HTTPD=1
+
+  if [ -n "$GSDLHOME" ] ; then
+      # see if there is already an apache httpd we can use
+      # override default values if there is
+      if [ -e "$GSDLHOME/apache-httpd/$GSDLOS" ] ; then
+	  export APACHE_HTTPD_HOME="$GSDLHOME/apache-httpd/$GSDLOS";
+	  export COMPILE_UP_APACHE_HTTPD=0
+      fi
+  fi
+  
+  export COMPILE_UP_MYSQL=1
+  if [ -n "$GEXTMYSQL" ] ; then
+    if [ -e "$GEXTMYSQL/$GSDLOS" ] ; then
+      export COMPILE_UP_MYSQL=0     
+      source $GEXTMYSQL/setup.bash
+    fi
+  fi
+
+  extdir=${GEXTAMP##*/}
+
+  if [ "x$GSDLEXTS" = "x" ] ; then
+    export GSDLEXTS=$extdir
+  else 
+    export GSDLEXTS=$GSDLEXTS:$extdir
+  fi
+
+  echo "+Your environment is now setup for $extdesc to Greenstone"
+else
+  echo "+Your environment is already setup for $extdesc to Greenstone"
+fi
+
+
