Index: /main/trunk/release-kits/kits/rk2/ant-scripts/components.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/ant-scripts/components.xml	(revision 22324)
+++ /main/trunk/release-kits/kits/rk2/ant-scripts/components.xml	(revision 22325)
@@ -1,48 +1,55 @@
 <!-- an ant project containing authoritative definitions of the components of greenstone3 -->
 <project name="components">
+  
+  <!-- source component - files that get compiled and could be safely removed from a binary distribution -->
+  <patternset id="greenstone2.source.component">
+    <include name="gli/src"/>
+    <include name="gli/src/**/*"/>
+    <include name="common-src"/>
+    <include name="common-src/**/*"/>
+    <include name="build-src"/>
+    <include name="build-src/**/*"/>
+    <include name="runtime-src"/>
+    <include name="runtime-src/**/*"/>
+    <include name="aclocal.m4"/>
+    <include name="config.guess"/>
+    <include name="config.h.in"/>
+    <include name="config.sub"/>
+    <include name="configure"/>
+    <include name="configure.in"/>
+    <include name="install-sh"/>
+    <include name="Makefile.in"/>
+    <include name="win32.mak"/>
+    <include name="win32cfg.h"/>
+  </patternset>
+  
+  <!-- imagemagick -->
+  <patternset id="greenstone2.imagemagick.component">
+    <include name="bin/**/imagemagick"/>
+    <include name="bin/**/imagemagick/**/*"/>
+  </patternset>
+  
+  <!-- ghostscript -->
+  <patternset id="greenstone2.ghostscript.component">
+    <include name="bin/**/ghostscript"/>
+    <include name="bin/**/ghostscript/**/*"/>
+  </patternset>
 
-	<!-- source component - files that get compiled and could be safely removed from a binary distribution -->
-	<patternset id="greenstone2.source.component">
-		<include name="gli/src"/>
-		<include name="gli/src/**/*"/>
-		<include name="common-src"/>
-		<include name="common-src/**/*"/>
-		<include name="build-src"/>
-		<include name="build-src/**/*"/>
-		<include name="runtime-src"/>
-		<include name="runtime-src/**/*"/>
-		<include name="aclocal.m4"/>
-		<include name="config.guess"/>
-		<include name="config.h.in"/>
-		<include name="config.sub"/>
-		<include name="configure"/>
-		<include name="configure.in"/>
-		<include name="install-sh"/>
-		<include name="Makefile.in"/>
-		<include name="win32.mak"/>
-		<include name="win32cfg.h"/>
-	</patternset>
-
-	<!-- imagemagick -->
-	<patternset id="greenstone2.imagemagick.component">
-		<include name="imagemagick"/>
-		<include name="imagemagick/**/*"/>
-	</patternset>
-
-    <!-- ghostscript -->
-    <patternset id="greenstone2.ghostscript.component">
-        <include name="ghostscript"/>
-        <include name="ghostscript/**/*"/>
-    </patternset>
-
-    <!-- the core component - defined by antithesis -->
-    <patternset id="greenstone2.core.component">
-		<invert>
-			<patternset refid="greenstone2.source.component"/>
-			<patternset refid="greenstone2.imagemagick.component"/>
-			<patternset refid="greenstone2.ghostscript.component"/>
-		</invert>
-    </patternset>
-
+  <!-- apache httpd -->  
+  <patternset id="greenstone2.apachehttpd.component">
+    <include name="apache-httpd"/>
+    <include name="apache-httpd/**/*"/>
+  </patternset>
+  
+  <!-- the core component - defined by antithesis -->
+  <patternset id="greenstone2.core.component">
+    <invert>
+      <patternset refid="greenstone2.source.component"/>
+      <patternset refid="greenstone2.imagemagick.component"/>
+      <patternset refid="greenstone2.ghostscript.component"/>
+      <patternset refid="greenstone2.apachehttpd.component"/>
+    </invert>
+  </patternset>
+  
 </project>
 
