source: release-kits/wirk2/ant-scripts/create-distribution.xml@ 17956

Last change on this file since 17956 was 17956, checked in by oranfry, 16 years ago

dont try to create the source distibution anymore as that is done by sork

File size: 6.9 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<project name="wirk2-create-distribution" default="create-distribution">
3
4 <target name="create-distribution">
5
6 <antcall target="export-gsdl-gli" />
7 <antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/web"/></antcall>
8 <antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/web/gli"/></antcall>
9 <antcall target="drop-in-docs" />
10 <antcall target="tweak-files" />
11 <antcall target="insert-uninstaller"><param name="script-format" value="bat"/></antcall> <!-- from rk2-targets -->
12 <antcall target="remove-unneeded-files-1" />
13 <antcall target="dist-unzip-packages"/>
14
15 <antcall target="drop-in-binaries" />
16 <antcall target="drop-in-demo-collection" />
17 <antcall target="drop-in-misc" />
18 <antcall target="compile-gli" />
19 <antcall target="remove-unneeded-files-2" />
20
21 </target>
22
23 <target name="export-gsdl-gli">
24 <mkdir dir="distributions"/>
25 <delete dir="distributions/web"/>
26 <svn>
27 <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="distributions/web"/>
28 <export srcurl="${svn.root}/gli/${branch.path}" destPath="distributions/web/gli"/>
29 </svn>
30 </target>
31
32 <target name="drop-in-binaries">
33 <echo level="info">Dropping compiled binaries into distribution</echo>
34 <delete dir="${basedir}/distributions/web/bin/windows" />
35 <copy todir="${basedir}/distributions/web/bin/windows">
36 <fileset dir="${basedir}/compiled/bin/windows" includes="**/*"/>
37 </copy>
38 <copy todir="${basedir}/distributions/web" file="${basedir}/compiled/bin/windows/server.exe"/>
39
40 <echo level="info">Dropping LuceneWrapper.jar in place</echo>
41 <copy file="${basedir}/gsdl/bin/java/LuceneWrapper.jar" todir="${basedir}/distributions/web/bin/java" />
42 </target>
43
44 <target name="drop-in-demo-collection">
45 <echo level="info">Dropping rebuilt demo collection into distribution</echo>
46 <delete dir="${basedir}/distributions/web/collect/demo" />
47 <copy todir="${basedir}/distributions/web/collect/demo">
48 <fileset dir="${basedir}/compiled/collect/demo" includes="**/*"/>
49 </copy>
50 </target>
51
52 <target name="drop-in-docs">
53 <echo level="info">Dropping gsdl docs into distribution</echo>
54 <copy todir="${basedir}/distributions/web" overwrite="true">
55 <fileset dir="${wirk2.home}/greenstone2/docs" includes="*.txt"/>
56 </copy>
57 </target>
58
59 <target name="drop-in-misc">
60 <echo level="info">Putting the default gsdlsite.cfg at the root of the distribution</echo>
61 <copy todir="${basedir}/distributions/web" file="${wirk2.home}/resources/gsdlsite.cfg" overwrite="true"/>
62 </target>
63
64 <target name="compile-gli">
65 <echo>Compiling gli...</echo>
66 <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.bat"/>
67
68 <echo>Creating jar...</echo>
69 <exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.bat"/>
70
71 <echo>Cleaning up intermediate files...</echo>
72 <delete dir="${basedir}/distributions/web/gli/jar"/>
73 <delete dir="${basedir}/distributions/web/gli/classes/org"/>
74
75 <echo>Putting gli server jar in a better place</echo>
76 <move file="${basedir}/distributions/web/gli/GLIServer.jar" todir="${basedir}/distributions/web/bin/java" />
77 </target>
78
79 <target name="tweak-files">
80 <echo level="info">Changing date and version in the docs</echo>
81 <!-- ar -->
82 <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(التاريخ : \s*)(.*)" replacement="$1${month.ar} ${current.year}" />
83 <rsr file="${basedir}/distributions/web/READMEar.txt" pattern="(النسخه : \s*)(.*)" replacement="$1${version}" />
84 <!-- es -->
85 <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}" />
86 <rsr file="${basedir}/distributions/web/READMEes.txt" pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}" />
87 <!-- fr -->
88 <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}" />
89 <rsr file="${basedir}/distributions/web/READMEfr.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" />
90 <!-- ru -->
91 <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(Дата\s*)(.*)" replacement="$1${month.ru} ${current.year}" />
92 <rsr file="${basedir}/distributions/web/READMEru.txt" pattern="^(ВерсОя\s*)(.*)" replacement="$1${version}" />
93 <!-- en -->
94 <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" />
95 <rsr file="${basedir}/distributions/web/READMEen.txt" pattern="^(Version\s*)(.*)" replacement="$1${version}" />
96
97
98 </target>
99
100 <target name="remove-unneeded-files-1">
101 <delete file="${basedir}/distributions/web/gli/.greenstonestore" />
102 <!-- delete non-windows source stuff -->
103 <delete><fileset dir="${basedir}/distributions/web" includes="*.bash,*.sh,*.csh,install-sh,configure,configure.in,config.sub,config.guess,config.h.in,configtest.pl,Makefile.in,aclocal.m4,acconfig.h,micotest.cpp"/></delete>
104 </target>
105
106 <target name="remove-unneeded-files-2">
107 <delete dir="${basedir}/distributions/web/bin/linux" />
108 <delete><fileset dir="${basedir}/distributions/web" includes="*.bash,*.sh,*.csh,install-sh,configure,configure.in,config.sub,config.guess,config.h.in,configtest.pl,Makefile.in,aclocal.m4,acconfig.h,micotest.cpp,win32.mak,WIN32cfg.h,Install.txt"/></delete>
109 <delete><fileset dir="${basedir}/distributions/web/gli" includes="*.sh,*4gs3.bat"/></delete>
110 <delete file="${basedir}/distributions/web/bin/java/SignedGatherer.jar" />
111 </target>
112
113 <target name="dist-unzip-packages">
114 <unzip src="${basedir}/distributions/web/common-src/indexers/packages/windows/iconv/iconv.zip" dest="${basedir}/distributions/web/common-src/indexers/packages/windows/iconv"/>
115 <delete file="${basedir}/distributions/web/common-src/indexers/packages/windows/iconv/iconv.zip"/>
116
117 <unzip src="${basedir}/distributions/web/common-src/packages/windows/crypt/crypt.zip" dest="${basedir}/distributions/web/common-src/packages/windows/crypt"/>
118 <delete file="${basedir}/distributions/web/common-src/packages/windows/crypt/crypt.zip"/>
119
120 <unzip src="${basedir}/distributions/web/common-src/packages/windows/expat/expat.zip" dest="${basedir}/distributions/web/common-src/packages/windows/expat"/>
121 <delete file="${basedir}/distributions/web/common-src/packages/windows/expat/expat.zip"/>
122
123 <unzip src="${basedir}/distributions/web/common-src/packages/windows/gdbm/gdbm.zip" dest="${basedir}/distributions/web/common-src/packages/windows/gdbm"/>
124 <delete file="${basedir}/distributions/web/common-src/packages/windows/gdbm/gdbm.zip"/>
125
126 <unzip src="${basedir}/distributions/web/common-src/packages/windows/stlport/stlport.zip" dest="${basedir}/distributions/web/common-src/packages/windows/stlport"/>
127 <delete file="${basedir}/distributions/web/common-src/packages/windows/stlport/stlport.zip"/>
128 </target>
129
130</project>
Note: See TracBrowser for help on using the repository browser.