Package: josm / 0.0.svn3376-1+squeeze1

10-build.patch Patch series | download
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
From: Andreas Putzo <andreas@putzo.net>
Subject: adjustments to the ant build file, mainly to not include
 the dependencies into the target jar file.
Forwarded: no

---
 build.xml      |   36 +++++++++++++-----------------------
 i18n/build.xml |   26 +++++++++++++++++++++-----
 2 files changed, 34 insertions(+), 28 deletions(-)

--- josm.orig/build.xml
+++ josm/build.xml
@@ -21,8 +21,9 @@
 
 	<!-- Java classpath addition (all jar files to compile tests with this) -->
 	<path id="classpath">
-		<fileset dir="lib">
-			<include name="**/*.jar"/>
+		<fileset dir="/usr/share/java">
+			<include name="gettext-commons.jar"/>
+			<include name="metadata-extractor.jar"/>
 		</fileset>
 	</path>
 
@@ -42,14 +43,7 @@
 	  -->
 	<target name="create-revision">
 		<property name="revision.dir" value="${build.dir}"/>
-		<exec append="false" output="REVISION.XML" executable="svn" failifexecutionfails="false">
-			<env key="LANG" value="C"/>
-			<arg value="info"/>
-			<arg value="--xml"/>
-			<arg value="."/>
-		</exec>
-		<xmlproperty file="REVISION.XML" prefix="version" keepRoot="false" collapseAttributes="true"/>
-		<delete file="REVISION.XML" />
+		<xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
 		<tstamp>
 			<format property="build.tstamp" pattern="yyyy-MM-dd HH:mm:ss"/>
 		</tstamp>
@@ -61,20 +55,13 @@
 Revision: ${version.entry.commit.revision}
 Is-Local-Build: true
 Build-Date: ${build.tstamp}
+Debian-Release: ${debian.version}
 </echo>
 	</target>
 
 
 	<target name="dist" depends="compile,create-revision">
-
-		<exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
-			<env key="LANG" value="C"/>
-			<arg value="info"/>
-			<arg value="--xml"/>
-			<arg value="."/>
-		</exec>
 		<xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
-		<delete file="REVISION"/>
 		<property name="version.entry.commit.revision" value="UNKNOWN"/>
 		<property name="version.entry.commit.date" value="UNKNOWN"/>
 		<echo>Revision ${version.entry.commit.revision}</echo>
@@ -82,24 +69,25 @@ Build-Date: ${build.tstamp}
 		<copy file="README" todir="build"/>
 		<copy file="LICENSE" todir="build"/>
 
+		<ant target="dist" dir="i18n"/>
+
 		<!-- styles -->
 		<copy file="styles/standard/elemstyles.xml" todir="build/data"/>
 
+		<property environment="env"/>
+
 		<!-- create josm-custom.jar -->
-		<delete file="dist/josm-custom.jar"/>
 		<jar destfile="dist/josm-custom.jar" basedir="build" level="${clevel}">
 			<!-- add attribute excludes="**/*BZip2*,**/*Bzip2*" to create a non-bzip2 supporting jar -->
 			<manifest>
 				<attribute name="Main-class" value="JOSM" />
 				<attribute name="Main-Version" value="${version.entry.commit.revision} SVN"/>
 				<attribute name="Main-Date" value="${version.entry.commit.date}"/>
+				<attribute name="Debian-Release" value="${debian.version}"/>
+				<attribute name="Class-Path" value="/usr/share/java/gettext-commons.jar /usr/share/java/metadata-extractor.jar /usr/share/java/signpost-core.jar"/>
 			</manifest>
 			<zipfileset dir="images" prefix="images" />
 			<zipfileset dir="data" prefix="data" />
-
-			<!-- All jar files necessary to run only JOSM (no tests) -->
-			<zipfileset src="lib/metadata-extractor-2.3.1-nosun.jar" />
-			<zipfileset src="lib/signpost-core-1.1.jar" />
 		</jar>
 	</target>
 
