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

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

fixes to make mark in sync with lirk

File size: 3.8 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="Installing Core System" 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
36 <echo>Installing Core Files</echo>
37 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="core.lzma"/></patternset></unzip>
38 <sevenzip task="decode" input="${basedir}/core.lzma" output="${basedir}/core.comp"/>
39 <delete file="core.lzma"/>
40 <unzip src="${basedir}/core.comp" dest="${installDir}"/>
41 <delete file="core.comp"/>
42
43 <echo message="Installing Servers"/>
44 <copy tofile="${installDir}/cgi-bin/oaiserver" file="${installDir}/bin/darwin/oaiserver"/>
45 <copy tofile="${installDir}/cgi-bin/library" file="${installDir}/bin/darwin/library"/>
46
47 <echo message="Setting Binaries to Executable"/>
48 <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
49 <chmod dir="${installDir}/bin/darwin" includes="*" perm="775"/>
50 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
51 <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
52 <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
53 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
54 <echo/>
55
56 <echo message="Filling in concrete values in config files"/>
57 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
58 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
59 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
60 <echo/>
61
62 <echo message="Creating admin and demo users"/>
63 <adduser txt2db="${installDir}/bin/linux/txt2db"
64 usersDb="${installDir}/etc/users.db"
65 username="admin"
66 password="${admin.password}"
67 groups="administrator,colbuilder"
68 comment="created at install time"/>
69 <adduser
70 txt2db="${installDir}/bin/linux/txt2db"
71 usersDb="${installDir}/etc/users.db"
72 username="demo"
73 password="demo"
74 groups="demo"
75 comment="Dummy 'demo' user with password 'demo' for authen-e collection"/>
76
77 <!-- delete unneeded files -->
78 <echo message="Deleting some unneeded files"/>
79 <delete dir="${installDir}/resources/icons"/>
80 <delete file="${installDir}/resources/*.png"/>
81
82 <echo>Creating installation properties file</echo>
83 <echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
84
85 <echo message="Finished"/>
86
87 </target>
88
89 <!-- Source -->
90 <target name="Installing Source Code" depends="">
91 <echo message="Installing Source Code"/>
92 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="sourcecode.lzma"/></patternset></unzip>
93 <sevenzip task="decode" input="${basedir}/sourcecode.lzma" output="${basedir}/sourcecode.comp"/>
94 <delete file="sourcecode.lzma"/>
95 <unzip src="${basedir}/sourcecode.comp" dest="${installDir}"/>
96 <delete file="sourcecode.comp"/>
97
98 </target>
99
100</project>
Note: See TracBrowser for help on using the repository browser.