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

Last change on this file since 17470 was 17470, checked in by oranfry, 16 years ago

chamges to installer build.xmls

File size: 4.3 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 <condition property="bundled.java.exists">
21 <available file="../@java.extracted@/bin/java"/>
22 </condition>
23
24
25 <target name="install-core-components" depends="">
26
27 <echo>basedir: ${basedir}</echo>
28 <echo>installDir: ${installDir}</echo>
29 <echo>antinstaller.jar: ${antinstaller.jar}</echo>
30
31 <!-- create the installation directory -->
32 <echo message="Creating Installation directory"/>
33 <mkdir dir="${installDir}"/>
34
35 <!-- install files -->
36 <echo message="Installing Core Files"/>
37 <unzip src="${antinstaller.jar}" dest="${installDir}">
38 <patternset>
39
40 <include name="gli/**/*"/>
41 <include name="bin/**/*"/>
42 <include name="cgi-bin/**/*"/>
43 <include name="etc/**/*"/>
44 <include name="mappings/**/*"/>
45 <include name="images/**/*"/>
46 <include name="perllib/**/*"/>
47 <include name="indexers/**/*"/>
48 <include name="macros/**/*"/>
49 <include name="collect/**/*"/>
50
51 <include name="Install.sh"/>
52 <include name="setup.bash"/>
53 <include name="setup.csh"/>
54 <include name="LICENSE.txt"/>
55 <include name="READMEar.txt"/>
56 <include name="READMEen.txt"/>
57 <include name="READMEes.txt"/>
58 <include name="READMEfr.txt"/>
59 <include name="READMEes.txt"/>
60 <include name="Support.htm"/>
61 <include name="Uninstall.jar"/>
62 </patternset>
63 </unzip>
64 <echo/>
65
66 <echo message="Installing Servers"/>
67 <copy tofile="${installDir}/cgi-bin/oaiserver" file="${installDir}/bin/darwin/oaiserver"/>
68 <copy tofile="${installDir}/cgi-bin/library" file="${installDir}/bin/darwin/library"/>
69
70 <echo message="Setting Binaries to Executable"/>
71 <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
72 <chmod dir="${installDir}/bin/darwin" includes="*" perm="775"/>
73 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
74 <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
75 <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
76 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
77 <echo/>
78
79 <echo message="Filling in concrete values in config files"/>
80 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
81 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
82 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
83 <echo/>
84
85 <echo message="Creating admin and demo users"/>
86 <adduser txt2db="${installDir}/bin/linux/txt2db"
87 usersDb="${installDir}/etc/users.db"
88 username="admin"
89 password="${admin.password}"
90 groups="administrator,colbuilder"
91 comment="created at install time"/>
92 <adduser
93 txt2db="${installDir}/bin/linux/txt2db"
94 usersDb="${installDir}/etc/users.db"
95 username="demo"
96 password="demo"
97 groups="demo"
98 comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
99
100 <!-- delete unneeded files -->
101 <echo message="Deleting some unneeded files"/>
102 <delete dir="${installDir}/resources/icons"/>
103 <delete file="${installDir}/resources/*.png"/>
104
105 <echo>Creating installation properties file</echo>
106 <echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
107
108 <echo message="Finished"/>
109
110 </target>
111
112 <!-- Source -->
113 <target name="install-source-code" depends="">
114 <echo message="Installing Source Code"/>
115 <unzip src="${antinstaller.jar}" dest="${installDir}">
116 <patternset>
117 <include name="common-src/**/*"/>
118 <include name="runtime-src/**/*"/>
119 <include name="build-src/**/*"/>
120 <include name="packages/**/*"/>
121 </patternset>
122 </unzip>
123 </target>
124
125 <target name="cleanuptarget"></target>
126
127
128</project>
Note: See TracBrowser for help on using the repository browser.