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