[20335] | 1 | <?xml version="1.0" encoding="utf-8" ?>
|
---|
| 2 | <project name="rk3-compile">
|
---|
| 3 |
|
---|
| 4 | <target name="compile">
|
---|
[21630] | 5 |
|
---|
| 6 | <!-- checkout greenstone3 -->
|
---|
| 7 | <exec executable="svn">
|
---|
| 8 | <arg value="checkout"/>
|
---|
| 9 | <arg value="${svn.root}/main/${branch.path}/greenstone3"/>
|
---|
| 10 | <arg value="compiled"/>
|
---|
[21652] | 11 | <arg value="-r"/><arg value="${branch.revision}"/>
|
---|
[21630] | 12 | </exec>
|
---|
| 13 |
|
---|
[23811] | 14 | <if><bool><equals arg1="${with.jni}" arg2="false"/></bool>
|
---|
| 15 | <rsr file="${basedir}/compiled/build.properties.in" pattern="with.jni=true" replacement="#with.jni=true"/>
|
---|
| 16 | </if>
|
---|
| 17 |
|
---|
| 18 | <if><bool><equals arg1="${with.gli.and.gems}" arg2="false"/></bool>
|
---|
| 19 | <rsr file="${basedir}/compiled/build.properties.in" pattern="with.gli.and.gems=true" replacement="#with.gli.and.gems=true"/>
|
---|
| 20 | </if>
|
---|
| 21 |
|
---|
[21748] | 22 | <!-- make sure all c++ compilation is done statically on linux -->
|
---|
| 23 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
| 24 | <property name="forward.compile.static" value="true"/>
|
---|
| 25 | </if>
|
---|
| 26 |
|
---|
[22851] | 27 | <!-- make sure the c++ compilation can see the support library in the extension folder -->
|
---|
| 28 | <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
|
---|
| 29 | <property name="forward.use.support.lib" value="true"/>
|
---|
| 30 | </if>
|
---|
| 31 |
|
---|
| 32 | <antcall target="persist-forwarded-properties">
|
---|
| 33 | <param name="greenstone3basedir" value="compiled"/>
|
---|
| 34 | </antcall>
|
---|
| 35 |
|
---|
[21630] | 36 | <!-- run greenstone3's ant prepare -->
|
---|
[20335] | 37 | <ant dir="compiled" inheritAll="false">
|
---|
| 38 | <target name="prepare"/>
|
---|
| 39 | <propertyset refid="forward.properties"/>
|
---|
[21748] | 40 | <property name="properties.accepted" value="true"/>
|
---|
[20335] | 41 | </ant>
|
---|
[21630] | 42 |
|
---|
| 43 | <!-- set all version numbers -->
|
---|
| 44 | <antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="compiled"/></antcall>
|
---|
| 45 | <antcall target="gli-set-version-numbers"><param name="glibasedir" value="compiled/gli"/></antcall>
|
---|
| 46 | <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="compiled/gs2build"/></antcall>
|
---|
| 47 |
|
---|
[22836] | 48 | <!-- mac or linux: compile the support library -->
|
---|
| 49 | <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
|
---|
| 50 | <!-- checkout the gnome support library extension-->
|
---|
[22939] | 51 | <if><bool><or>
|
---|
[23618] | 52 | <equals arg1="${post.2.83.version}" arg2="true"/>
|
---|
[22939] | 53 | </or></bool>
|
---|
[23612] | 54 | <echo>EXPORTING GNOME LIB EXTENSION</echo>
|
---|
[22836] | 55 | <exec executable="svn">
|
---|
[23612] | 56 | <arg value="export"/>
|
---|
[23644] | 57 | <arg value="${svn.root}/gs2-extensions/gnome-lib/trunk/gnome-lib-minimal-${os.shell}${arch}${extension-x64}.tar.gz"/>
|
---|
[23612] | 58 | <arg value="${basedir}/compiled/ext/gnome-lib-${os.shell}.tar.gz"/>
|
---|
[22836] | 59 | </exec>
|
---|
[23612] | 60 |
|
---|
| 61 | <exec executable="tar" dir="${basedir}/compiled/ext">
|
---|
| 62 | <arg value="xvzf"/>
|
---|
| 63 | <arg value="gnome-lib-${os.shell}.tar.gz"/>
|
---|
| 64 | </exec>
|
---|
| 65 |
|
---|
| 66 | <exec executable="/bin/bash" dir="${basedir}/compiled/ext/gnome-lib-minimal">
|
---|
[22836] | 67 | <arg value="-c"/>
|
---|
[24389] | 68 | <arg value="source setup.bash_old && source devel.bash"/>
|
---|
[22836] | 69 | </exec>
|
---|
[22939] | 70 | <echo>DONE COMPILING GNOME LIB EXTENSION</echo>
|
---|
[22941] | 71 | </if>
|
---|
[22836] | 72 | </if>
|
---|
| 73 |
|
---|
[21630] | 74 | <!-- run greenstone3's ant install and ant dist-tidy -->
|
---|
[20335] | 75 | <ant dir="compiled" inheritAll="false">
|
---|
| 76 | <target name="install"/>
|
---|
| 77 | <target name="dist-tidy"/>
|
---|
| 78 | <propertyset refid="forward.properties"/>
|
---|
[21748] | 79 | <property name="properties.accepted" value="true"/>
|
---|
[20335] | 80 | </ant>
|
---|
| 81 |
|
---|
[23967] | 82 | <!-- Delete all collections apart from the Lucene demo collection -->
|
---|
| 83 | <delete dir="${basedir}/compiled/web/sites/localsite/collect/gberg"/>
|
---|
| 84 | <delete dir="${basedir}/compiled/web/sites/localsite/collect/gs2mgdemo"/>
|
---|
| 85 | <delete dir="${basedir}/compiled/web/sites/localsite/collect/gs2mgppdemo"/>
|
---|
| 86 | <delete dir="${basedir}/compiled/web/sites/localsite/collect/infomine"/>
|
---|
| 87 |
|
---|
[22851] | 88 | <!-- Delete the entire gnome support library on Linux -->
|
---|
| 89 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
[23618] | 90 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal"/>
|
---|
| 91 | <delete file="${basedir}/compiled/ext/gnome-lib-linux.tar.gz"/>
|
---|
[22851] | 92 | </if>
|
---|
| 93 |
|
---|
| 94 | <!-- Delete all but the lib folder of the gnome support library on Mac -->
|
---|
| 95 | <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
[23618] | 96 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/cascade-make"/>
|
---|
| 97 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/packages"/>
|
---|
| 98 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/bin"/>
|
---|
| 99 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/etc"/>
|
---|
| 100 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/include"/>
|
---|
| 101 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/share"/>
|
---|
| 102 | <delete file="${basedir}/compiled/ext/gnome-lib-minimal/setup.bat"/>
|
---|
| 103 | <delete file="${basedir}/compiled/ext/gnome-lib-minimal/CASCADE-MAKE.sh"/>
|
---|
| 104 | <delete file="${basedir}/compiled/ext/gnome-lib-darwin.tar.gz"/>
|
---|
[22851] | 105 | </if>
|
---|
| 106 |
|
---|
[21630] | 107 | <!-- insert an xml parser -->
|
---|
| 108 | <copy todir="compiled/gs2build/perllib/cpan">
|
---|
[22425] | 109 | <fileset dir="${rk.home}/shared/linux" includes="XML-Parser/**/*"/>
|
---|
[21630] | 110 | </copy>
|
---|
| 111 |
|
---|
[21842] | 112 | <!-- insert ant -->
|
---|
| 113 | <mkdir dir="compiled/packages"/>
|
---|
| 114 | <get src="http://www.greenstone.org/gs3files/apache-ant-1.8.0-bin.tar.gz" dest="compiled/packages/apache-ant-1.8.0-bin.tar.gz"/>
|
---|
| 115 | <untar src="compiled/packages/apache-ant-1.8.0-bin.tar.gz" dest="compiled/packages/" compression="gzip"/>
|
---|
| 116 | <move file="compiled/packages/apache-ant-1.8.0" tofile="compiled/packages/ant"/>
|
---|
| 117 | <delete file="compiled/packages/apache-ant-1.8.0-bin.tar.gz"/>
|
---|
[21630] | 118 |
|
---|
| 119 | <!-- put the uninstaller in place -->
|
---|
| 120 | <antcall target="insert-and-compile-uninstaller"/>
|
---|
| 121 |
|
---|
| 122 | <!-- (windows only) -->
|
---|
[20335] | 123 | <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
[21630] | 124 | <!-- insert perl -->
|
---|
| 125 | <unzip src="${rk.home}/shared/windows/perl.zip" dest="compiled/gs2build/bin/windows"/>
|
---|
[20335] | 126 | </if>
|
---|
[21630] | 127 |
|
---|
| 128 | <!-- minify tomcat -->
|
---|
| 129 | <delete dir="compiled/packages/tomcat/webapps/docs"/>
|
---|
| 130 | <delete dir="compiled/packages/tomcat/webapps/examples"/>
|
---|
| 131 |
|
---|
| 132 | <!-- tidy up gli to make it smaller -->
|
---|
| 133 | <antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></antcall>
|
---|
| 134 |
|
---|
| 135 | <!-- strip out .svn dirs -->
|
---|
| 136 | <antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall>
|
---|
| 137 |
|
---|
[24089] | 138 | <!-- (linux only) -->
|
---|
| 139 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
| 140 | <!-- grab imagemagick binaries -->
|
---|
| 141 | <delete dir="compiled/gs2build/bin/linux/imagemagick"/>
|
---|
| 142 | <exec executable="svn">
|
---|
| 143 | <arg value="export"/>
|
---|
| 144 | <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
|
---|
| 145 | <arg value="compiled/gs2build/bin/linux/imagemagick"/>
|
---|
| 146 | </exec>
|
---|
| 147 |
|
---|
| 148 | <!-- grab wv binaries -->
|
---|
| 149 | <delete dir="compiled/gs2build/bin/linux/wv"/>
|
---|
| 150 | <exec executable="svn">
|
---|
| 151 | <arg value="export"/>
|
---|
| 152 | <arg value="${svn.root}/main/${branch.path}/binaries/linux/wv"/>
|
---|
| 153 | <arg value="compiled/gs2build/bin/linux/wv"/>
|
---|
| 154 | </exec>
|
---|
| 155 | <!-- (mac only) -->
|
---|
| 156 | <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
| 157 | <!-- grab imagemagick binaries -->
|
---|
| 158 | <delete dir="compiled/gs2build/bin/darwin/imagemagick"/>
|
---|
| 159 | <exec executable="svn">
|
---|
| 160 | <arg value="export"/>
|
---|
| 161 | <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
|
---|
| 162 | <arg value="compiled/gs2build/bin/darwin/imagemagick"/>
|
---|
| 163 | </exec>
|
---|
| 164 |
|
---|
| 165 | <if><bool><not><equals arg1="${forward.install.flax}" arg2="true"/></not></bool>
|
---|
| 166 | <!-- grab ghostscript binaries -->
|
---|
| 167 | <delete dir="compiled/gs2build/bin/darwin/ghostscript"/>
|
---|
| 168 | <exec executable="svn">
|
---|
| 169 | <arg value="export"/>
|
---|
| 170 | <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
|
---|
| 171 | <arg value="compiled/gs2build/bin/darwin/ghostscript"/>
|
---|
| 172 | </exec>
|
---|
| 173 | </if>
|
---|
| 174 | </if></else></if>
|
---|
| 175 |
|
---|
[24053] | 176 | <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
[24084] | 177 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/gs2build/bin/windows/perl/bin/perl">
|
---|
[24053] | 178 | <arg line="-S"/>
|
---|
[24094] | 179 | <arg line="gs2build/bin/script/import.pl -removeold -site localsite lucene-jdbm-demo"/>
|
---|
[24053] | 180 | <env key="GSDLHOME" path="${basedir}/compiled/gs2build"/>
|
---|
[24085] | 181 | <env key="GSDL3HOME" path="${basedir}/compiled/web"/>
|
---|
| 182 | <env key="GSDL3SRCHOME" path="${basedir}/compiled"/>
|
---|
[24053] | 183 | <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/web/sites/localsite/collect"/>
|
---|
[24094] | 184 | <env key="GSDLOS" value="windows"/>
|
---|
[24097] | 185 | <env key="PATH" path="${basedir}/compiled/gs2build/bin/windows/perl/bin;${basedir}/compiled/gs2build/bin/windows;${basedir}/compiled/gs2build/bin/script;${env.PATH}"/>
|
---|
[24053] | 186 | </exec>
|
---|
[24084] | 187 | <exec dir="${basedir}/compiled" executable="${basedir}/compiled/gs2build/bin/windows/perl/bin/perl">
|
---|
[24053] | 188 | <arg line="-S"/>
|
---|
[24094] | 189 | <arg line="gs2build/bin/script/buildcol.pl -removeold -site localsite lucene-jdbm-demo"/>
|
---|
[24053] | 190 | <env key="GSDLHOME" path="${basedir}/compiled/gs2build"/>
|
---|
[24085] | 191 | <env key="GSDL3HOME" path="${basedir}/compiled/web"/>
|
---|
| 192 | <env key="GSDL3SRCHOME" path="${basedir}/compiled"/>
|
---|
[24053] | 193 | <env key="GSDLCOLLECTDIR" path="${basedir}/compiled/web/sites/localsite/collect"/>
|
---|
[24094] | 194 | <env key="GSDLOS" value="windows"/>
|
---|
[24097] | 195 | <env key="PATH" path="${basedir}/compiled/gs2build/bin/windows/perl/bin;${basedir}/compiled/gs2build/bin/windows;${basedir}/compiled/gs2build/bin/script;${env.PATH}"/>
|
---|
[24053] | 196 | </exec>
|
---|
[24088] | 197 | <delete dir="${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/index"/>
|
---|
[24092] | 198 | <move file="${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/building" tofile="${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/index"/>
|
---|
[24053] | 199 | <else>
|
---|
| 200 | <echo file="${basedir}/compiled/buildscript.sh">
|
---|
| 201 | #!/bin/bash
|
---|
| 202 | source gs3-setup.sh
|
---|
| 203 | /usr/bin/perl -S ${basedir}/compiled/gs2build/bin/script/import.pl -site localsite lucene-jdbm-demo
|
---|
| 204 | /usr/bin/perl -S ${basedir}/compiled/gs2build/bin/script/buildcol.pl -site localsite lucene-jdbm-demo
|
---|
| 205 | rm -rf ${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/index
|
---|
| 206 | mv ${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/building ${basedir}/compiled/web/sites/localsite/collect/lucene-jdbm-demo/index
|
---|
| 207 | </echo>
|
---|
| 208 | <chmod perm="775" file="${basedir}/compiled/buildscript.sh"/>
|
---|
| 209 | <exec dir="${basedir}/compiled" executable="/bin/bash">
|
---|
| 210 | <arg line="buildscript.sh"/>
|
---|
| 211 | </exec>
|
---|
| 212 | <delete file="${basedir}/compiled/buildscript.sh"/>
|
---|
| 213 | </else>
|
---|
| 214 | </if>
|
---|
[24089] | 215 |
|
---|
[20335] | 216 | </target>
|
---|
| 217 |
|
---|
| 218 | </project>
|
---|