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

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

getting apache going for mac too

File size: 6.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 <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 <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"/>
36
37 <echo message="Installing Servers"/>
38 <copy tofile="${installDir}/cgi-bin/oaiserver.cgi" file="${installDir}/bin/darwin/oaiserver.cgi"/>
39 <copy tofile="${installDir}/cgi-bin/library.cgi" file="${installDir}/bin/darwin/library.cgi"/>
40
41 <echo message="Setting Binaries to Executable"/>
42 <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
43 <chmod dir="${installDir}/bin/darwin" includes="*" perm="775"/>
44 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
45 <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
46 <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
47 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
48 <chmod dir="${installDir}/apache-httpd/darwin/bin" includes="*" perm="775"/>
49 <chmod dir="${installDir}/apache-httpd/darwin" includes="*.sh" perm="775"/>
50 <echo/>
51
52 <echo message="Filling in concrete values in config files"/>
53 <copy file="${installDir}/cgi-bin/gsdlsite.cfg.in" tofile="${installDir}/cgi-bin/gsdlsite.cfg"/>
54 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
55 <echo/>
56
57 <echo message="Creating admin and demo users"/>
58 <adduser txt2db="${installDir}/bin/darwin/txt2db"
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
65 txt2db="${installDir}/bin/darwin/txt2db"
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
72 <!-- delete unneeded files -->
73 <echo message="Deleting some unneeded files"/>
74 <delete dir="${installDir}/resources/icons"/>
75 <delete file="${installDir}/resources/*.png"/>
76
77 <echo>Setting up apache web server</echo>
78 <exec dir="${installDir}" executable="${installDir}/apache-httpd/darwin/install-bindist.sh">
79 <arg value="${installDir}/apache-httpd/darwin"/>
80 </exec>
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 <!-- ImageMagick -->
90 <target name="Installing ImageMagick" depends="">
91 <echo message="Installing ImageMagick"/>
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 <chmod dir="${installDir}/bin/darwin/imagemagick/bin" includes="*" perm="775"/>
98 </target>
99
100 <!-- Ghostscript -->
101 <target name="Installing Ghostscript" depends="">
102 <echo message="Installing Ghostscript"/>
103 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="ghostscript.lzma"/></patternset></unzip>
104 <sevenzip task="decode" input="${basedir}/ghostscript.lzma" output="${basedir}/ghostscript.comp"/>
105 <delete file="ghostscript.lzma"/>
106 <unzip src="${basedir}/ghostscript.comp" dest="${installDir}/bin/darwin" />
107 <delete file="ghostscript.comp"/>
108 <chmod dir="${installDir}/bin/darwin/ghostscript/bin" includes="*" perm="775"/>
109 </target>
110
111
112 <target name="Source Release" depends="">
113
114 <!-- create the installation directory -->
115 <echo message="Creating Installation directory"/>
116 <mkdir dir="${installDir}"/>
117
118 <echo>Installing Source Release</echo>
119 <unzip src="${antinstaller.jar}" dest="${basedir}"><patternset><include name="source-release.lzma"/></patternset></unzip>
120 <sevenzip task="decode" input="${basedir}/source-release.lzma" output="${basedir}/source-release.comp"/>
121 <delete file="source-release.lzma"/>
122 <unzip src="${basedir}/source-release.comp" dest="${installDir}"/>
123 <delete file="source-release.comp"/>
124
125 <echo message="Setting Binaries to Executable"/>
126 <chmod dir="${installDir}" includes="*.sh,*.bash" perm="775"/>
127 <chmod dir="${installDir}/bin/darwin" includes="*" perm="775"/>
128 <chmod dir="${installDir}/bin" includes="*" perm="775"/>
129 <chmod dir="${installDir}/cgi-bin" includes="*" perm="775"/>
130 <chmod dir="${installDir}/bin/script" includes="**/*" perm="775"/>
131 <chmod dir="${installDir}/gli" includes="*.sh" perm="775"/>
132 <echo/>
133
134 <echo message="Filling in concrete values in config files"/>
135 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="\*\*GSDLHOME\*\*" replacement="${installDir}"/>
136 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpprefix).*" replacement="$1 /gsdl"/>
137 <rsr file="${installDir}/cgi-bin/gsdlsite.cfg" pattern="^(#?httpimg).*" replacement="$1 /gsdl/images"/>
138 <echo/>
139
140 <echo>Create usage.txt</echo>
141 <echo file="${installDir}/etc/usage.txt"></echo>
142
143 <echo>Creating installation properties file</echo>
144 <echo file="${installDir}/etc/installation.properties">#this file is just a placeholder for now</echo>
145
146 <echo message="Finished"/>
147
148 </target>
149
150
151
152</project>
Note: See TracBrowser for help on using the repository browser.