Index: /main/trunk/release-kits/kits/rk2/ant-scripts/create-cdrom-components.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/ant-scripts/create-cdrom-components.xml	(revision 22324)
+++ /main/trunk/release-kits/kits/rk2/ant-scripts/create-cdrom-components.xml	(revision 22325)
@@ -38,5 +38,4 @@
 					<include name="cgi-bin/library.cgi"/>
 					<include name="cgi-bin/oaiserver.cgi"/>
-					<include name="apache-httpd/**/*"/>
 					<include name="*.sh"/>
 					<include name="*.csh"/>
@@ -73,6 +72,4 @@
 					<include name="cgi-bin/library.cgi"/>
 					<include name="cgi-bin/oaiserver.cgi"/>
-					<include name="apache-httpd"/>
-					<include name="apache-httpd/**/*"/>
 					<include name="*.sh"/>
 					<include name="*.csh"/>
@@ -94,5 +91,8 @@
 			<unzip src="components/ghostscript.comp" dest="cdrom/dist/Software/ghostscript/${rk.os}" overwrite="true"/>
 		</if>
-
+		
+		<!-- apache httpd -->
+		<unzip src="components/apachehttpd.comp" dest="cdrom/dist/Software" overwrite="true"/>
+		
 		<!-- jre linux -->
 		<if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
Index: /main/trunk/release-kits/kits/rk2/ant-scripts/create-components.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/ant-scripts/create-components.xml	(revision 22324)
+++ /main/trunk/release-kits/kits/rk2/ant-scripts/create-components.xml	(revision 22325)
@@ -10,4 +10,7 @@
 		<antcall target="create-component"><param name="component" value="imagemagick"/></antcall>
 
+		<!-- apache httpd -->
+		<antcall target="create-component"><param name="component" value="apachehttpd"/></antcall>
+
 		<!-- windows and mac only -->
 		<if><bool><or><equals arg1="${rk.os}" arg2="windows"/><equals arg1="${rk.os}" arg2="mac"/></or></bool>
Index: /main/trunk/release-kits/kits/rk2/installer/antinstall-config.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/installer/antinstall-config.xml	(revision 22324)
+++ /main/trunk/release-kits/kits/rk2/installer/antinstall-config.xml	(revision 22325)
@@ -62,5 +62,5 @@
 	</page>
 
-	<!-- conmponents -->
+	<!-- components -->
 	<page type="input" name="selector" displayText="">
 		<comment name="choose-components"/>
@@ -82,4 +82,10 @@
 			defaultValue="true"
 			force="true"/>
+
+		<target
+		        target="Installing Apache Web Server"
+			diskRequirement="@component.size.httpd@"
+			displayText=""
+			defaultValue="true"/>
 
 		<target
Index: /main/trunk/release-kits/kits/rk2/installer/build.xml
===================================================================
--- /main/trunk/release-kits/kits/rk2/installer/build.xml	(revision 22324)
+++ /main/trunk/release-kits/kits/rk2/installer/build.xml	(revision 22325)
@@ -120,6 +120,4 @@
 		<!-- if linux|mac -->
 		<chmod dir="${installDir}/bin/${shell.name}" includes="**/*" perm="775"/>
-		<chmod dir="${installDir}/apache-httpd/${shell.name}/bin" includes="*" perm="775"/>
-		<chmod dir="${installDir}/apache-httpd/${shell.name}" includes="*.sh" perm="775"/>
 		<!-- /if -->
 
@@ -155,11 +153,4 @@
 			>cgiarg          shortname=l argdefault=${language}</echo>
 
-		<!-- if linux|mac -->
-		<echo>Setting up apache web server</echo>
-		<exec dir="${installDir}" executable="${installDir}/apache-httpd/${shell.name}/install-bindist.sh">
-			<arg value="${installDir}/apache-httpd/${shell.name}"/>
-		</exec>
-		<!-- /if -->
-
 		<echo message="Creating installation properties file"/>
 		<!-- if linux|mac -->
@@ -170,4 +161,41 @@
 		<!-- /if -->
 		
