source: release-kits/lirk2/ant-scripts/create-cdrom-components.xml@ 19615

Last change on this file since 19615 was 19615, checked in by oranfry, 12 years ago

fixed to creating cdrom components on linux and mac

File size: 2.7 KB
Line 
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"/>
12 <antcall target="compile-cdrom-wrapper"/>
13 <antcall target="create-cdrom-components-archive"/>
14 </target>
15
16 <target name="prepare-cdrom-components">
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"/>
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/**/*"/>
35 <include name="apache-httpd/"/>
36 <include name="apache-httpd/**/*"/>
37 <include name="*.sh"/>
38 <include name="*.csh"/>
39 <include name="*.bash"/>
40 </fileset>
41 </move>
42
43 <!-- imagemagick (completely linux specific) -->
44 <mkdir dir="cdrom/dist/Software/imagemagick/linux"/>
45 <copy todir="cdrom/dist/Software/imagemagick/linux" overwrite="true">
46 <fileset dir="components/tmp/imagemagick"/>
47 </copy>
48
49 <!-- jre -->
50 <exec dir="cdrom/dist/Java/Linux" executable="${lirk2.home}/linux/jre_bin"/>
51 <exec dir="cdrom/dist/Java/Linux" executable="tar"><arg value="-xf"/><arg value="jre.tar"/></exec>
52 <delete file="cdrom/dist/Java/Linux/jre.tar"/>
53
54 <!-- jar installer -->
55 <copy file="installer/cdrom.jar" tofile="cdrom/dist/Java/Jars/linux.jar"/>
56
57
58 </target>
59
60 <target name="compile-cdrom-wrapper">
61 <copy file="${rk.home}/linux/wrapper.cpp" todir="cdrom/build" overwrite="true"/>
62
63 <echo level="info">compile the cdrom wrapper</echo>
64 <exec executable="g++" dir="cdrom/build">
65 <arg line="-Wall -static -static-libgcc -c -DCDROM -o wrapper.o wrapper.cpp"/>
66 </exec>
67
68 <echo level="info">link the compiled code</echo>
69 <exec executable="g++" dir="cdrom/build">
70 <arg line="-static -static-libgcc -o ../dist/Greenstone-${version}-linux wrapper.o"/>
71 </exec>
72
73 </target>
74
75 <target name="create-cdrom-components-archive">
76 <mkdir dir="products"/>
77 <exec dir="cdrom/dist" executable="bash">
78 <arg value="-c"/>
79 <arg value="tar -czf ../../products/cdrom-components-${version}-linux.tar.gz *"/>
80 </exec>
81 </target>
82
83
84
85</project>
Note: See TracBrowser for help on using the repository browser.