source: release-kits/lirk2/installer/build.xml@ 17764

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

made the target tree look nicer

File size: 6.4 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"/>
[17396]18 <taskdef name="sevenzip" classname="org.apache.tools.ant.SevenZip" classpathref="project.classpath"/>
[14982]19
[15142]20 <condition property="bundled.java.exists">
[17396]21 <available file="../@linux-java.extracted@/bin/java"/>
[15142]22 </condition>
23
[17764]24 <target name="Initialise" if="bundled.java.exists">
[17754]25 <mkdir dir="${installDir}"/>
26 <copy todir="${installDir}/packages/jre" failonerror="false">
27 <fileset dir="../@linux-java.extracted@"/>
28 </copy>
29 <chmod dir="${installDir}/packages/jre/bin" includes="*" perm="775"/>
30 </target>
[15142]31
[17576]32 <!-- core system -->
[17764]33 <target name="Installing Core System">
[14982]34
35 <mkdir dir="${installDir}"/>
36
[17152]37 <echo>Installing Core Files</echo>
[17396]38 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
39 <sevenzip task="decode" input="${basedir}/core.lzma" output="${basedir}/core.comp"/>
40 <delete file="core.lzma"/>
41 <unzip src="${basedir}/core.comp" dest="${installDir}"/>
42 <delete file="core.comp"/>
[14982]43
[17437]44 <echo message="Installing Servers"/>
45 <copy tofile="${installDir}/cgi-bin/oaiserver" file="${installDir}/bin/linux/oaiserver"/>
46 <copy tofile="${installDir}/cgi-bin/library" file="${installDir}/bin/linux/library"/>
47
[17152]48 <echo>Setting Binaries to Executable</echo>
[15980]49 <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
50 <chmod dir="${installDir}/bin/linux" includes="*" perm="775"/>
[17470]51 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
[15980]52 <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
53 <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
[14982]54 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
55 <echo/>
56
[17152]57 <echo>Filling in concrete values in config files</echo>
[16832]58 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
[17075]59 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
60 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
[16832]61 <echo/>
62
[17152]63 <echo>Creating admin and demo users</echo>
[17107]64 <adduser txt2db="${installDir}/bin/linux/txt2db"
65 usersDb="${installDir}/etc/users.db"
66 username="admin"
67 password="${admin.password}"
68 groups="administrator,colbuilder"
69 comment="created at install time"/>
70 <adduser
71 txt2db="${installDir}/bin/linux/txt2db"
72 usersDb="${installDir}/etc/users.db"
73 username="demo"
74 password="demo"
75 groups="demo"
76 comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
77
[17152]78 <echo>Set the installation locale in config files</echo>
79 <rsr file="${installDir}/setup.bash" pattern="^gsdllang=.*" replacement="gsdllang=${language}"/>
80 <rsr file="${installDir}/gli/gli.sh" pattern="^glilang=.*" replacement="glilang=${language}"/>
81 <rsr file="${installDir}/gli/gems.sh" pattern="^glilang=.*" replacement="glilang=${language}"/>
82
83 <rsr
84 file="${installDir}/gli/classes/xml/config.xml"
85 pattern="(&lt;Argument name=&quot;general.locale&quot;&gt;).*(&lt;/Argument&gt;)"
86 replacement="$1${language}$2"/>
87
88 <echo file="${installDir}/etc/main.cfg" append="true"
89 >cgiarg shortname=l argdefault=${language}</echo>
90
91 <rsr file="${installDir}/etc/main.cfg" pattern="^status .*" replacement="status enabled"/>
92
[17257]93 <echo>Creating installation properties file</echo>
94 <echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
95
[15142]96 <echo message="Finished"/>
97
[14982]98 </target>
99
[17650]100 <!-- sourcecode core system -->
101 <target name="Installing Source Code Core">
102
103 <echo>Installing Source Code Core</echo>
104 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode-core.lzma"/></patternset></unzip>
105 <sevenzip task="decode" input="${basedir}/sourcecode-core.lzma" output="${basedir}/sourcecode-core.comp"/>
106 <delete file="sourcecode-core.lzma"/>
107 <unzip src="${basedir}/sourcecode-core.comp" dest="${installDir}"/>
108 <delete file="sourcecode-core.comp"/>
109
110 <echo>Set the installation locale in config files</echo>
111 <rsr file="${installDir}/setup.bash" pattern="^gsdllang=.*" replacement="gsdllang=${language}"/>
112 <rsr file="${installDir}/gli/gli.sh" pattern="^glilang=.*" replacement="glilang=${language}"/>
113 <rsr file="${installDir}/gli/gems.sh" pattern="^glilang=.*" replacement="glilang=${language}"/>
114
115 <rsr
116 file="${installDir}/gli/classes/xml/config.xml"
117 pattern="(&lt;Argument name=&quot;general.locale&quot;&gt;).*(&lt;/Argument&gt;)"
118 replacement="$1${language}$2"/>
119
120 <echo file="${installDir}/etc/main.cfg" append="true"
121 >cgiarg shortname=l argdefault=${language}</echo>
122
123 <rsr file="${installDir}/etc/main.cfg" pattern="^status .*" replacement="status enabled"/>
124
125 <echo>Creating installation properties file</echo>
126 <echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
127
128 </target>
129
130
[17576]131 <!-- source code -->
132 <target name="Installing Source Code">
[17152]133 <echo>Installing Source Code</echo>
[17396]134 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode.lzma"/></patternset></unzip>
135 <sevenzip task="decode" input="${basedir}/sourcecode.lzma" output="${basedir}/sourcecode.comp"/>
136 <delete file="sourcecode.lzma"/>
137 <unzip src="${basedir}/sourcecode.comp" dest="${installDir}"/>
138 <delete file="sourcecode.comp"/>
[14982]139 </target>
140
[17646]141 <!-- imagemagick -->
142 <target name="Installing ImageMagick">
143 <echo>Installing ImageMagick</echo>
144 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="imagemagick.lzma"/></patternset></unzip>
145 <sevenzip task="decode" input="${basedir}/imagemagick.lzma" output="${basedir}/imagemagick.comp"/>
146 <delete file="imagemagick.lzma"/>
147 <unzip src="${basedir}/imagemagick.comp" dest="${installDir}/bin/linux"/>
148 <delete file="imagemagick.comp"/>
[17700]149
150 <echo>Setting ImageMagick Binaries to Executable</echo>
151 <chmod dir="${installDir}/bin/linux/imagemagick/bin" includes="*" perm="775"/>
152
[17646]153 </target>
154
[14982]155</project>
Note: See TracBrowser for help on using the repository browser.