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

Last change on this file since 19624 was 19624, checked in by oranfry, 12 years ago

documented examples are now a component of cdrom installations

File size: 5.9 KB
Line 
1<?xml version="1.0"?>
2<!--
3This is the build.xml run by AntInstaller for the installer
4-->
5
6<project name="Installation">
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 -->
16 <typedef name="rsr" classname="org.greenstone.anttasks.RegexSearchReplace" classpathref="project.classpath"/>
17 <typedef name="adduser" classname="org.greenstone.anttasks.AddGreenstoneUserToDatabase" classpathref="project.classpath"/>
18 <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
19
20 <target name="Installing Core System" depends="">
21
22 <echo>basedir: ${basedir}</echo>
23 <echo>installDir: ${installDir}</echo>
24 <echo>antinstaller.jar: ${antinstaller.jar}</echo>
25
26 <!-- create the installation directory -->
27 <echo message="Creating Installation directory"/>
28 <mkdir dir="${installDir}"/>
29
30 <echo>Installing Core Files</echo>
31 <!-- start web -->
32 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
33 <sevenzip task="decode" input="${basedir}/core.lzma" output="${basedir}/core.comp"/>
34 <delete file="core.lzma"/>
35 <unzip src="${basedir}/core.comp" dest="${installDir}"/>
36 <delete file="core.comp"/>
37 <!-- end web -->
38
39 <!-- start cdrom -->
40 <copy todir="${installDir}">
41 <fileset dir="${orig.dir}/Software/core/all"/>
42 <fileset dir="${orig.dir}/Software/core/mac"/>
43 </copy>
44 <!-- end cdrom -->
45
46 <echo message="Setting Binaries to Executable"/>
47 <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
48 <chmod dir="${installDir}/bin/darwin" includes="*" perm="775"/>
49 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
50 <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
51 <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
52 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
53 <chmod dir="${installDir}/apache-httpd/darwin/bin" includes="*" perm="775"/>
54 <chmod dir="${installDir}/apache-httpd/darwin" includes="*.sh" perm="775"/>
55 <echo/>
56
57 <echo message="Filling in concrete values in config files"/>
58 <copy file="${installDir}/cgi-bin/gsdlsite.cfg.in" tofile="${installDir}/cgi-bin/gsdlsite.cfg"/>
59 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
60 <echo/>
61
62 <echo>Correcting perl shebangs in perl scripts</echo>
63 <exec executable="which" outputproperty="perl.executable"><arg value="perl"/></exec>
64 <rsr file="${installDir}/cgi-bin/gliserver.pl" pattern="^#!.*" replacement="#!${perl.executable} -w" lines="1"/>
65 <echo/>
66
67 <!-- delete unneeded files -->
68 <echo message="Deleting some unneeded files"/>
69 <delete dir="${installDir}/resources/icons"/>
70 <delete file="${installDir}/resources/*.png"/>
71
72 <echo>Setting up apache web server</echo>
73 <exec dir="${installDir}" executable="${installDir}/apache-httpd/darwin/install-bindist.sh">
74 <arg value="${installDir}/apache-httpd/darwin"/>
75 </exec>
76
77 <echo>Creating the english dictionary</echo>
78 <copy file="${installDir}/gli/classes/dictionary.properties" tofile="${installDir}/gli/classes/dictionary_en.properties"/>
79 <echo/>
80
81 <echo>Creating installation properties file</echo>
82 <echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
83
84 <echo message="Finished"/>
85
86 </target>
87
88 <!-- ImageMagick -->
89 <target name="Installing ImageMagick" depends="">
90 <echo message="Installing ImageMagick"/>
91 <!-- start web -->
92 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip>
93 <sevenzip task="decode" input="${basedir}/imagemagick.lzma" output="${basedir}/imagemagick.comp"/>
94 <delete file="imagemagick.lzma"/>
95 <unzip src="${basedir}/imagemagick.comp" dest="${installDir}/bin/darwin" />
96 <delete file="imagemagick.comp"/>
97 <!-- end web -->
98
99 <!-- start cdrom -->
100 <copy todir="${installDir}/bin/darwin">
101 <fileset dir="${orig.dir}/Software/imagemagick/mac"/>
102 </copy>
103 <!-- end cdrom -->
104
105 <chmod dir="${installDir}/bin/darwin/imagemagick/bin" includes="*" perm="775"/>
106 </target>
107
108 <!-- Ghostscript -->
109 <target name="Installing Ghostscript" depends="">
110 <echo message="Installing Ghostscript"/>
111 <!-- start web -->
112 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ghostscript.lzma"/></patternset></unzip>
113 <sevenzip task="decode" input="${basedir}/ghostscript.lzma" output="${basedir}/ghostscript.comp"/>
114 <delete file="ghostscript.lzma"/>
115 <unzip src="${basedir}/ghostscript.comp" dest="${installDir}/bin/darwin" />
116 <delete file="ghostscript.comp"/>
117 <!-- end web -->
118
119 <!-- start cdrom -->
120 <copy todir="${installDir}/bin/darwin">
121 <fileset dir="${orig.dir}/Software/ghostscript/mac"/>
122 </copy>
123 <!-- end cdrom -->
124
125
126 <chmod dir="${installDir}/bin/darwin/ghostscript/bin" includes="*" perm="775"/>
127 </target>
128
129 <target name="Configuring Administration Pages" if="enable.admin.pages">
130 <echo>Enabling Admin Pages</echo>
131 <rsr file="${installDir}/etc/main.cfg" pattern="^\s*status\s+.*" replacement="status enabled"/>
132 <echo message="Creating admin and demo users"/>
133 <adduser txt2db="${installDir}/bin/darwin/txt2db"
134 usersDb="${installDir}/etc/users.gdb"
135 username="admin"
136 password="${admin.password}"
137 groups="administrator,colbuilder,all-collections-editor"
138 comment="created at install time"/>
139 <adduser
140 txt2db="${installDir}/bin/darwin/txt2db"
141 usersDb="${installDir}/etc/users.gdb"
142 username="demo"
143 password="demo"
144 groups="demo"
145 comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
146 </target>
147
148 <target name="Installing Documented Examples">
149 <copy todir="${installDir}/collect">
150 <fileset dir="${orig.dir}/Documented Examples" includes="documented-examples/**/*"/>
151 </copy>
152 </target>
153
154
155</project>
Note: See TracBrowser for help on using the repository browser.