@@ -123,6 +111,7 @@ Build-Date: ${build.tstamp}
 			<compilerarg value="-Xlint:deprecation"/>
 			<compilerarg value="-Xlint:unchecked"/>
 		</javac>
+		<ant target="build" dir="i18n"/>
 	</target>
 
 	<target name="init">
@@ -133,6 +122,7 @@ Build-Date: ${build.tstamp}
 	<target name="clean">
 		<delete dir="build" />
 		<delete dir="dist" />
+		<ant target="clean" dir="i18n"/>
 	</target>
 
 	<path id="test.classpath">
--- josm.orig/i18n/build.xml
+++ josm/i18n/build.xml
@@ -1,7 +1,7 @@
 <project name="JOSM i18n" default="build" basedir=".">
 
   <!-- compilation properties -->
-  <property name="josm.build.dir"    value="../core"/>
+  <property name="josm.build.dir"    value=".."/>
   <property name="josm.presets"      value="${josm.build.dir}/data/defaultpresets.xml"/>
   <property name="josm.style"        value="${josm.build.dir}/styles/standard/elemstyles.xml"/>
   <property name="plugin.dir"        value="../plugins"/>
@@ -16,7 +16,7 @@
 
   <property name="ant.build.javac.target" value="1.5"/>
 
-  <property name="gettexttasks.jar" value="lib/gettext-ant-tasks-0.9.7.jar"/>
+  <property name="gettexttasks.jar" value="/usr/share/java/gettext-ant-tasks.jar"/>
 
   <target name="init.gettext" description="Loads the Ant gettext tasks">
     <taskdef name="gettext-extract" classname="org.xnap.commons.ant.gettext.GettextExtractKeysTask" classpath="${gettexttasks.jar}"/>
@@ -53,7 +53,6 @@
     <gettext-extract keysFile="josm.pot" poDirectory="po"
                      keywords="-k -ktrc:1c,2 -kmarktrc:1c,2 -ktr -kmarktr -ktrn:1,2 -ktrnc:1c,2,3">
       <fileset dir="${josm.build.dir}/src" includes="**/*.java"/>
-      <fileset dir="${plugin.dir}" includes="**/*.java"/>
       <fileset dir="${i18n.build.dir}" includes="specialmessages.java"/>
       <fileset dir="${i18n.build.dir}" includes="trans_*.java"/>
     </gettext-extract>
@@ -63,7 +62,13 @@
     <gettext-merge keysFile="josm.pot" poDirectory="po"/>
   </target>
 
-  <target name="build" depends="prebuild">
+  <target name="build.check">
+    <condition property="build.run">
+      <not><available file="build-timestamp"/></not>
+    </condition>
+  </target>
+
+  <target name="build" depends="build.check,prebuild" if="build.run">
     <exec executable="perl">
       <arg line="i18n.pl ${i18n.install.dir}/ po/*.po"/>
     </exec>
@@ -103,10 +108,13 @@
     <ant target="build-lang"><property name="language" value="tr"/></ant>
     <ant target="build-lang"><property name="language" value="zh_TW"/></ant>
 
+     <touch file="build-timestamp"/>
+
+    <!--
     <exec append="false" output="REVISION" executable="svn" failifexecutionfails="false">
       <env key="LANG" value="C"/>
       <arg value="info"/>
-      <arg value="--xml"/>
+      <arg value="-xml"/>
       <arg value="po"/>
     </exec>
     <xmlproperty file="REVISION" prefix="version" keepRoot="false" collapseAttributes="true"/>
@@ -119,6 +127,13 @@
         <attribute name="Translation-Date" value="${version.entry.commit.date}"/>
       </manifest>
     </jar>
+	-->
+  </target>
+
+  <target name="dist" depends="build">
+    <copy todir="../build">
+      <fileset dir="build"/>
+    </copy>
   </target>
 
   <target name="build-lang">
@@ -134,6 +149,7 @@
     <delete>
       <fileset dir="po" includes="*.*~" defaultexcludes="false"/>
     </delete>
+    <delete file="build-timestamp"/>
   </target>
 
 </project>