source: release-kits/shared/greenstone2/ant-scripts/rk2-targets.xml@ 18769

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

part of a target splitting off into its own target

File size: 5.0 KB
Line 
1<?xml version="1.0" encoding="utf-8" ?>
2<!--
3 ..........................................................
4 August 2008
5 Targets for Greenstone2 release kits
6 Oran Fry
7 ..........................................................
8-->
9
10<project name="rk2-targets">
11
12 <property name="version.major" value="2"/>
13
14 <target name="export-gsdl-gli">
15 <delete dir="${dest}"/>
16 <svn>
17 <export srcurl="${svn.root}/gsdl/${branch.path}" destPath="${dest}"/>
18 <export srcurl="${svn.root}/gli/${branch.path}" destPath="${dest}/gli"/>
19 </svn>
20 </target>
21
22 <target name="drop-in-docs">
23 <echo level="info">Dropping gsdl docs into distribution</echo>
24 <copy todir="${gsdl.basedir}" overwrite="true">
25 <fileset dir="${rk.home}/greenstone2/docs"/>
26 </copy>
27 </target>
28
29 <target name="gsdl-set-version-numbers">
30
31 <echo level="info">Setting version in src/lib/gsdlconf.h</echo>
32 <rsr file="${gsdl.basedir}/common-src/src/lib/gsdlconf.h" pattern="(#define GSDL_VERSION) &quot;.*&quot;" replacement="$1 &quot;${version}&quot;" />
33
34 <echo level="info">Setting version in Install.sh</echo>
35 <rsr file="${gsdl.basedir}/Install.sh" pattern="(echo &quot;Version: ).*(&quot; .*)" replacement="$1${version}$2" />
36
37 <echo level="info">Setting version in etc/VERSION</echo>
38 <rsr file="${gsdl.basedir}/etc/VERSION" pattern="(gsdl version: ).*" replacement="$1${version}" />
39
40 <antcall target="gsdl-set-dates-in-readmes"><param name="gsdl.basedir" value="${gsdl.basedir}"/></antcall>
41
42 </target>
43
44 <target name="gsdl-set-dates-in-readmes">
45 <echo level="info">Changing date and version in the docs</echo>
46
47 <!-- en -->
48 <rsr file="${gsdl.basedir}/READMEen.txt">
49 <job pattern="^(Date\s*)(.*)" replacement="$1${month.default} ${current.year}" />
50 <job pattern="^(Version\s*)(.*)" replacement="$1${version}" />
51 </rsr>
52
53 <!-- ar -->
54 <rsr file="${gsdl.basedir}/READMEar.txt">
55 <job pattern="(التاريخ : \s*)(.*)" replacement="$1${month.ar} ${current.year}"/>
56 <job pattern="(النسخه : \s*)(.*)" replacement="$1${version}"/>
57 </rsr>
58
59 <!-- es -->
60 <rsr file="${gsdl.basedir}/READMEes.txt">
61 <job pattern="^(Fecha\s*)(.*)" replacement="$1${month.es} de ${current.year}"/>
62 <job pattern="^(Versi.?n\s*)(.*)" replacement="$1${version}"/>
63 </rsr>
64
65 <!-- fr -->
66 <rsr file="${gsdl.basedir}/READMEfr.txt">
67 <job pattern="^(Date\s*)(.*)" replacement="$1${month.fr} ${current.year}"/>
68 <job pattern="^(Version\s*)(.*)" replacement="$1${version}"/>
69 </rsr>
70
71 <!-- ru -->
72 <rsr file="${gsdl.basedir}/READMEru.txt">
73 <job pattern="^(Дата\s*)(.*)" replacement="$1${month.ru} ${current.year}"/>
74 <job pattern="^(ВерсОя\s*)(.*)" replacement="$1${version}"/>
75 </rsr>
76
77 </target>
78
79
80 <target name="insert-export-to-cd-package">
81 <mkdir dir="${gsdl.basedir}/bin/windows"/>
82 <get src="http://greenstone.org/release-snapshots/server.exe" dest="${gsdl.basedir}/bin/windows/server.exe"/>
83 <get src="http://svn.greenstone.org/other-projects/trunk/winbin/bin/Setup.exe" dest="${gsdl.basedir}/bin/windows/Setup.exe"/>
84 <get src="http://svn.greenstone.org/other-projects/trunk/winbin/bin/gssetup.exe" dest="${gsdl.basedir}/bin/windows/gssetup.exe"/>
85 </target>
86
87 <target name="create-binary-zip-linux">
88 <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
89 <exec dir="${basedir}" executable="cp"><arg line="-r distributions/web ${binzip.dir}"/></exec>
90 <exec dir="${basedir}" executable="cp"><arg line="${binzip.dir}/bin/${shell.os}/library distributions/Greenstone-${version}-${os.suffix}-binary/cgi-bin"/></exec>
91 <exec dir="${basedir}" executable="cp"><arg line="${binzip.dir}/bin/${shell.os}/oaiserver distributions/Greenstone-${version}-${os.suffix}-binary/cgi-bin"/></exec>
92
93 <!-- delete sourcecode -->
94 <delete dir="${binzip.dir}/common-src"/>
95 <delete dir="${binzip.dir}/build-src"/>
96 <delete dir="${binzip.dir}/runtime-src"/>
97
98 <!-- delete loose files -->
99 <delete>
100 <fileset
101 dir="${binzip.dir}"
102 includes="README*.txt,Uninstall.sh,uninst.jar,acconfig.h,aclocal.m4,config.guess,config.sub,configtest.pl,configure,configure.in,install-sh,Makefile.in,micotest.cpp,config.h.in"
103 excludes="READMEen.txt"/>
104 </delete>
105
106 </target>
107
108 <target name="create-binary-zip-windows">
109 <property name="binzip.dir" value="distributions/Greenstone-${version}-${os.suffix}-binary"/>
110 <copy todir="${binzip.dir}">
111 <fileset dir="distributions/web"/>
112 </copy>
113 <copy todir="${binzip.dir}/cgi-bin">
114 <fileset dir="${binzip.dir}/bin/${shell.os}" includes="library.exe,oaiserver.exe"/>
115 </copy>
116
117 <!-- delete sourcecode -->
118 <delete dir="${binzip.dir}/common-src"/>
119 <delete dir="${binzip.dir}/build-src"/>
120 <delete dir="${binzip.dir}/runtime-src"/>
121
122 <!-- delete loose files -->
123 <delete>
124 <fileset dir="${binzip.dir}" includes="README*.txt,Uninstall.bat,Uninst.bat,uninst.jar,win32.mak,win32cfg.h,makegs2.bat" excludes="READMEen.txt"/>
125 </delete>
126 </target>
127
128 <target name="create-needed-empty-files">
129 <mkdir dir="${gsdl.basedir}/tmp"/>
130 <chmod dir="${gsdl.basedir}/tmp" perm="a+rwx"/>
131 <echo file="${gsdl.basedir}/etc/usage.txt"></echo>
132 </target>
133
134</project>
135
Note: See TracBrowser for help on using the repository browser.