[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="greenstone3-change-date" value="Tue Feb 20 12:13:42 NZDT 2007"/>
|
---|
| 17 | <property name="gs2build-change-date" value="Wed Dec 13 10:35:57 NZDT 2006"/>
|
---|
| 18 |
|
---|
| 19 | <!-- ====================== DISTRIBUTION Targets ========================= -->
|
---|
| 20 |
|
---|
| 21 | <!-- Create the binaries for Unix/Mac distributions -->
|
---|
| 22 | <target name="prepare-unix" depends="init">
|
---|
| 23 | <antcall target="checkout-gs2build"/>
|
---|
| 24 | <antcall target="checkout-gli"/>
|
---|
| 25 | </target>
|
---|
| 26 |
|
---|
| 27 | <target name="update-unix" depends="init">
|
---|
| 28 | <antcall target="svnupdate-distribution"/>
|
---|
| 29 | <antcall target="delete-windows-files"/>
|
---|
| 30 | </target>
|
---|
| 31 |
|
---|
| 32 | <target name="configure-unix" depends="init">
|
---|
| 33 | <antcall target="configure-c++"/>
|
---|
| 34 | </target>
|
---|
| 35 | <target name="build-unix" depends="init">
|
---|
| 36 | <antcall target="compile-packages"/>
|
---|
| 37 | <antcall target="compile-gs2build"/>
|
---|
| 38 | </target>
|
---|
| 39 |
|
---|
| 40 | <!-- creates the base distribution. Needs binaries copied in to it from other greenstones (prepare-os targets) -->
|
---|
| 41 | <target name="create-distribution-1" depends="init" description="do all the initial downloading and setting up">
|
---|
| 42 |
|
---|
| 43 | <antcall target="checkout-gs2build"/>
|
---|
[16269] | 44 |
|
---|
[14982] | 45 | <delete><fileset dir="." includes="*.bat"/></delete>
|
---|
| 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 |
|
---|
[17662] | 61 | <delete>
|
---|
| 62 | <fileset dir="${packages.home}" includes="*.zip"/>
|
---|
| 63 | </delete>
|
---|
[17461] | 64 |
|
---|
[17662] | 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 |
|
---|
[16655] | 110 | <delete file="${basedir}/gs2build/win32cfg.h"/>
|
---|
[14982] | 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">
|
---|
[16655] | 125 | <xslt in="${basedir}/build.xml" out="${basedir}/modified-build.xml" style="${mark3.home}/greenstone3/xsl/convert-build-xml.xsl"/>
|
---|
[14982] | 126 | </target>
|
---|
| 127 |
|
---|
| 128 | <target name="run-xslt-source" depends="init">
|
---|
[16655] | 129 | <xslt in="${basedir}/build.xml" out="${basedir}/modified-build.xml" style="${mark3.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 -->
|
---|
[16655] | 162 | <!-- skip compile, just get compiled jar from /greenstone3 directory
|
---|
[14982] | 163 | <exec executable="make" os="${os.unix}"
|
---|
| 164 | dir="${javagdbm.home}">
|
---|
| 165 | <arg value="javaonly"/>
|
---|
| 166 | </exec>
|
---|
| 167 | <exec executable="make" os="${os.unix}"
|
---|
| 168 | dir="${javagdbm.home}">
|
---|
| 169 | <arg value="installjava"/>
|
---|
| 170 | </exec>
|
---|
[16655] | 171 | -->
|
---|
| 172 |
|
---|
[14982] | 173 | <!-- install the jar file -->
|
---|
[18501] | 174 | <copy file="../../compiled/src/packages/javagdbm/javagdbm.jar" todir="${lib.jni}"/>
|
---|
[14982] | 175 |
|
---|
| 176 | </target>
|
---|
| 177 |
|
---|
| 178 | <target name="delete-windows-files" depends="init" unless="current.os.iswindows">
|
---|
| 179 | <delete dir="${basedir}/winutil"/>
|
---|
| 180 | <delete>
|
---|
| 181 | <fileset dir="${lib.jni}" includes="*.dll"/>
|
---|
| 182 | </delete>
|
---|
| 183 | </target>
|
---|
| 184 |
|
---|
| 185 | <target name="get-perl-for-windows" depends="init" if="current.os.iswindows">
|
---|
| 186 | <mkdir dir="${gs2build.home}/bin/windows"/>
|
---|
| 187 | <get src="http://www.greenstone.org/gs3files/perl-for-windows.zip"
|
---|
| 188 | dest="${gs2build.home}/bin/windows/perl-for-windows.zip"
|
---|
| 189 | usetimestamp="true"/>
|
---|
| 190 | <unzip src="${gs2build.home}/bin/windows/perl-for-windows.zip"
|
---|
| 191 | dest="${gs2build.home}/bin/windows"/>
|
---|
| 192 | <delete file="${gs2build.home}/bin/windows/perl-for-windows.zip"/>
|
---|
| 193 | </target>
|
---|
| 194 |
|
---|
| 195 | <target name="distclean-packages" depends="init">
|
---|
| 196 | <!-- indexers : just call the make target -->
|
---|
| 197 | <exec executable="make" os="${os.unix}"
|
---|
| 198 | dir="${indexers.home}">
|
---|
| 199 | <arg value="distclean"/>
|
---|
| 200 | </exec>
|
---|
| 201 | <!-- javagdbm -->
|
---|
| 202 | <exec executable="make" os="${os.unix}"
|
---|
| 203 | dir="${javagdbm.home}">
|
---|
| 204 | <arg value="distclean"/>
|
---|
| 205 | </exec>
|
---|
| 206 | </target>
|
---|
| 207 |
|
---|
| 208 | <!-- copy the doc eg colls from /home/nzdl - note we don't include the formatting ones -->
|
---|
| 209 | <target name="get-documented-collections" depends="init">
|
---|
| 210 | <property name="collect.home" value="${basedir}/web/sites/localsite/collect"/>
|
---|
| 211 |
|
---|
| 212 | <!-- <copy todir="${collect.home}/authen-e">
|
---|
| 213 | <fileset dir="${documented.collections.home}/authen-e"/>
|
---|
| 214 | </copy>
|
---|
| 215 | <copy todir="${collect.home}/bibliog1">
|
---|
| 216 | <fileset dir="${documented.collections.home}/bibliog1"/>
|
---|
| 217 | </copy>
|
---|
| 218 | <copy todir="${collect.home}/bibliogr">
|
---|
| 219 | <fileset dir="${documented.collections.home}/bibliogr"/>
|
---|
| 220 | </copy>
|
---|
| 221 | <copy todir="${collect.home}/dls-e">
|
---|
| 222 | <fileset dir="${documented.collections.home}/dls-e"/>
|
---|
| 223 | </copy>
|
---|
| 224 | <copy todir="${collect.home}/dspace-e">
|
---|
| 225 | <fileset dir="${documented.collections.home}/dspace-e"/>
|
---|
| 226 | </copy>
|
---|
| 227 | <copy todir="${collect.home}/gsarch-e">
|
---|
| 228 | <fileset dir="${documented.collections.home}/gsarch-e"/>
|
---|
| 229 | </copy>
|
---|
| 230 | <copy todir="${collect.home}/image-e">
|
---|
| 231 | <fileset dir="${documented.collections.home}/image-e"/>
|
---|
| 232 | </copy>
|
---|
| 233 | <copy todir="${collect.home}/isis-e">
|
---|
| 234 | <fileset dir="${documented.collections.home}/isis-e"/>
|
---|
| 235 | </copy>
|
---|
| 236 | <copy todir="${collect.home}/oai-e">
|
---|
| 237 | <fileset dir="${documented.collections.home}/oai-e"/>
|
---|
| 238 | </copy>
|
---|
| 239 | <copy todir="${collect.home}/pagedimg-e">
|
---|
| 240 | <fileset dir="${documented.collections.home}/pagedimg-e"/>
|
---|
| 241 | </copy>
|
---|
| 242 | <copy todir="${collect.home}/wrdpdf-e">
|
---|
| 243 | <fileset dir="${documented.collections.home}/wrdpdf-e"/>
|
---|
| 244 | </copy>
|
---|
| 245 |
|
---|
| 246 | <copy todir="${collect.home}/garish">
|
---|
| 247 | <fileset dir="${documented.collections.home}/garish"/>
|
---|
| 248 | </copy>
|
---|
| 249 | <copy todir="${collect.home}/marcexam">
|
---|
| 250 | <fileset dir="${documented.collections.home}/marcexam"/>
|
---|
| 251 | </copy>
|
---|
| 252 | <copy todir="${collect.home}/style-e">
|
---|
| 253 | <fileset dir="${documented.collections.home}/style-e"/>
|
---|
| 254 | </copy>
|
---|
| 255 | <copy todir="${collect.home}/wiki">
|
---|
| 256 | <fileset dir="${documented.collections.home}/wiki"/>
|
---|
| 257 | </copy> -->
|
---|
| 258 | </target>
|
---|
| 259 |
|
---|
| 260 | <target name="get-xml-parser" depends="init">
|
---|
| 261 | <get src="http://www.greenstone.org/gs3files/XML-Parser.tar.gz" dest="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz" usetimestamp="true"/>
|
---|
| 262 | <untar src="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz" dest="${gs2build.home}/perllib/cpan/" compression="gzip"/>
|
---|
| 263 | <delete file="${gs2build.home}/perllib/cpan/XML-Parser.tar.gz"/>
|
---|
| 264 | </target>
|
---|
| 265 |
|
---|
| 266 | <!-- new targets to go in distribution build.xml files -->
|
---|
| 267 |
|
---|
| 268 | <!-- new usage target for binary release -->
|
---|
| 269 | <target name="usage-for-binary-dist" description="Print a help message">
|
---|
| 270 | <echo message=" Execute 'ant -projecthelp' for a list of targets."/>
|
---|
| 271 | <echo message=" Execute 'ant -help' for Ant help."/>
|
---|
| 272 | </target>
|
---|
| 273 |
|
---|
| 274 |
|
---|
| 275 | <!-- new install target for source distribution -->
|
---|
| 276 | <target name="install-for-source-dist" depends="init" description="install the source distribution. Includes configuring and compiling">
|
---|
| 277 | <antcall target="unzip-windows-packages"/>
|
---|
| 278 | <!-- do the java version dependent stuff -->
|
---|
| 279 | <antcall target="configure-java-version"/>
|
---|
| 280 | <antcall target="install-macos-extra"/>
|
---|
| 281 | <!-- set gsdlhome in setup.bat -->
|
---|
| 282 | <antcall target="gs2build-edit-setup-bat"/>
|
---|
| 283 | <antcall target="install-indexer-files"/>
|
---|
| 284 | <antcall target="configure"/>
|
---|
| 285 | <antcall target="configure-c++"/>
|
---|
| 286 | <antcall target="compile"/>
|
---|
| 287 | <!-- make sure we have execute permission for the .sh files -->
|
---|
| 288 | <chmod dir="${basedir}" perm="ugo+rx"
|
---|
| 289 | includes="*.sh"/>
|
---|
| 290 |
|
---|
| 291 | </target>
|
---|
| 292 |
|
---|
| 293 | </project>
|
---|
| 294 |
|
---|
| 295 |
|
---|