* New upstream release:
[debian/jabref.git] / debian / patches / 02_libs.dpatch
1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 03_libs.dpatch by  <gregor+debian@comodo.priv.at>
3 ##
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: Replace pre-compiled libs by Debian packages
6
7 @DPATCH@
8 diff -urNad jabref~/build.xml jabref/build.xml
9 --- jabref~/build.xml   2006-09-30 11:57:24.000000000 +0200
10 +++ jabref/build.xml    2006-10-15 18:19:19.000000000 +0200
11 @@ -86,6 +86,7 @@
12  
13          <!-- Set the properties for library directories -->
14          <property name="library.directory" value="lib" />
15 +        <property name="library.directory.debian" value="/usr/share/java" />
16  
17  
18      <taskdef name="jarbundler"
19 @@ -101,6 +102,9 @@
20                  <fileset dir="${library.directory}">
21                          <include name="*.jar" />
22                  </fileset>
23 +                <fileset dir="${library.directory.debian}">
24 +                        <include name="*.jar" />
25 +                </fileset>
26          </path>
27  
28      <!-- Runs project (e.g. in NetBeans 4) -->
29 @@ -110,12 +114,12 @@
30              <pathelement location="${build.lib}/jabref.jar"/>
31              <!--<pathelement location="${library.directory}/commons-httpclient-2.0.jar" />
32              <pathelement location="${library.directory}/commons-logging.jar" />-->
33 -            <pathelement location="${library.directory}/antlr.jar" />
34 -            <pathelement location="${library.directory}/looks-2.0.4.jar" />
35 -            <pathelement location="${library.directory}/forms-1.0.4.jar" />
36 -            <pathelement location="${library.directory}/spin-1.4.jar" />
37 -            <pathelement location="${library.directory}/glazedlists-1.5.0_java14.jar" />
38 -            <pathelement location="${library.directory}/microba.jar" />
39 +            <pathelement location="${library.directory.debian}/antlr.jar" />
40 +            <pathelement location="${library.directory.debian}/looks.jar" />
41 +            <pathelement location="${library.directory.debian}/forms.jar" />
42 +            <pathelement location="${library.directory.debian}/spin.jar" />
43 +            <pathelement location="${library.directory.debian}/glazedlists.jar" />
44 +            <pathelement location="${library.directory.debian}/microba.jar" />
45          </classpath>
46           </java>
47      </target>
48 @@ -139,11 +143,11 @@
49        <nbprofiledirect>
50            <classpath>
51              <pathelement location="${build.lib}/jabref.jar"/>
52 -            <pathelement location="${library.directory}/antlr.jar" />
53 -            <pathelement location="${library.directory}/looks-2.0.4.jar" />
54 -            <pathelement location="${library.directory}/forms-1.0.4.jar" />
55 -            <pathelement location="${library.directory}/spin-1.4.jar" />
56 -            <pathelement location="${library.directory}/glazedlists-1.5.0_java14.jar" />
57 +            <pathelement location="${library.directory.debian}/antlr.jar" />
58 +            <pathelement location="${library.directory.debian}/looks.jar" />
59 +            <pathelement location="${library.directory.debian}/forms.jar" />
60 +            <pathelement location="${library.directory.debian}/spin.jar" />
61 +            <pathelement location="${library.directory.debian}/glazedlists.jar" />
62          </classpath>
63        </nbprofiledirect>
64  
65 @@ -155,11 +159,11 @@
66            <env key="LD_LIBRARY_PATH" path="${profiler.info.agentpath}:${env.LD_LIBRARY_PATH}"/>
67            <classpath>
68              <pathelement location="${build.lib}/jabref.jar"/>
69 -            <pathelement location="${library.directory}/antlr.jar" />
70 -            <pathelement location="${library.directory}/looks-2.0.4.jar" />
71 -            <pathelement location="${library.directory}/forms-1.0.4.jar" />
72 -            <pathelement location="${library.directory}/spin-1.4.jar" />
73 -            <pathelement location="${library.directory}/glazedlists-1.5.0_java14.jar" />
74 +            <pathelement location="${library.directory.debian}/antlr.jar" />
75 +            <pathelement location="${library.directory.debian}/looks.jar" />
76 +            <pathelement location="${library.directory.debian}/forms.jar" />
77 +            <pathelement location="${library.directory.debian}/spin.jar" />
78 +            <pathelement location="${library.directory.debian}/glazedlists.jar" />
79  
80          </classpath>
81        </java>
82 @@ -175,12 +179,12 @@
83                                  <pathelement path="${build.classes}" />
84                                  <!--<pathelement location="${library.directory}/commons-httpclient-2.0.jar" />
85                                  <pathelement location="${library.directory}/commons-logging.jar" />-->
86 -                                <pathelement location="${library.directory}/antlr.jar" />
87 -                                <pathelement location="${library.directory}/looks-2.0.4.jar" />
88 -                                <pathelement location="${library.directory}/forms-1.0.4.jar" />
89 -                                <pathelement location="${library.directory}/spin-1.4.jar" />
90 -                                <pathelement location="${library.directory}/glazedlists-1.5.0_java14.jar" />
91 -                                <pathelement location="${library.directory}/microba.jar" />
92 +                                <pathelement location="${library.directory.debian}/antlr.jar" />
93 +                                <pathelement location="${library.directory.debian}/looks.jar" />
94 +                                <pathelement location="${library.directory.debian}/forms.jar" />
95 +                                <pathelement location="${library.directory.debian}/spin.jar" />
96 +                                <pathelement location="${library.directory.debian}/glazedlists.jar" />
97 +                                <pathelement location="${library.directory.debian}/microba.jar" />
98                          </classpath>
99                  </javac>
100          </target>
101 @@ -194,9 +198,9 @@
102                                  <pathelement path="${build.classes}" />
103                                  <!--<pathelement location="${library.directory}/commons-httpclient-2.0.jar" />
104                                  <pathelement location="${library.directory}/commons-logging.jar" />-->
105 -                                <pathelement location="${library.directory}/antlr.jar" />
106 -                                <pathelement location="${library.directory}/looks-2.0.4.jar" />
107 -                                <pathelement location="${library.directory}/spin-1.4.jar" />
108 +                                <pathelement location="${library.directory.debian}/antlr.jar" />
109 +                                <pathelement location="${library.directory.debian}/looks.jar" />
110 +                                <pathelement location="${library.directory.debian}/spin.jar" />
111                          </classpath>
112                  </javac>
113  
114 @@ -409,16 +413,16 @@
115                  <mkdir dir="${build.tmp}"/>
116                  <!--<unjar src="${library.directory}/commons-httpclient-2.0.jar" dest="${build.tmp}" />
117                  <unjar src="${library.directory}/commons-logging.jar" dest="${build.tmp}" />-->
118 -                <unjar src="${library.directory}/antlr.jar" dest="${build.tmp}" />
119 +                <unjar src="${library.directory.debian}/antlr.jar" dest="${build.tmp}" />
120                  <!--                <unjar src="${library.directory}/plastic-1.2.1.jar" dest="${build.classes}" />-->
121 -                <unjar src="${library.directory}/looks-2.0.4.jar" dest="${build.tmp}" />
122 -                <unjar src="${library.directory}/forms-1.0.4.jar" dest="${build.tmp}" />
123 -                <unjar src="${library.directory}/spin-1.4.jar" dest="${build.tmp}" />
124 -                <unjar src="${library.directory}/glazedlists-1.5.0_java14.jar" dest="${build.tmp}" />
125 -                <unjar src="${library.directory}/microba.jar" dest="${build.tmp}" />
126 +                <unjar src="${library.directory.debian}/looks.jar" dest="${build.tmp}" />
127 +                <unjar src="${library.directory.debian}/forms.jar" dest="${build.tmp}" />
128 +                <unjar src="${library.directory.debian}/spin.jar" dest="${build.tmp}" />
129 +                <unjar src="${library.directory.debian}/glazedlists.jar" dest="${build.tmp}" />
130 +                <unjar src="${library.directory.debian}/microba.jar" dest="${build.tmp}" />
131              <delete dir="${build.tmp}/META-INF"/>
132             <!-- rename the microba license file -->
133 -           <move file="${build.tmp}/license.txt" tofile="${build.tmp}/microba-license.txt"/>
134 +           <!-- <move file="${build.tmp}/license.txt" tofile="${build.tmp}/microba-license.txt"/> -->
135          </target>
136  
137  
138 @@ -447,6 +451,9 @@
139                                  <fileset dir="${library.directory}">
140                                          <include name="*.jar" />
141                                  </fileset>
142 +                                <fileset dir="${library.directory.debian}">
143 +                                        <include name="*.jar" />
144 +                                </fileset>
145                          </classpath>
146                  </taskdef>
147                  <!-- allowed Pretty Much Done rulsets -->
148 @@ -483,6 +490,9 @@
149                                  <fileset dir="${library.directory}">
150                                          <include name="*.jar" />
151                                  </fileset>
152 +                                <fileset dir="${library.directory.debian}">
153 +                                        <include name="*.jar" />
154 +                                </fileset>
155                          </classpath>
156                  </taskdef>
157                  <cpd format="text" minimumTokenCount="100" outputFile="${build.dir}/duplicated_code_report.txt">
158 @@ -500,6 +510,9 @@
159                                  <fileset dir="${library.directory}">
160                                          <include name="*.jar" />
161                                  </fileset>
162 +                                <fileset dir="${library.directory.debian}">
163 +                                        <include name="*.jar" />
164 +                                </fileset>
165                          </classpath>
166                  </taskdef>
167                  <echo>Cyclomatic
168 @@ -523,6 +536,9 @@
169                                  <fileset dir="${library.directory}">
170                                          <include name="*.jar" />
171                                  </fileset>
172 +                                <fileset dir="${library.directory.debian}">
173 +                                        <include name="*.jar" />
174 +                                </fileset>
175                          </classpath>
176                  </taskdef>
177                  <jalopy fileformat="unix" convention="${src.dir}/java/jalopy.format.convention.xml" history="file" historymethod="adler32" loglevel="error" threads="2" classpathref="classpath" backup="bak">
178 @@ -545,10 +561,10 @@
179                                  <pathelement location="${build.lib}/jabref.jar" />
180                                  <!--<pathelement location="${library.directory}/commons-httpclient-2.0.jar" />
181                                  <pathelement location="${library.directory}/commons-logging.jar" />-->
182 -                                <pathelement location="${library.directory}/antlr.jar" />
183 -                                <pathelement location="${library.directory}/looks-2.0.4.jar" />
184 -                                <pathelement location="${library.directory}/looks-2.0.4.jar" />
185 -                                <pathelement location="${library.directory}/spin-1.4.jar" />
186 +                                <pathelement location="${library.directory.debian}/antlr.jar" />
187 +                                <pathelement location="${library.directory.debian}/looks.jar" />
188 +                                <pathelement location="${library.directory.debian}/forms.jar" />
189 +                                <pathelement location="${library.directory.debian}/spin.jar" />
190                          </classpath>
191  
192                          <!--<test name="tests.net.sf.jabref.export.layout.format.AuthorLastFirstAbbreviatorTester"/>-->