+	</target>
+
+	<!-- Apache HTTPD  -->
+	<target name="Installing Apache Web Server">
+	  <echo>Installing the Apache Web Server</echo>
+	  
+	  <!-- start web -->
+	  <unzip src="${antinstaller.jar}" dest="${basedir}">
+	    <patternset>
+	      <include name="apachehttpd.lzma"/>
+	    </patternset>
+	  </unzip>
+
+	  <!-- if linux|mac -->
+	  <sevenzip task="decode" input="${basedir}/apachehttpd.lzma" output="${basedir}/imagemagick.comp"/>
+	  <!-- /if -->
+	  <!-- if windows -->
+	  <exec dir="${basedir}" executable="${basedir}/7za.exe">
+	    <arg line="x apachehttpd.lzma"/>
+	  </exec>
+	  <!-- /if -->
+	  <!-- end web -->
+
+	  <!-- start cdrom -->
+	  <copy todir="${installDir}">
+	    <fileset dir="${orig.dir}/Software/apache-httpd"/>
+	  </copy>
+	  <!-- end cdrom -->
+
+	  <!-- if linux|mac -->
+	  <chmod dir="${installDir}/apache-httpd/${shell.name}/bin" includes="*" perm="775"/>
+	  <chmod dir="${installDir}/apache-httpd/${shell.name}" includes="*.sh" perm="775"/>
+	  <echo>Setting up apache web server</echo>
+	  <exec dir="${installDir}" executable="${installDir}/apache-httpd/${shell.name}/install-bindist.sh">
+	    <arg value="${installDir}/apache-httpd/${shell.name}"/>
+	  </exec>
+	  <!-- /if -->
 	</target>
 
Index: /main/trunk/release-kits/kits/rk3/installer/antinstall-config.xml
===================================================================
--- /main/trunk/release-kits/kits/rk3/installer/antinstall-config.xml	(revision 22324)
+++ /main/trunk/release-kits/kits/rk3/installer/antinstall-config.xml	(revision 22325)
@@ -102,4 +102,12 @@
 			displayText=""/>
 
+		<!-- start amp -->
+		<target
+		   target="Installing AMP"
+		   diskRequirement="@component.size.amp@"
+		   defaultValue="true"
+		   displayText=""/>
+		<!-- end amp -->
+
 		<!-- if windows -->
 		<target
Index: /main/trunk/release-kits/kits/rk3/installer/build.xml
===================================================================
--- /main/trunk/release-kits/kits/rk3/installer/build.xml	(revision 22324)
+++ /main/trunk/release-kits/kits/rk3/installer/build.xml	(revision 22325)
@@ -175,4 +175,23 @@
 
 	</target>
+
+	<!-- start amp -->
+
+	<target name="Installing AMP">
+	  <echo>Installing Apache, MySQL and PHP</echo>
+	  <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="amp.lzma"/></patternset></unzip>
+	  <!-- if windows --><exec dir="${basedir}" executable="${basedir}/7za.exe"><arg line="x amp.lzma"/></exec><!-- /if -->
+	  <!-- if linux|mac --><sevenzip task="decode" input="${basedir}/amp.lzma" output="${basedir}/amp.comp"/><!-- /if -->
+	  <delete file="amp.lzma"/>
+	  <unzip src="${basedir}/amp.comp" dest="${installDir}/ext/amp"/>
+	  <delete file="amp.comp"/>
+	  
+	  <!-- if linux|mac -->
+	  <echo>Setting binaries to executable</echo>
+	  <chmod dir="${installDir}/ext/amp" includes="*" perm="775"/>
+	  <!-- /if -->
+	</target>
+
+	<!-- end amp -->
 
 	<target name="Installing Tomcat">
Index: /main/trunk/release-kits/shared/core/ant-scripts/create-installer.xml
===================================================================
--- /main/trunk/release-kits/shared/core/ant-scripts/create-installer.xml	(revision 22324)
+++ /main/trunk/release-kits/shared/core/ant-scripts/create-installer.xml	(revision 22325)
@@ -78,9 +78,9 @@
 		<property name="component.size.imagemagick" value="${component.megabytesize.imagemagick} MB"/>
 
