[14982] | 1 | <?xml version="1.0"?>
|
---|
[16736] | 2 | <project name="opeations-on-gs3home">
|
---|
[14982] | 3 |
|
---|
| 4 | <!-- include standard build file -->
|
---|
| 5 | <import file="${basedir}/build.xml"/>
|
---|
| 6 |
|
---|
| 7 | <property name="documented.collections.home" value="/home/nzdl/for-distributions/collect"/>
|
---|
| 8 | <property name="greenstone3-change-date" value="Tue Feb 20 12:13:42 NZDT 2007"/>
|
---|
| 9 | <property name="gs2build-change-date" value="Wed Dec 13 10:35:57 NZDT 2006"/>
|
---|
| 10 |
|
---|
| 11 | <!-- ====================== DISTRIBUTION Targets ========================= -->
|
---|
| 12 |
|
---|
| 13 | <!-- Create the binaries for Unix/Mac distributions -->
|
---|
| 14 | <target name="prepare-unix" depends="init">
|
---|
| 15 | <antcall target="checkout-gs2build"/>
|
---|
| 16 | <antcall target="checkout-gli"/>
|
---|
| 17 | </target>
|
---|
| 18 |
|
---|
| 19 | <target name="update-unix" depends="init">
|
---|
| 20 | <antcall target="svnupdate-distribution"/>
|
---|
| 21 | <antcall target="delete-windows-files"/>
|
---|
| 22 | </target>
|
---|
| 23 |
|
---|
| 24 | <target name="configure-unix" depends="init">
|
---|
| 25 | <antcall target="configure-c++"/>
|
---|
| 26 | </target>
|
---|
| 27 | <target name="build-unix" depends="init">
|
---|
| 28 | <antcall target="compile-packages"/>
|
---|
| 29 | <antcall target="compile-gs2build"/>
|
---|
| 30 | </target>
|
---|
| 31 |
|
---|
| 32 |
|
---|
[16736] | 33 | <target name="tester-abc">
|
---|
| 34 | <echo>tester ABC</echo>
|
---|
| 35 | </target>
|
---|
[14982] | 36 |
|
---|
| 37 | <!-- creates the base distribution. Needs binaries copied in to it from other greenstones (prepare-os targets) -->
|
---|
| 38 | <target name="create-distribution-1" depends="init" description="do all the initial downloading and setting up">
|
---|
| 39 |
|
---|
[16736] | 40 | <echo>checkout gs2build</echo>
|
---|
[14982] | 41 | <antcall target="checkout-gs2build"/>
|
---|
[16736] | 42 | <echo>done checking out gs2build</echo>
|
---|
[16269] | 43 |
|
---|
[14982] | 44 | <delete><fileset dir="." includes="*.bat"/></delete>
|
---|
| 45 | <delete file="${gli.home}/gems.sh"/>
|
---|
| 46 | <delete dir="${gs2build.home}/gs2build-extra"/>
|
---|
| 47 |
|
---|
| 48 | <antcall target="prepare-tomcat"/>
|
---|
| 49 | <antcall target="prepare-axis"/>
|
---|
| 50 |
|
---|
| 51 | <!-- delete old axis dir -->
|
---|
| 52 | <delete dir="${packages.home}/axis"/>
|
---|
| 53 | <mkdir dir="${web.home}/applet"/>
|
---|
| 54 | <mkdir dir="${web.home}/logs"/>
|
---|
| 55 | <antcall target="prepare-ant"/>
|
---|
| 56 | <antcall target="prepare-collections"/>
|
---|
| 57 |
|
---|
| 58 | <!-- get good XML-Parser - does this work? -->
|
---|
| 59 | <antcall target="get-xml-parser"/>
|
---|
| 60 |
|
---|
[17645] | 61 | <delete>
|
---|
| 62 | <fileset dir="${packages.home}" includes="*.zip"/>
|
---|
| 63 | </delete>
|
---|
[17461] | 64 |
|
---|
[17645] | 65 |
|
---|
[14982] | 66 | <!-- documented collections -->
|
---|
| 67 | <antcall target="get-documented-collections"/>
|
---|
| 68 |
|
---|
| 69 | <delete file="${basedir}/README-CVS.txt"/>
|
---|
| 70 | <delete file="${basedir}/TODO.txt"/>
|
---|
| 71 |
|
---|
| 72 | </target>
|
---|
| 73 |
|
---|
| 74 | <target name="create-distribution-2" description="do all the compilation">
|
---|
| 75 |
|
---|
| 76 | <!-- compile the java stuff -->
|
---|
| 77 | <antcall target="compile-web"/>
|
---|
| 78 | <antcall target="configure-tomcat"/>
|
---|
| 79 | <antcall target="configure-packages-and-indexers"/>
|
---|
| 80 | <antcall target="compile-packages-and-indexers-javaonly"/>
|
---|
| 81 | <antcall target="distclean-packages"/>
|
---|
| 82 | <antcall target="compile-core"/>
|
---|
| 83 | <antcall target="compile-gli"/>
|
---|
| 84 |
|
---|
| 85 | </target>
|
---|
| 86 |
|
---|
| 87 | <target name="create-distribution-3" depends="init" description="Do the rearranging of source code and others">
|
---|
| 88 |
|
---|
| 89 | <!-- delete some source files -->
|
---|
| 90 | <delete dir="${gs2build.home}/source/src"/>
|
---|
| 91 | <delete dir="${gs2build.home}/source/lib"/>
|
---|
| 92 | <delete dir="${gs2build.home}/source/packages"/>
|
---|
| 93 | <delete dir="${gs2build.home}/source/indexers"/>
|
---|
| 94 |
|
---|
| 95 | <!-- generate modified build.xml file -->
|
---|
| 96 | <antcall target="run-xslt-binary"/>
|
---|
| 97 |
|
---|
| 98 | <!-- clean up -->
|
---|
| 99 | <delete><fileset dir="${basedir}" includes="*.bat"/></delete>
|
---|
| 100 | <delete><fileset dir="${basedir}/gli" includes="*.bat"/></delete>
|
---|
| 101 | <delete><fileset dir="${basedir}/gs2build" includes="*.bat"/></delete>
|
---|
| 102 | <delete><fileset dir="${basedir}/bin/script" includes="*.bat"/></delete>
|
---|
| 103 |
|
---|
| 104 | <delete dir="${basedir}/build"/>
|
---|
| 105 | <delete dir="${basedir}/lib/jni"/>
|
---|
| 106 | <delete dir="${basedir}/winutil"/>
|
---|
| 107 | <delete dir="${basedir}/dist-resources"/>
|
---|
| 108 | <delete dir="${basedir}/gs2build/source"/>
|
---|
| 109 |
|
---|
| 110 | <delete file="${basedir}/gs2build/WIN32cfg.h"/>
|
---|
| 111 | <delete file="${basedir}/gs2build/win32.mak"/>
|
---|
| 112 |
|
---|
| 113 | </target>
|
---|
| 114 |
|
---|
| 115 | <!-- Supplementary targets -->
|
---|
| 116 |
|
---|
| 117 | <target name="svnupdate-distribution" depends="init">
|
---|
| 118 | <antcall target="svnupdate-packages"/>
|
---|
| 119 | <antcall target="svnupdate-core"/>
|
---|
| 120 | <antcall target="svnupdate-gs2build"/>
|
---|
| 121 | <antcall target="svnupdate-web"/>
|
---|
| 122 | </target>
|
---|
| 123 |
|
---|
| 124 | <target name="run-xslt-binary" depends="init">
|
---|
[16172] | 125 | <xslt in="${basedir}/build.xml" out="${basedir}/modified-build.xml" style="${lirk3.home}/greenstone3/xsl/convert-build-xml.xsl"/>
|
---|
[14982] | 126 | </target>
|
---|
| 127 |
|
---|
| 128 | <target name="run-xslt-source" depends="init">
|
---|
[16172] | 129 | <xslt in="${basedir}/build.xml" out="${basedir}/modified-build.xml" style="${lirk3.home}/greenstone3/xsl/convert-build-xml-source.xsl"/>
|
---|
[14982] | 130 | </target>
|
---|
| 131 |
|
---|
| 132 | <target name="configure-packages-and-indexers" depends="init">
|
---|
| 133 | <exec executable="${indexers.home}/configure"
|
---|
| 134 | dir="${indexers.home}">
|
---|
| 135 | <arg value="--prefix=${basedir}"/>
|
---|
| 136 | <arg value="--libdir=${lib.jni}"/>
|
---|
| 137 | </exec>
|
---|
| 138 | <exec executable="${javagdbm.home}/configure"
|
---|
| 139 | dir="${javagdbm.home}">
|
---|
| 140 | <arg value="--prefix=${basedir}"/>
|
---|
| 141 | <arg value="--libdir=${lib.jni}"/>
|
---|
| 142 | </exec>
|
---|
| 143 |
|
---|
| 144 | </target>
|
---|
| 145 |
|
---|
| 146 | <target name="compile-packages-and-indexers-javaonly" depends="init">
|
---|
| 147 | <echo>Compiling Indexers</echo>
|
---|
| 148 | <exec executable="make" os="${os.unix}"
|
---|
| 149 | dir="${indexers.home}">
|
---|
| 150 | <arg value="javaonly"/>
|
---|
| 151 | </exec>
|
---|
| 152 | <exec executable="make" os="${os.unix}"
|
---|
| 153 | dir="${indexers.home}">
|
---|
| 154 | <arg value="install-javaonly"/>
|
---|
| 155 | </exec>
|
---|
| 156 | <!-- install the jar files -->
|
---|
| 157 | <copy file="${mg.home}/mg.jar" todir="${lib.jni}"/>
|
---|
| 158 | <copy file="${mgpp.home}/mgpp.jar" todir="${lib.jni}"/>
|
---|
| 159 | <copy file="${lucene.home}/LuceneWrapper.jar" todir="${web.lib}"/>
|
---|
| 160 |
|
---|
| 161 | <!-- javagdbm -->
|
---|
| 162 | <exec executable="make" os="${os.unix}"
|
---|
| 163 | dir="${javagdbm.home}">
|
---|
| 164 | <arg value="javaonly"/>
|
---|
| 165 | </exec>
|
---|
| 166 | <exec executable="make" os="${os.unix}"
|
---|
| 167 | dir="${javagdbm.home}">
|
---|
| 168 | <arg value="installjava"/>
|
---|
| 169 | </exec>
|
---|
| 170 | <!-- install the jar file -->
|
---|
| 171 | <copy file="${javagdbm.home}/javagdbm.jar" todir="${lib.jni}"/>
|
---|
| 172 |
|
---|
| 173 | </target>
|
---|
| 174 |
|
---|
| 175 | <target name="delete-windows-files" depends="init" unless="current.os.iswindows">
|
---|
| 176 | <delete dir="${basedir}/winutil"/>
|
---|
| 177 | <delete>
|
---|
| 178 | <fileset dir="${lib.jni}" includes="*.dll"/>
|
---|
| 179 | </delete>
|
---|
| 180 | </target>
|
---|
| 181 |
|
---|
| 182 | <target name="get-perl-for-windows" depends="init" if="current.os.iswindows">
|
---|
| 183 | <mkdir dir="${gs2build.home}/bin/windows"/>
|
---|
| 184 | <get src="http://www.greenstone.org/gs3files/perl-for-windows.zip"
|
---|
| 185 | dest="${gs2build.home}/bin/windows/perl-for-windows.zip"
|
---|
| 186 | usetimestamp="true"/>
|
---|
| 187 | <unzip src="${gs2build.home}/bin/windows/perl-for-windows.zip"
|
---|
| 188 | dest="${gs2build.home}/bin/windows"/>
|
---|
| 189 | <delete file="${gs2build.home}/bin/windows/perl-for-windows.zip"/>
|
---|
| 190 | </target>
|
---|
| 191 |
|
---|
| 192 | <target name="distclean-packages" depends="init">
|
---|
| 193 | <!-- indexers : just call the make target -->
|
---|
| 194 | <exec executable="make" os="${os.unix}"
|
---|
| 195 | dir="${indexers.home}">
|
---|
| 196 | <arg value="distclean"/>
|
---|
| 197 | </exec>
|
---|
| 198 | <!-- javagdbm -->
|
---|
| 199 | <exec executable="make" os="${os.unix}"
|
---|
| 200 | dir="${javagdbm.home}">
|
---|
| 201 | <arg value="distclean"/>
|
---|
| 202 | </exec>
|
---|
| 203 | </target>
|
---|
| 204 |
|
---|
| 205 | <!-- copy the doc eg colls from /home/nzdl - note we don't include the formatting ones -->
|
---|
| 206 | <target name="get-documented-collections" depends="init">
|
---|
| 207 | <property name="collect.home" value="${basedir}/web/sites/localsite/collect"/>
|
---|
| 208 |
|
---|
| 209 | <!-- <copy todir="${collect.home}/authen-e">
|
---|
| 210 | <fileset dir="${documented.collections.home}/authen-e"/>
|
---|
| 211 | </copy>
|
---|
| 212 | <copy todir="${collect.home}/bibliog1">
|
---|
| 213 | <fileset dir="${documented.collections.home}/bibliog1"/>
|
---|
| 214 | </copy>
|
---|
| 215 | <copy todir="${collect.home}/bibliogr">
|
---|
| 216 | <fileset dir="${documented.collections.home}/bibliogr"/>
|
---|
| 217 | </copy>
|
---|
| 218 | <copy todir="${collect.home}/dls-e">
|
---|
| 219 | <fileset dir="${documented.collections.home}/dls-e"/>
|
---|
| 220 | </copy>
|
---|
| 221 | <copy todir="${collect.home}/dspace-e">
|
---|
| 222 | <fileset dir="${documented.collections.home}/dspace-e"/>
|
---|
| 223 | </copy>
|
---|
| 224 | <copy todir="${collect.home}/gsarch-e">
|
---|
| 225 | <fileset dir="${documented.collections.home}/gsarch-e"/>
|
---|
| 226 | </copy>
|
---|
| 227 | <copy todir="${collect.home}/image-e">
|
---|
| 228 | <fileset dir="${documented.collections.home}/image-e"/>
|
---|
| 229 | </copy>
|
---|
| 230 | <copy todir="${collect.home}/isis-e">
|
---|
| 231 | <fileset dir="${documented.collections.home}/isis-e"/>
|
---|
| 232 | </copy>
|
---|
| 233 | <copy todir="${collect.home}/oai-e">
|
---|
| 234 | <fileset dir="${documented.collections.home}/oai-e"/>
|
---|
| 235 | </copy>
|
---|
| 236 | <copy todir="${collect.home}/pagedimg-e">
|
---|
| 237 | <fileset dir="${documented.collections.home}/pagedimg-e"/>
|
---|
| 238 | </copy>
|
---|
| 239 | <copy todir="${collect.home}/wrdpdf-e">
|
---|
| 240 | <fileset dir="${documented.collections.home}/wrdpdf-e"/>
|
---|
| 241 | </copy>
|
---|
| 242 |
|
---|
| 243 | <copy todir="${collect.home}/garish">
|
---|
| 244 | <fileset dir="${documented.collections.home}/garish"/>
|
---|
| 245 | </copy>
|
---|
| 246 | <copy todir="${collect.home}/marcexam">
|
---|
| 247 | <fileset dir="${documented.collections.home}/marcexam"/>
|
---|
| 248 | </copy>
|
---|
| 249 | <copy todir="${collect.home}/style-e">
|
---|
| 250 | <fileset dir="${documented.collections.home}/style-e"/>
|
---|
| 251 | </copy>
|
---|
| 252 | <copy todir="${collect.home}/wiki">
|
---|
| 253 | <fileset dir="${documented.collections.home}/wiki"/>
|
---|
| 254 | </copy> -->
|
---|
| 255 | </target>
|
---|
| 256 |
|
---|
| 257 | <target name="get-xml-parser" depends="init">
|
---|
| 258 | <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz" dest="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz" usetimestamp="true"/>
|
---|
| 259 | <untar src="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz" dest="${gs2build.home}/perllib/cpan/" compression="gzip"/>
|
---|
| 260 | <delete file="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"/>
|
---|
| 261 | </target>
|
---|
| 262 |
|
---|
| 263 | <!-- <target name="create-changelog"> -->
|
---|
| 264 | <!-- generate greenstone 3 changelog -->
|
---|
| 265 | <!-- <exec executable="/home/nzdl/for-distributions/bin/script/cvs2cl.pl"
|
---|
| 266 | dir="${basedir}">
|
---|
| 267 | <arg value="-P"/>
|
---|
| 268 | <arg value="-F"/>
|
---|
| 269 | <arg value="trunk"/>
|
---|
| 270 | <arg value="-r"/>
|
---|
| 271 | <arg value="-S"/>
|
---|
| 272 | <arg value="-l"/>
|
---|
| 273 | <arg value="-d'${greenstone3-change-date}<tomorrow'"/>
|
---|
| 274 | <arg value="-f"/>
|
---|
| 275 | <arg value="greenstone-${app.version}-ChangeLog.txt"/>
|
---|
| 276 | <arg value="-I"/>
|
---|
| 277 | <arg value="gli/.*|gs2build/.*"/>
|
---|
| 278 | </exec> -->
|
---|
| 279 | <!-- generate coll building change log -->
|
---|
| 280 | <!-- <exec executable="/home/nzdl/for-distributions/bin/script/cvs2cl.pl"
|
---|
| 281 | dir="${basedir}">
|
---|
| 282 | <arg value="-P"/>
|
---|
| 283 | <arg value="-F"/>
|
---|
| 284 | <arg value="trunk"/>
|
---|
| 285 | <arg value="-r"/>
|
---|
| 286 | <arg value="-S"/>
|
---|
| 287 | <arg value="-l"/>
|
---|
| 288 | <arg value="-d'${gs2build-change-date}<tomorrow'"/>
|
---|
| 289 | <arg value="-f"/>
|
---|
| 290 | <arg value="greenstone-${app.version}-ChangeLog-collbuilding.txt"/>
|
---|
| 291 | <arg value="gli"/>
|
---|
| 292 | <arg value="gs2build"/>
|
---|
| 293 | </exec>
|
---|
| 294 | </target> -->
|
---|
| 295 |
|
---|
| 296 |
|
---|
| 297 | <!-- new targets to go in distribution build.xml files -->
|
---|
| 298 |
|
---|
| 299 | <!-- new usage target for binary release -->
|
---|
| 300 | <target name="usage-for-binary-dist" description="Print a help message">
|
---|
| 301 | <echo message=" Execute 'ant -projecthelp' for a list of targets."/>
|
---|
| 302 | <echo message=" Execute 'ant -help' for Ant help."/>
|
---|
| 303 | </target>
|
---|
| 304 |
|
---|
| 305 |
|
---|
| 306 | <!-- new install target for source distribution -->
|
---|
| 307 | <target name="install-for-source-dist" depends="init" description="install the source distribution. Includes configuring and compiling">
|
---|
| 308 | <antcall target="unzip-windows-packages"/>
|
---|
| 309 | <!-- do the java version dependent stuff -->
|
---|
| 310 | <antcall target="configure-java-version"/>
|
---|
| 311 | <antcall target="install-macos-extra"/>
|
---|
| 312 | <!-- set gsdlhome in setup.bat -->
|
---|
| 313 | <antcall target="gs2build-edit-setup-bat"/>
|
---|
| 314 | <antcall target="install-indexer-files"/>
|
---|
| 315 | <antcall target="configure"/>
|
---|
| 316 | <antcall target="configure-c++"/>
|
---|
| 317 | <antcall target="compile"/>
|
---|
| 318 | <!-- make sure we have execute permission for the .sh files -->
|
---|
| 319 | <chmod dir="${basedir}" perm="ugo+rx"
|
---|
| 320 | includes="*.sh"/>
|
---|
| 321 |
|
---|
| 322 | </target>
|
---|
| 323 |
|
---|
| 324 | </project>
|
---|