source: release-kits/mark2/installer/build.xml@ 18666

Last change on this file since 18666 was 18666, checked in by oranfry, 15 years ago

changes to build the apache httpd and put it into the release (lirk2 and mark2)

File size: 6.1 KB
RevLine 
[14982]1<?xml version="1.0"?>
2<!--
3This is the build.xml run by AntInstaller for the installer
4-->
5
[15205]6<project name="Installation">
[14982]7
8 <!-- this is required to pick up the properties generated during the install pages -->
9 <property file="${basedir}/ant.install.properties"/>
10
11 <path id="project.classpath">
12 <pathelement path="${antinstaller.jar}"/>
13 </path>
14
15 <!-- custom tasks -->
[17107]16 <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
17 <typedef name="adduser" classname="org.greenstone.anttasks.AddGreenstoneUserToDatabase" classpathref="project.classpath"/>
[17468]18 <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
[14982]19
[17576]20 <target name="Installing Core System" depends="">
[14982]21
22 <echo>basedir: ${basedir}</echo>
23 <echo>installDir: ${installDir}</echo>
24 <echo>antinstaller.jar: ${antinstaller.jar}</echo>
[15980]25
26 <!-- create the installation directory -->
27 <echo message="Creating Installation directory"/>
[14982]28 <mkdir dir="${installDir}"/>
29
[17608]30 <echo>Installing Core Files</echo>
31 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
32 <sevenzip task="decode" input="${basedir}/core.lzma" output="${basedir}/core.comp"/>
33 <delete file="core.lzma"/>
34 <unzip src="${basedir}/core.comp" dest="${installDir}"/>
35 <delete file="core.comp"/>
[14982]36
[17437]37 <echo message="Installing Servers"/>
38 <copy tofile="${installDir}/cgi-bin/oaiserver" file="${installDir}/bin/darwin/oaiserver"/>
39 <copy tofile="${installDir}/cgi-bin/library" file="${installDir}/bin/darwin/library"/>
40
[14982]41 <echo message="Setting Binaries to Executable"/>
[15980]42 <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
[16469]43 <chmod dir="${installDir}/bin/darwin" includes="*" perm="775"/>
[17470]44 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
[15980]45 <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
46 <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
[14982]47 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
[18666]48 <chmod dir="${installDir}/apache-httpd/darwin/bin" includes="*" perm="775"/>
[14982]49 <echo/>
50
[16469]51 <echo message="Filling in concrete values in config files"/>
52 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
[17076]53 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
54 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
[16469]55 <echo/>
56
[17107]57 <echo message="Creating admin and demo users"/>
[17611]58 <adduser txt2db="${installDir}/bin/darwin/txt2db"
[17107]59 usersDb="${installDir}/etc/users.db"
60 username="admin"
61 password="${admin.password}"
62 groups="administrator,colbuilder"
63 comment="created at install time"/>
64 <adduser
[17611]65 txt2db="${installDir}/bin/darwin/txt2db"
[17107]66 usersDb="${installDir}/etc/users.db"
67 username="demo"
68 password="demo"
69 groups="demo"
70 comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
71
[14982]72 <!-- delete unneeded files -->
[16832]73 <echo message="Deleting some unneeded files"/>
[14982]74 <delete dir="${installDir}/resources/icons"/>
75 <delete file="${installDir}/resources/*.png"/>
76
[17257]77 <echo>Creating installation properties file</echo>
78 <echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
79
[15142]80 <echo message="Finished"/>
81
[14982]82 </target>
83
[17710]84 <!-- ImageMagick -->
85 <target name="Installing ImageMagick" depends="">
86 <echo message="Installing ImageMagick"/>
87 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip>
88 <sevenzip task="decode" input="${basedir}/imagemagick.lzma" output="${basedir}/imagemagick.comp"/>
89 <delete file="imagemagick.lzma"/>
90 <unzip src="${basedir}/imagemagick.comp" dest="${installDir}/bin/darwin" />
91 <delete file="imagemagick.comp"/>
[17716]92 <chmod dir="${installDir}/bin/darwin/imagemagick/bin" includes="*" perm="775"/>
[14982]93 </target>
94
[17710]95 <!-- Ghostscript -->
96 <target name="Installing Ghostscript" depends="">
97 <echo message="Installing Ghostscript"/>
98 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ghostscript.lzma"/></patternset></unzip>
99 <sevenzip task="decode" input="${basedir}/ghostscript.lzma" output="${basedir}/ghostscript.comp"/>
100 <delete file="ghostscript.lzma"/>
101 <unzip src="${basedir}/ghostscript.comp" dest="${installDir}/bin/darwin" />
102 <delete file="ghostscript.comp"/>
[17716]103 <chmod dir="${installDir}/bin/darwin/ghostscript/bin" includes="*" perm="775"/>
[17710]104 </target>
105
106
[17815]107 <target name="Source Release" depends="">
[17710]108
[17815]109 <!-- create the installation directory -->
110 <echo message="Creating Installation directory"/>
111 <mkdir dir="${installDir}"/>
112
113 <echo>Installing Source Release</echo>
114 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="source-release.lzma"/></patternset></unzip>
115 <sevenzip task="decode" input="${basedir}/source-release.lzma" output="${basedir}/source-release.comp"/>
116 <delete file="source-release.lzma"/>
117 <unzip src="${basedir}/source-release.comp" dest="${installDir}"/>
118 <delete file="source-release.comp"/>
119
120 <echo message="Setting Binaries to Executable"/>
121 <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
122 <chmod dir="${installDir}/bin/darwin" includes="*" perm="775"/>
123 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
124 <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
125 <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
126 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
127 <echo/>
128
129 <echo message="Filling in concrete values in config files"/>
130 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
131 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
132 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
133 <echo/>
134
135 <echo>Create usage.txt</echo>
136 <echo file="${installDir}/etc/usage.txt"></echo>
137
138 <echo>Creating installation properties file</echo>
139 <echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
140
141 <echo message="Finished"/>
142
143 </target>
144
145
146
[14982]147</project>
Note: See TracBrowser for help on using the repository browser.