-		<!-- calculate the size of: ghostscript -->
-		<length property="component.bytesize.ghostscript" mode="all"><fileset file="${basedir}/components/ghostscript.comp"/></length>
-		<math result="component.megabytesize.ghostscript" operand1="${component.bytesize.ghostscript}" operation="/" operand2="1048576" datatype="int"/>
-		<property name="component.size.ghostscript" value="${component.megabytesize.ghostscript} MB"/>
-
+		<!-- calculate the size of: apache httpd -->
+		<length property="component.bytesize.httpd" mode="all"><fileset file="${basedir}/components/apachehttpd.comp"/></length>
+		<math result="component.megabytesize.httpd" operand1="${component.bytesize.httpd}" operation="/" operand2="1048576" datatype="int"/>
+		<property name="component.size.httpd" value="${component.megabytesize.httpd} MB"/>
+		
 		<!-- calculate the size of: tomcat -->
 		<length property="component.bytesize.tomcat" mode="all"><fileset file="${basedir}/components/tomcat.comp"/></length>
@@ -88,7 +88,28 @@
 		<property name="component.size.tomcat" value="${component.megabytesize.tomcat} MB"/>
 
+		<!-- EXT -->
+		<!-- calculate the size of: amp (and put it into the components directory) -->
+		<if><bool><and><equals arg1="${amp.enabled}" arg2="true"/><not><available file="${rk.home}/ext/amp.lzma"/></not></and></bool>
+		  <fail>amp.lzma file not found in the release kit ext directory</fail>
+		</if>
+
+		<if><bool><and><equals arg1="${amp.enabled}" arg2="true"/></and></bool>
+		  <echo>Copying amp.lzma to compontents directory</echo>
+		  <copy file="${rk.home}/ext/amp.lzma" todir="${basedir}/components"/>
+		  <property name="component.size.amp" value="257 MB"/>
+		</if>
+		<!-- /EXT -->
+
 		<!-- make the installer descriptors relevant to the current os -->
 		<dcff file="installer/antinstall-config.xml" startTag="&lt;!--\s*if\s*(?!.*${rk.os})[^ ]+\s*--&gt;" endTag="&lt;!--\s*/if\s*--&gt;" />
 		<dcff file="installer/build.xml" startTag="&lt;!--\s*if\s*(?!.*${rk.os})[^ ]+\s*--&gt;" endTag="&lt;!--\s*/if\s*--&gt;" />
+
+		<!-- EXT -->
+		<if><bool><not><equals arg1="${amp.enabled}" arg2="true"/></not></bool>
+		  
+		  <dcff file="installer/antinstall-config.xml" startTag="&lt;!-- start amp --&gt;" endTag="&lt;!-- end amp --&gt;" />
+		  <dcff file="installer/build.xml" startTag="&lt;!-- start amp --&gt;" endTag="&lt;!-- end amp --&gt;" />
+		</if>
+		<!-- /EXT -->
 
 		<!-- put the concrete values of things in the config -->
@@ -100,7 +121,17 @@
 			<job pattern="@component.size.imagemagick@" replacement="${component.size.imagemagick}"/>
 			<job pattern="@component.size.ghostscript@" replacement="${component.size.ghostscript}"/>
+			<job pattern="@component.size.httpd@" replacement="${component.size.httpd}"/>
 			<job pattern="@java.min.version@" replacement="${java.min.version}"/>
 			<job pattern="@java.extracted@" replacement="${java.extracted}"/>
 		</rsr>
+
+		<!-- EXT -->
+		<if><bool><equals arg1="${amp.enabled}" arg2="true"/></bool>
+		  <rsr>
+		    <fileset dir="${basedir}/installer" includes="*.xml"/>
+		    <job pattern="@component.size.amp@" replacement="${component.size.amp}"/>
+		  </rsr>
+		</if>
+		<!-- /EXT -->
 
 		<!-- put the concrete values of things in the text -->
Index: /main/trunk/release-kits/shared/core/ant-scripts/shared.xml
===================================================================
--- /main/trunk/release-kits/shared/core/ant-scripts/shared.xml	(revision 22324)
+++ /main/trunk/release-kits/shared/core/ant-scripts/shared.xml	(revision 22325)
@@ -377,40 +377,11 @@
 	<target name="create-component">
 	  <mkdir dir="components"/>
