[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 |
|
---|
[21748] | 14 | <!-- make sure all c++ compilation is done statically on linux -->
|
---|
| 15 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
| 16 | <property name="forward.compile.static" value="true"/>
|
---|
| 17 | </if>
|
---|
| 18 |
|
---|
[22851] | 19 | <!-- make sure the c++ compilation can see the support library in the extension folder -->
|
---|
| 20 | <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
|
---|
| 21 | <property name="forward.use.support.lib" value="true"/>
|
---|
| 22 | </if>
|
---|
| 23 |
|
---|
| 24 | <antcall target="persist-forwarded-properties">
|
---|
| 25 | <param name="greenstone3basedir" value="compiled"/>
|
---|
| 26 | </antcall>
|
---|
| 27 |
|
---|
[21630] | 28 | <!-- run greenstone3's ant prepare -->
|
---|
[20335] | 29 | <ant dir="compiled" inheritAll="false">
|
---|
| 30 | <target name="prepare"/>
|
---|
| 31 | <propertyset refid="forward.properties"/>
|
---|
[21748] | 32 | <property name="properties.accepted" value="true"/>
|
---|
[20335] | 33 | </ant>
|
---|
[21630] | 34 |
|
---|
| 35 | <!-- set all version numbers -->
|
---|
| 36 | <antcall target="greenstone3-set-version-numbers"><param name="greenstone3basedir" value="compiled"/></antcall>
|
---|
| 37 | <antcall target="gli-set-version-numbers"><param name="glibasedir" value="compiled/gli"/></antcall>
|
---|
| 38 | <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="compiled/gs2build"/></antcall>
|
---|
| 39 |
|
---|
[22836] | 40 | <!-- mac or linux: compile the support library -->
|
---|
| 41 | <if><bool><or><equals arg1="${rk.os}" arg2="mac"/><equals arg1="${rk.os}" arg2="linux"/></or></bool>
|
---|
| 42 | <!-- checkout the gnome support library extension-->
|
---|
[22939] | 43 | <if><bool><or>
|
---|
[23618] | 44 | <equals arg1="${post.2.83.version}" arg2="true"/>
|
---|
[22939] | 45 | </or></bool>
|
---|
[23612] | 46 | <echo>EXPORTING GNOME LIB EXTENSION</echo>
|
---|
[22836] | 47 | <exec executable="svn">
|
---|
[23612] | 48 | <arg value="export"/>
|
---|
[23644] | 49 | <arg value="${svn.root}/gs2-extensions/gnome-lib/trunk/gnome-lib-minimal-${os.shell}${arch}${extension-x64}.tar.gz"/>
|
---|
[23612] | 50 | <arg value="${basedir}/compiled/ext/gnome-lib-${os.shell}.tar.gz"/>
|
---|
[22836] | 51 | </exec>
|
---|
[23612] | 52 |
|
---|
| 53 | <exec executable="tar" dir="${basedir}/compiled/ext">
|
---|
| 54 | <arg value="xvzf"/>
|
---|
| 55 | <arg value="gnome-lib-${os.shell}.tar.gz"/>
|
---|
| 56 | </exec>
|
---|
| 57 |
|
---|
| 58 | <exec executable="/bin/bash" dir="${basedir}/compiled/ext/gnome-lib-minimal">
|
---|
[22836] | 59 | <arg value="-c"/>
|
---|
[23612] | 60 | <arg value="source devel.bash"/>
|
---|
[22836] | 61 | </exec>
|
---|
[22939] | 62 | <echo>DONE COMPILING GNOME LIB EXTENSION</echo>
|
---|
[22941] | 63 | </if>
|
---|
[22836] | 64 | </if>
|
---|
| 65 |
|
---|
[21630] | 66 | <!-- run greenstone3's ant install and ant dist-tidy -->
|
---|
[20335] | 67 | <ant dir="compiled" inheritAll="false">
|
---|
| 68 | <target name="install"/>
|
---|
| 69 | <target name="dist-tidy"/>
|
---|
| 70 | <propertyset refid="forward.properties"/>
|
---|
[21748] | 71 | <property name="properties.accepted" value="true"/>
|
---|
[20335] | 72 | </ant>
|
---|
| 73 |
|
---|
[22851] | 74 | <!-- Delete the entire gnome support library on Linux -->
|
---|
| 75 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
[23618] | 76 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal"/>
|
---|
| 77 | <delete file="${basedir}/compiled/ext/gnome-lib-linux.tar.gz"/>
|
---|
[22851] | 78 | </if>
|
---|
| 79 |
|
---|
| 80 | <!-- Delete all but the lib folder of the gnome support library on Mac -->
|
---|
| 81 | <if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
[23618] | 82 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/cascade-make"/>
|
---|
| 83 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/packages"/>
|
---|
| 84 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/bin"/>
|
---|
| 85 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/etc"/>
|
---|
| 86 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/include"/>
|
---|
| 87 | <delete dir="${basedir}/compiled/ext/gnome-lib-minimal/darwin/share"/>
|
---|
| 88 | <delete file="${basedir}/compiled/ext/gnome-lib-minimal/setup.bat"/>
|
---|
| 89 | <delete file="${basedir}/compiled/ext/gnome-lib-minimal/CASCADE-MAKE.sh"/>
|
---|
| 90 | <delete file="${basedir}/compiled/ext/gnome-lib-darwin.tar.gz"/>
|
---|
[22851] | 91 | </if>
|
---|
| 92 |
|
---|
[21630] | 93 | <!-- insert an xml parser -->
|
---|
| 94 | <copy todir="compiled/gs2build/perllib/cpan">
|
---|
[22425] | 95 | <fileset dir="${rk.home}/shared/linux" includes="XML-Parser/**/*"/>
|
---|
[21630] | 96 | </copy>
|
---|
| 97 |
|
---|
[21842] | 98 | <!-- insert ant -->
|
---|
| 99 | <mkdir dir="compiled/packages"/>
|
---|
| 100 | <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"/>
|
---|
| 101 | <untar src="compiled/packages/apache-ant-1.8.0-bin.tar.gz" dest="compiled/packages/" compression="gzip"/>
|
---|
| 102 | <move file="compiled/packages/apache-ant-1.8.0" tofile="compiled/packages/ant"/>
|
---|
| 103 | <delete file="compiled/packages/apache-ant-1.8.0-bin.tar.gz"/>
|
---|
| 104 |
|
---|
[21630] | 105 |
|
---|
| 106 | <!-- put the uninstaller in place -->
|
---|
| 107 | <antcall target="insert-and-compile-uninstaller"/>
|
---|
| 108 |
|
---|
| 109 | <!-- (windows only) -->
|
---|
[20335] | 110 | <if><bool><equals arg1="${rk.os}" arg2="windows"/></bool>
|
---|
[21630] | 111 | <!-- insert perl -->
|
---|
| 112 | <unzip src="${rk.home}/shared/windows/perl.zip" dest="compiled/gs2build/bin/windows"/>
|
---|
[20335] | 113 | </if>
|
---|
[21630] | 114 |
|
---|
| 115 | <!-- minify tomcat -->
|
---|
| 116 | <delete dir="compiled/packages/tomcat/webapps/docs"/>
|
---|
| 117 | <delete dir="compiled/packages/tomcat/webapps/examples"/>
|
---|
| 118 |
|
---|
| 119 | <!-- tidy up gli to make it smaller -->
|
---|
| 120 | <antcall target="gli-tidy-for-dist"><param name="glibasedir" value="compiled/gli"/></antcall>
|
---|
| 121 |
|
---|
| 122 | <!-- strip out .svn dirs -->
|
---|
| 123 | <antcall target="strip-svn-dirs"><param name="dir" value="compiled"/></antcall>
|
---|
| 124 |
|
---|
| 125 | <!-- (linux only) -->
|
---|
| 126 | <if><bool><equals arg1="${rk.os}" arg2="linux"/></bool>
|
---|
| 127 | <!-- grab imagemagick binaries -->
|
---|
| 128 | <delete dir="compiled/gs2build/bin/linux/imagemagick"/>
|
---|
| 129 | <exec executable="svn">
|
---|
| 130 | <arg value="export"/>
|
---|
| 131 | <arg value="${svn.root}/main/${branch.path}/binaries/linux/imagemagick"/>
|
---|
| 132 | <arg value="compiled/gs2build/bin/linux/imagemagick"/>
|
---|
| 133 | </exec>
|
---|
| 134 |
|
---|
| 135 | <!-- grab wv binaries -->
|
---|
| 136 | <delete dir="compiled/gs2build/bin/linux/wv"/>
|
---|
| 137 | <exec executable="svn">
|
---|
| 138 | <arg value="export"/>
|
---|
| 139 | <arg value="${svn.root}/main/${branch.path}/binaries/linux/wv"/>
|
---|
| 140 | <arg value="compiled/gs2build/bin/linux/wv"/>
|
---|
| 141 | </exec>
|
---|
| 142 | <!-- (mac only) -->
|
---|
| 143 | <else><if><bool><equals arg1="${rk.os}" arg2="mac"/></bool>
|
---|
| 144 | <!-- grab imagemagick binaries -->
|
---|
| 145 | <delete dir="compiled/gs2build/bin/darwin/imagemagick"/>
|
---|
| 146 | <exec executable="svn">
|
---|
| 147 | <arg value="export"/>
|
---|
| 148 | <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/imagemagick"/>
|
---|
| 149 | <arg value="compiled/gs2build/bin/darwin/imagemagick"/>
|
---|
| 150 | </exec>
|
---|
| 151 |
|
---|
| 152 | <!-- grab ghostscript binaries -->
|
---|
[21725] | 153 | <delete dir="compiled/gs2build/bin/darwin/ghostscript"/>
|
---|
[21630] | 154 | <exec executable="svn">
|
---|
| 155 | <arg value="export"/>
|
---|
| 156 | <arg value="${svn.root}/main/${branch.path}/binaries/mac/intel/ghostscript"/>
|
---|
| 157 | <arg value="compiled/gs2build/bin/darwin/ghostscript"/>
|
---|
| 158 | </exec>
|
---|
| 159 | </if></else></if>
|
---|
| 160 |
|
---|
[20335] | 161 | </target>
|
---|
| 162 |
|
---|
| 163 | </project>
|
---|