forked from pc2ccs/pc2v9
-
Notifications
You must be signed in to change notification settings - Fork 0
/
package.xml
172 lines (156 loc) · 8.03 KB
/
package.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<?xml version="1.0"?>
<!-- Copyright (C) 1989-2022 PC2 Development Team: John Clevenger, Douglas Lane, Samir Ashoo, and Troy Boudreau. -->
<project name="package-pc2v9" default="archives" basedir=".">
<!--
*** import build.xml instead of duplicating properties
-->
<import file="build.xml"/>
<!-- version is set in build.xml and can be overriden
on ant cmdline w/ -Dversion=9_0 -->
<property name="release" value="${name}-${version}"/>
<property name="build.unpack.dir" value="${build.dir}/unpack"/>
<!-- zip/gzip moved to archives so we have repo.version available -->
<property name="version.path" value="${build.dir}/VERSION"/>
<property name="pc2jzip.name" value="pc2j-${version}.zip"/>
<property name="pc2jzip.path" value="${build.dir}/${pc2jzip.name}"/>
<target name="apizip" depends="javadocs-api" description="create zip of the API javadocs">
<!-- in case we are run before jar -->
<mkdir dir="${dist.dir}" />
<zip destfile="${apizip.path}">
<zipfileset dir="${docs.api.dir}" filemode="644" prefix="${release}/docs/api"/>
</zip>
</target>
<target name="pc2jzip" description="creates zip of the source">
<zip destfile="${pc2jzip.path}">
<zipfileset dir="${basedir}" filemode="644" prefix="${release}">
<include name="README"/>
<include name="LICENSE"/>
<include name="${version.path}"/>
<include name="pc2v9.ini"/>
</zipfileset>
<zipfileset dir="${basedir}/src" filemode="644" prefix="${release}/src">
</zipfileset>
<zipfileset dir="${basedir}/test" filemode="644" prefix="${release}/test">
</zipfileset>
</zip>
</target>
<!--
XXX javadoc 1.5. <= 14 fails under cruisecontrol, not sure why
for now remove javadocs-api from depends
-->
<target name="zip" depends="jar">
<zip destfile="${zip.path}">
<zipfileset dir="${basedir}" filemode="644" prefix="${release}">
<include name="README"/>
<include name="LICENSE"/>
<include name="pc2v9.ini"/>
<include name="pc2.ico"/>
<include name="realm.properties"/>
</zipfileset>
<zipfileset dir="${build.dir}" filemode="644" prefix="${release}">
<include name="VERSION"/>
</zipfileset>
<zipfileset dir="${build.dir}" filemode="644" prefix="${release}/samps">
<include name="pc2.spec"/>
</zipfileset>
<zipfileset dir="${data.dir}" filemode="644" prefix="${release}/data"/>
<zipfileset dir="${scripts.dir}" filemode="755" prefix="${release}/bin"/>
<zipfileset dir="${dist.dir}" filemode="644" includes="${jar.name}"
prefix="${release}/lib"/>
<zipfileset dir="${vendor.lib.dir}" filemode="644" prefix="${release}/lib">
<exclude name="junit-*.jar"/>
<exclude name="checkstyle-*.jar"/>
<exclude name="svnkit*.jar"/>
<exclude name="quick-json*.jar"/>
</zipfileset>
<zipfileset dir="${samps.dir}" filemode="644" prefix="${release}/samps">
<exclude name="**/compile*"/>
<exclude name="**/loopprint*"/>
<exclude name="sleep.exe"/>
<exclude name="**/validiff*"/>
<exclude name="**/rotate*"/>
<exclude name="**/distribute_score"/>
</zipfileset>
<zipfileset dir="${samps.dir}" filemode="755" prefix="${release}/samps">
<include name="**/compile*"/>
<include name="**/loopprint*"/>
<include name="sleep.exe"/>
<include name="**/validiff*"/>
<include name="**/rotate*"/>
<include name="**/distribute_score"/>
</zipfileset>
<zipfileset dir="${projects.dir}" filemode="755" prefix="${release}/projects">
<include name="*.zip"/>
<exclude name="EWTeam/*"/>
</zipfileset>
<zipfileset dir="${data.dir}" filemode="755" prefix="${release}/samps/data"/>
<!-- bug 353: copy api and other docs to release -->
<zipfileset dir="${docs.api.dir}" filemode="755" prefix="${release}/doc/api"/>
<zipfileset dir="${basedir}/doc" filemode="755" prefix="${release}/doc">
<exclude name="src"/>
<exclude name="src/*"/>
</zipfileset>
<!--
XXX javadoc 1.5. <= 14 fails under cruisecontrol, not sure why
<zipfileset dir="${docs.api.dir}" filemode="644" prefix="${release}/docs/api"/>
-->
</zip>
<checksum file="${zip.path}" algorithm="MD5" fileext=".md5.txt"/>
<checksum file="${zip.path}" algorithm="SHA" fileext=".sha1.txt"/>
<checksum file="${zip.path}" algorithm="SHA-256" fileext=".sha256.txt"/>
<checksum file="${zip.path}" algorithm="SHA-512" fileext=".sha512.txt"/>
</target>
<target name="gzip" depends="zip">
<delete dir="${build.unpack.dir}" />
<mkdir dir="${build.unpack.dir}" />
<unzip src="${zip.path}" dest="${build.unpack.dir}"/>
<tar destfile="${gzip.path}" basedir="${build.unpack.dir}" compression="gzip" excludes="${release}/bin/**,${release}/samps/**,${release}/projects/**">
<tarfileset mode="755" dir="${build.unpack.dir}">
<include name="${release}/bin/**"/>
<include name="${release}/samps/scripts/**"/>
<include name="${release}/samps/sleep.exe"/>
<include name="${release}/samps/**/distribute_score**"/>
<include name="${release}/samps/**/rotate**"/>
</tarfileset>
<tarfileset mode="644" dir="${build.unpack.dir}">
<include name="${release}/samps/**"/>
<exclude name="${release}/samps/scripts/***"/>
<exclude name="${release}/samps/sleep.exe"/>
<exclude name="${release}/samps/**/distribute_score**"/>
<exclude name="${release}/samps/**/rotate**"/>
</tarfileset>
<tarfileset dir="${projects.dir}" filemode="644" prefix="${release}/projects">
<include name="*.tar.gz"/>
</tarfileset>
</tar>
<checksum file="${gzip.path}" algorithm="MD5" fileext=".md5.txt"/>
<checksum file="${gzip.path}" algorithm="SHA" fileext=".sha1.txt"/>
<checksum file="${gzip.path}" algorithm="SHA-256" fileext=".sha256.txt"/>
<checksum file="${gzip.path}" algorithm="SHA-512" fileext=".sha512.txt"/>
</target>
<target name="archiveSkipTests">
<property name="RUN_NO_TESTS" value="Yes"/>
<antcall target="archives"/>
</target>
<target name="archiveSkipTestsAndSubprojectBuilds">
<property name="RUN_NO_TESTS" value="Yes"/>
<property name="BUILD_NO_SUBPROJECTS" value="Yes"/>
<antcall target="archives"/>
</target>
<target name="archives" depends="init" description="public in dist, private in build">
<property name="zip.name" value="${release}-${repo.version}.zip"/>
<property name="zip.path" value="${dist.dir}/${zip.name}"/>
<property name="gzip.name" value="${release}-${repo.version}.tar.gz"/>
<property name="gzip.path" value="${dist.dir}/${gzip.name}"/>
<property name="apizip.name" value="api-doc-${version}-${repo.version}.zip"/>
<property name="apizip.path" value="${dist.dir}/${apizip.name}"/>
<antcall target="clean"/>
<antcall target="apizip"/>
<!-- bug 490 gzip depends on zip do not call explicitly -->
<antcall target="gzip"/>
<echo message="Version ${version} ${date} ${repo.version} (${timestamp.english})${line.separator}"/>
<echo message="Created distribution ${zip.path}"/>
<echo message="Created distribution ${gzip.path}"/>
<echo message="Packaging complete."/>
</target>
</project>