-	  <if>
-	    <bool>
-	      <equals arg1="${version.major}" arg2="2"/>
-	    </bool>
-	    
-	    <if>
-	      <bool>
-		<or>
-		  <equals arg1="${component}" arg2="imagemagick"/>
-		  <equals arg1="${component}" arg2="ghostscript"/>
-		</or>
-	      </bool>
-	      
-	      <zip destfile="components/${component}.comp" compress="false">
-		<zipfileset dir="compiled/bin/${os.shell}">
-		  <patternset refid="greenstone${version.major}.${component}.component"/>
-		</zipfileset>
-	      </zip>
-	      
-	      <else>
-		<zip destfile="components/${component}.comp" compress="false">
-		  <zipfileset dir="compiled">
-		    <patternset refid="greenstone${version.major}.${component}.component"/>
-		  </zipfileset>
-		</zip>
-	      </else>
-	    </if>
-	    
-	    <else>
-	      <zip destfile="components/${component}.comp" compress="false">
-		<zipfileset dir="compiled">
-		  <patternset refid="greenstone${version.major}.${component}.component"/>
-		</zipfileset>
-	      </zip>
-	    </else>
-	  </if>
+	  
+	  <zip destfile="components/${component}.comp" compress="false">
+	    <zipfileset dir="compiled">
+	      <patternset refid="greenstone${version.major}.${component}.component"/>
+	    </zipfileset>
+	  </zip>
+	
 	  <!-- windows -->
 	  <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
Index: /main/trunk/release-kits/shared/core/language-strings/LanguagePack.properties
===================================================================
--- /main/trunk/release-kits/shared/core/language-strings/LanguagePack.properties	(revision 22324)
+++ /main/trunk/release-kits/shared/core/language-strings/LanguagePack.properties	(revision 22325)
@@ -33,4 +33,9 @@
 Looking_For_Previous_Installation.explanatoryText=If this is an over-install, load some properties of the existing installation to aid the installation process.
 
+### EXT ###
+Installing_AMP.displayText=Apache HTTPD (2.2.15), MySQL (5.1.47) and PHP (5.3.2)
+Installing_AMP.explanatoryText=<html>This component will install the Apache HTTPD web server, complete with MySQL (a database system) and PHP (a scripting language used for server-side coding).</html>
+### /EXT ###
+
 Installing_Core_System.displayText=Core System
 Installing_Core_System.explanatoryText=<html>This is the core Greenstone@version.major@ system. It is a required component.</html>
@@ -48,4 +53,7 @@
 Installing_Ghostscript.explanatoryText=Greenstone uses GhostScript to process PDF and PostScript files.\n\n If you have Ghostscript on your computer already, or if you don't wish to\ninclude PDF of PostScript files in Greenstone collections, then you may choose\nnot to install Ghostscript.
 
+Installing_Apache_Web_Server.displayText=Apache Web Server
+Installing_Apache_Web_Server.explanatoryText=To serve Greenstone digital library content a web server is needed. \nThe open-source Apache web server is one such example, and as \npart of this installation process a pre-configured Apache web server \n-- ready to run out of the box -- is installed by selecting this option. \nIf you already have an existing web server installed then you can \nchoose to deselect this option to avoid having the pre-configured \nversion installed, however you will need to adjust the configuration settings of \nyour existing web server to link correctly to this Greenstone installation. \nIf you are unsure about this option it is recommended you leave it selected, \nas the configuration file it installs is a good starting place to learn \nwhat configuration options need to go into any existing web servers.
+
 Installing_Start_Menu_Shortcuts.displayText=Start Menu Shortcuts
 Installing_Start_Menu_Shortcuts.explanatoryText=Create shortcuts to Greenstone@version.major@ on your Start Menu
@@ -59,5 +67,4 @@
 Installing_Documented_Examples.displayText=Documented Example Collections
 Installing_Documented_Examples.explanatoryText=A set of example collections, whose 'about' pages describe how they were created.\n\nEven if you don't install the Documented Examples now, you can get them from\nhttp://www.greenstone.org/ or from the greenstone CD-ROM.
-
 
 ### Admin password page
