[19592] | 1 | <project name="lirk2-create-cdrom-components">
|
---|
| 2 |
|
---|
| 3 | <!--
|
---|
| 4 | cd components
|
---|
| 5 | produce components for cdrom distributions, to be picked up and used by cdrk2 release kit
|
---|
| 6 | split components into linux only files (linux) and general files (all)
|
---|
| 7 | -->
|
---|
| 8 |
|
---|
| 9 | <target name="create-cdrom-components">
|
---|
| 10 | <antcall target="compile-cdrom-installer"/> <!-- from init -->
|
---|
| 11 | <antcall target="prepare-cdrom-components"/>
|
---|
[19615] | 12 | <antcall target="compile-cdrom-wrapper"/>
|
---|
| 13 | <antcall target="create-cdrom-components-archive"/>
|
---|
[19592] | 14 | </target>
|
---|
| 15 |
|
---|
| 16 | <target name="prepare-cdrom-components">
|
---|
[19615] | 17 | <delete dir="cdrom"/>
|
---|
| 18 | <mkdir dir="cdrom/build"/>
|
---|
| 19 | <mkdir dir="cdrom/dist/Software"/>
|
---|
| 20 | <mkdir dir="cdrom/dist/Java/Linux"/>
|
---|
| 21 | <mkdir dir="cdrom/dist/Java/Jars"/>
|
---|
[19592] | 22 |
|
---|
| 23 | <!-- core -->
|
---|
| 24 | <mkdir dir="cdrom/dist/Software/core/all"/>
|
---|
| 25 | <mkdir dir="cdrom/dist/Software/core/linux"/>
|
---|
| 26 | <copy todir="cdrom/dist/Software/core/all" overwrite="true">
|
---|
| 27 | <fileset dir="components/tmp/core"/>
|
---|
| 28 | </copy>
|
---|
| 29 | <move todir="cdrom/dist/Software/core/linux" overwrite="true">
|
---|
| 30 | <fileset dir="cdrom/dist/Software/core/all">
|
---|
| 31 | <include name="bin/linux"/>
|
---|
| 32 | <include name="bin/linux/**/*"/>
|
---|
| 33 | <include name="bin/windows"/>
|
---|
| 34 | <include name="bin/windows/**/*"/>
|
---|
[19768] | 35 | <include name="cgi-bin/library.cgi"/>
|
---|
| 36 | <include name="cgi-bin/oaiserver.cgi"/>
|
---|
[19592] | 37 | <include name="apache-httpd/**/*"/>
|
---|
| 38 | <include name="*.sh"/>
|
---|
| 39 | <include name="*.csh"/>
|
---|
| 40 | <include name="*.bash"/>
|
---|
| 41 | </fileset>
|
---|
| 42 | </move>
|
---|
| 43 |
|
---|
[19776] | 44 | <!-- delete the httpd manual to save space -->
|
---|
| 45 | <delete dir="cdrom/dist/Software/core/linux/apache-httpd/linux/manual"/>
|
---|
| 46 |
|
---|
[19592] | 47 | <!-- imagemagick (completely linux specific) -->
|
---|
| 48 | <mkdir dir="cdrom/dist/Software/imagemagick/linux"/>
|
---|
| 49 | <copy todir="cdrom/dist/Software/imagemagick/linux" overwrite="true">
|
---|
| 50 | <fileset dir="components/tmp/imagemagick"/>
|
---|
| 51 | </copy>
|
---|
| 52 |
|
---|
[19615] | 53 | <!-- jre -->
|
---|
[19592] | 54 | <exec dir="cdrom/dist/Java/Linux" executable="${lirk2.home}/linux/jre_bin"/>
|
---|
| 55 | <exec dir="cdrom/dist/Java/Linux" executable="tar"><arg value="-xf"/><arg value="jre.tar"/></exec>
|
---|
[19615] | 56 | <delete file="cdrom/dist/Java/Linux/jre.tar"/>
|
---|
[19592] | 57 |
|
---|
[19615] | 58 | <!-- jar installer -->
|
---|
| 59 | <copy file="installer/cdrom.jar" tofile="cdrom/dist/Java/Jars/linux.jar"/>
|
---|
| 60 |
|
---|
[19592] | 61 |
|
---|
| 62 | </target>
|
---|
| 63 |
|
---|
[19615] | 64 | <target name="compile-cdrom-wrapper">
|
---|
[19596] | 65 | <copy file="${rk.home}/linux/wrapper.cpp" todir="cdrom/build" overwrite="true"/>
|
---|
[19592] | 66 |
|
---|
| 67 | <echo level="info">compile the cdrom wrapper</echo>
|
---|
| 68 | <exec executable="g++" dir="cdrom/build">
|
---|
[19596] | 69 | <arg line="-Wall -static -static-libgcc -c -DCDROM -o wrapper.o wrapper.cpp"/>
|
---|
[19592] | 70 | </exec>
|
---|
| 71 |
|
---|
| 72 | <echo level="info">link the compiled code</echo>
|
---|
| 73 | <exec executable="g++" dir="cdrom/build">
|
---|
[19596] | 74 | <arg line="-static -static-libgcc -o ../dist/Greenstone-${version}-linux wrapper.o"/>
|
---|
[19592] | 75 | </exec>
|
---|
[19615] | 76 |
|
---|
| 77 | </target>
|
---|
| 78 |
|
---|
| 79 | <target name="create-cdrom-components-archive">
|
---|
| 80 | <mkdir dir="products"/>
|
---|
[19592] | 81 | <exec dir="cdrom/dist" executable="bash">
|
---|
| 82 | <arg value="-c"/>
|
---|
| 83 | <arg value="tar -czf ../../products/cdrom-components-${version}-linux.tar.gz *"/>
|
---|
[19615] | 84 | </exec>
|
---|
| 85 | </target>
|
---|
[19592] | 86 |
|
---|
| 87 |
|
---|
| 88 |
|
---|
| 89 | </project>
|
---|