1 | %global debug_package %{nil} |
---|
2 | # since we have only a static library |
---|
3 | |
---|
4 | Summary: ANother Tool for Language Recognition |
---|
5 | Name: antlr |
---|
6 | Version: 2.7.7 |
---|
7 | Release: 11%{?_dist_release} |
---|
8 | |
---|
9 | Group: Development/Tools |
---|
10 | License: Public Domain |
---|
11 | URL: http://www.antlr.org/ |
---|
12 | |
---|
13 | Source0: http://www.antlr2.org/download/antlr-%{version}.tar.gz |
---|
14 | Source1: %{name}-build.xml |
---|
15 | Source2: %{name}-script |
---|
16 | Patch1: %{name}-%{version}-newgcc.patch |
---|
17 | |
---|
18 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
19 | %ifnarch sparc64 |
---|
20 | BuildRequires: mono-core |
---|
21 | BuildRequires: mono-winforms |
---|
22 | %endif |
---|
23 | BuildRequires: ant |
---|
24 | BuildRequires: java-javadoc |
---|
25 | BuildRequires: jpackage-utils |
---|
26 | BuildRequires: java-devel |
---|
27 | |
---|
28 | Requires: jpackage-utils |
---|
29 | Requires: java |
---|
30 | |
---|
31 | %description |
---|
32 | ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a |
---|
33 | language tool that provides a framework for constructing recognizers, |
---|
34 | compilers, and translators from grammatical descriptions containing |
---|
35 | C++ or Java actions [You can use PCCTS 1.xx to generate C-based |
---|
36 | parsers]. |
---|
37 | |
---|
38 | %package tool |
---|
39 | Summary: ANother Tool for Language Recognition |
---|
40 | Group: Development/Tools |
---|
41 | BuildArch: noarch |
---|
42 | Provides: %{name} = %{version}-%{release} |
---|
43 | |
---|
44 | %description tool |
---|
45 | ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a |
---|
46 | language tool that provides a framework for constructing recognizers, |
---|
47 | compilers, and translators from grammatical descriptions containing |
---|
48 | C++ or Java actions [You can use PCCTS 1.xx to generate C-based |
---|
49 | parsers]. |
---|
50 | |
---|
51 | %package manual |
---|
52 | Summary: Manual for %{name} |
---|
53 | Group: Applications/Documentation |
---|
54 | BuildArch: noarch |
---|
55 | |
---|
56 | %description manual |
---|
57 | Documentation for %{name}. |
---|
58 | |
---|
59 | %package javadoc |
---|
60 | Summary: Javadoc for %{name} |
---|
61 | Group: Documentation |
---|
62 | BuildArch: noarch |
---|
63 | |
---|
64 | %description javadoc |
---|
65 | Javadoc for %{name}. |
---|
66 | |
---|
67 | %package C++ |
---|
68 | Summary: C++ bindings for antlr2 generated parsers |
---|
69 | Group: Development/Libraries |
---|
70 | Provides: antlr-static = %{version}-%{release} |
---|
71 | |
---|
72 | %description C++ |
---|
73 | This package provides a static C++ library for parsers generated by ANTLR2. |
---|
74 | |
---|
75 | %package C++-doc |
---|
76 | Summary: Documentation for C++ bindings for antlr2 generated parsers |
---|
77 | Group: Documentation |
---|
78 | BuildArch: noarch |
---|
79 | BuildRequires: doxygen |
---|
80 | |
---|
81 | %description C++-doc |
---|
82 | This package contains the documentation for the C++ bindings for parsers |
---|
83 | generated by ANTLR2. |
---|
84 | |
---|
85 | %prep |
---|
86 | %setup -q |
---|
87 | # remove all binary libs |
---|
88 | find . -name "*.jar" -exec rm -f {} \; |
---|
89 | cp -p %{SOURCE1} build.xml |
---|
90 | %patch1 |
---|
91 | # CRLF->LF |
---|
92 | sed -i 's/\r//' LICENSE.txt |
---|
93 | |
---|
94 | %build |
---|
95 | ant -Dj2se.apidoc=%{_javadocdir}/java |
---|
96 | cp work/lib/antlr.jar . # make expects to find it here |
---|
97 | export CLASSPATH=. |
---|
98 | %configure --without-examples |
---|
99 | make CXXFLAGS="${CXXFLAGS} -fPIC" DEBUG=1 verbose=1 |
---|
100 | rm antlr.jar # no longer needed |
---|
101 | |
---|
102 | # fix doc permissions and remove Makefiles |
---|
103 | rm doc/{Makefile,Makefile.in} |
---|
104 | chmod 0644 doc/* |
---|
105 | |
---|
106 | # generate doxygen docs for C++ bindings |
---|
107 | pushd lib/cpp |
---|
108 | doxygen doxygen.cfg |
---|
109 | find gen_doc -type f -exec chmod 0644 {} \; |
---|
110 | popd |
---|
111 | |
---|
112 | %install |
---|
113 | rm -rf $RPM_BUILD_ROOT |
---|
114 | mkdir -p $RPM_BUILD_ROOT{%{_includedir}/%{name},%{_libdir},%{_bindir}} |
---|
115 | |
---|
116 | # jars |
---|
117 | mkdir -p $RPM_BUILD_ROOT%{_javadir} |
---|
118 | cp -p work/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar |
---|
119 | (cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} `echo $jar| sed "s|-%{version}||g"`; done) |
---|
120 | |
---|
121 | # script |
---|
122 | install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/antlr |
---|
123 | |
---|
124 | # C++ lib and headers, antlr-config |
---|
125 | |
---|
126 | install -p -m 644 lib/cpp/antlr/*.hpp $RPM_BUILD_ROOT%{_includedir}/%{name} |
---|
127 | install -p -m 644 lib/cpp/src/libantlr.a $RPM_BUILD_ROOT%{_libdir} |
---|
128 | install -p -m 755 scripts/antlr-config $RPM_BUILD_ROOT%{_bindir} |
---|
129 | |
---|
130 | # javadoc |
---|
131 | mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} |
---|
132 | cp -pr work/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} |
---|
133 | ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} |
---|
134 | |
---|
135 | %clean |
---|
136 | rm -rf $RPM_BUILD_ROOT |
---|
137 | |
---|
138 | %files tool |
---|
139 | %defattr(-,root,root,-) |
---|
140 | %doc INSTALL.txt LICENSE.txt |
---|
141 | %{_javadir}/%{name}*.jar |
---|
142 | %{_bindir}/antlr |
---|
143 | |
---|
144 | # this is actually a development package for the C++ target |
---|
145 | # as we ship only a static library, it doesn't make sense |
---|
146 | # to have a separate -devel package for the headers |
---|
147 | %files C++ |
---|
148 | %defattr(-,root,root,-) |
---|
149 | %{_includedir}/%{name} |
---|
150 | %{_libdir}/libantlr.a |
---|
151 | %{_bindir}/antlr-config |
---|
152 | |
---|
153 | %files C++-doc |
---|
154 | %defattr(-,root,root,-) |
---|
155 | %doc lib/cpp/gen_doc/html/ |
---|
156 | |
---|
157 | %files manual |
---|
158 | %defattr(-,root,root,-) |
---|
159 | %doc doc/* |
---|
160 | |
---|
161 | %files javadoc |
---|
162 | %defattr(-,root,root,-) |
---|
163 | %doc %{_javadocdir}/%{name}-%{version} |
---|
164 | %doc %{_javadocdir}/%{name} |
---|
165 | |
---|
166 | %changelog |
---|
167 | * Sun Sep 5 2010 Ryoichi INAGAKI <ryo1@bc.wakwak.com> - 2.7.7-11 |
---|
168 | - Initial build for Vine Linux |
---|
169 | |
---|
170 | * Thu Apr 29 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 0:2.7.7-10 |
---|
171 | - Use original upstream tarball, prebuilt jars are anyway removed in %%prep |
---|
172 | - Don't overuse macros |
---|
173 | - Added explanation about headers in the C++ subpackage |
---|
174 | - Remove unnecessary Makefile and Makefile.in from %%docs, permissions fixed |
---|
175 | - Added doxygen docs for C++ as a -C++-doc subpackage |
---|
176 | - antlr-config moved into the C++ subpackage |
---|
177 | - Removed %%post and %%postun javadoc relicts from JPackage |
---|
178 | |
---|
179 | * Tue Apr 27 2010 Miloš Jakubíček <xjakub@fi.muni.cz> - 0:2.7.7-9 |
---|
180 | - Drop native build, alternatives, jedit, gcj bits and other jpackage crap |
---|
181 | - Disable debuginfo since we have only a static library. |
---|
182 | - Use %%global everywhere |
---|
183 | - Split the C++ bindings into a separate -C++ subpackage |
---|
184 | - Use -tool subpackage with Provide: antlr to make it possible to be noarch |
---|
185 | - Use sed instead of perl => drop BR: perl |
---|
186 | |
---|
187 | * Tue Apr 20 2010 Orion Poplawski <orion@cora.nwra.com> 0:2.7.7-8 |
---|
188 | - Cannot be noarch |
---|
189 | |
---|
190 | * Wed Apr 7 2010 Alexander Kurtakov <akurtako@redhat.com> 0:2.7.7-7 |
---|
191 | - Disable gcj. |
---|
192 | - Use %%global. |
---|
193 | |
---|
194 | * Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.7.7-6 |
---|
195 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild |
---|
196 | |
---|
197 | * Fri Mar 20 2009 Deepak Bhole <dbhole@redhat.com> - 0:2.7.7-5 |
---|
198 | - Include cstdio in CharScanner.hpp (needed to build with GCC 4.4) |
---|
199 | - Merge changes from includestrings patch into the above one |
---|
200 | |
---|
201 | * Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0:2.7.7-4 |
---|
202 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild |
---|
203 | |
---|
204 | * Fri Jan 09 2009 Dennis Gilmore <dennis@ausil.us> 2.7.7-3 |
---|
205 | - exlcude using mono on sparc64 |
---|
206 | |
---|
207 | * Wed Jul 9 2008 Tom "spot" Callaway <tcallawa@redhat.com> 2.7.7-2 |
---|
208 | - drop repotag |
---|
209 | |
---|
210 | * Wed Feb 27 2008 Deepak Bhole <dbhole@redhat.com> - 0:2.7.7-1jpp.7 |
---|
211 | - Add strings inclusion (for GCC 4.3) |
---|
212 | |
---|
213 | * Mon Sep 24 2007 Deepak Bhole <dbhole@redhat.com> - 0:2.7.7-1jpp.6 |
---|
214 | - Resolve bz# 242305: Remove libantlr-pic.a, and compile libantlr.a with fPIC |
---|
215 | |
---|
216 | * Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 2.7.7-1jpp.5 |
---|
217 | - Rebuild for selinux ppc32 issue. |
---|
218 | |
---|
219 | * Tue Jun 12 2007 Deepak Bhole <dbhole@redhat.com> 2.7.7-1jpp.4.fc8 |
---|
220 | - Added a PIC compiled archive (bz# 242305) |
---|
221 | |
---|
222 | * Thu Jun 07 2007 Deepak Bhole <dbhole@redhat.com> 2.7.7-1jpp.3 |
---|
223 | - Applied patch to fix conditionals (from skasal at redhat dot com) |
---|
224 | |
---|
225 | * Mon Mar 26 2007 Deepak Bhole <dbhole@redhat.com> 2.7.7-1jpp.2 |
---|
226 | - Added unowned dir to files list |
---|
227 | |
---|
228 | * Fri Jan 19 2007 Deepak Bhole <dbhole@redhat.com> 0:2.7.7-1jpp.1 |
---|
229 | - Upgrade to 2.7.7 |
---|
230 | - Resolve 172456 with patches from Vadim Nasardinov and Radu Greab |
---|
231 | |
---|
232 | * Thu Aug 03 2006 Deepak Bhole <dbhole@redhat.com> = 0:2.7.6-4jpp.2 |
---|
233 | - Add missing postun for javadoc. |
---|
234 | |
---|
235 | * Thu Aug 03 2006 Deepak Bhole <dbhole@redhat.com> = 0:2.7.6-4jpp.1 |
---|
236 | - Add missing requirements. |
---|
237 | |
---|
238 | * Sat Jul 22 2006 Thomas Fitzsimmons <fitzsim@redhat.com> - 0:2.7.6-3jpp_5fc |
---|
239 | - Unstub docs. |
---|
240 | |
---|
241 | * Sat Jul 22 2006 Jakub Jelinek <jakub@redhat.com> - 0:2.7.6-3jpp_4fc |
---|
242 | - Remove hack-libgcj requirement. |
---|
243 | |
---|
244 | * Fri Jul 21 2006 Thomas Fitzsimmons <fitzsim@redhat.com> - 0:2.7.6-3jpp_3fc |
---|
245 | - Stub docs. (dist-fc6-java) |
---|
246 | - Require hack-libgcj for build. (dist-fc6-java) |
---|
247 | - Bump release number. |
---|
248 | |
---|
249 | * Wed Jul 19 2006 Deepak Bhole <dbhole@redhat.com> = 0:2.7.6-3jpp_2fc |
---|
250 | - From gbenson@redhat: |
---|
251 | - Omit the jedit subpackage to fix dependencies. |
---|
252 | |
---|
253 | * Wed Jul 19 2006 Deepak Bhole <dbhole@redhat.com> = 0:2.7.6-3jpp_1fc |
---|
254 | - Added conditional native compilation. |
---|
255 | |
---|
256 | * Fri Jan 13 2006 Fernando Nasser <fnasser@redhat.com> - 0:2.7.6-2jpp |
---|
257 | - First JPP 1.7 build |
---|
258 | |
---|
259 | * Fri Jan 13 2006 Fernando Nasser <fnasser@redhat.com> - 0:2.7.6-1jpp |
---|
260 | - Update to 2.7.6. |
---|
261 | |
---|
262 | * Fri Aug 20 2004 Ralph Apel <r.apel at r-apel.de> - 0:2.7.4-2jpp |
---|
263 | - Build with ant-1.6.2. |
---|
264 | - Made native scripts conditional |
---|
265 | |
---|
266 | * Tue May 18 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.7.4-1jpp |
---|
267 | - Update to 2.7.4. |
---|
268 | |
---|
269 | * Fri Apr 2 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.7.3-2jpp |
---|
270 | - Create alternatives also on upgrades. |
---|
271 | |
---|
272 | * Wed Mar 31 2004 Ville Skyttä <ville.skytta at iki.fi> - 0:2.7.3-1jpp |
---|
273 | - Update to 2.7.3. |
---|
274 | - Include gcj build option and a native subpackage, build using |
---|
275 | "--with native" to get that. |
---|
276 | - Add %%{_bindir}/antlr alternative. |
---|
277 | |
---|
278 | * Mon Dec 15 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.7.2-3jpp |
---|
279 | - Add non-versioned javadoc dir symlink. |
---|
280 | - Crosslink with local J2SE javadocs. |
---|
281 | - Spec cleanups, change to UTF-8. |
---|
282 | |
---|
283 | * Sun Mar 30 2003 Ville Skyttä <ville.skytta at iki.fi> - 0:2.7.2-2jpp |
---|
284 | - Rebuild for JPackage 1.5. |
---|
285 | |
---|
286 | * Sat Mar 1 2003 Ville Skyttä <ville.skytta at iki.fi> - 2.7.2-1jpp |
---|
287 | - Update to 2.7.2. |
---|
288 | - Include antlr script and jEdit mode (see antlr-jedit RPM description). |
---|
289 | - Use sed instead of bash 2 extension when symlinking jars during build. |
---|
290 | |
---|
291 | * Tue May 07 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 2.7.1-8jpp |
---|
292 | - really section macro |
---|
293 | - hardcoded distribution and vendor tag |
---|
294 | - group tag again |
---|
295 | |
---|
296 | * Thu May 2 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 2.7.1-7jpp |
---|
297 | - distribution tag |
---|
298 | - group tag |
---|
299 | - section macro |
---|
300 | |
---|
301 | * Fri Jan 18 2002 Guillaume Rousse <guillomovitch@users.sourceforge.net> 2.7.1-6jpp |
---|
302 | - versioned dir for javadoc |
---|
303 | - no dependencies for manual and javadoc packages |
---|
304 | - additional sources in individual archives |
---|
305 | |
---|
306 | * Sat Dec 1 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 2.7.1-5jpp |
---|
307 | - javadoc in javadoc package |
---|
308 | |
---|
309 | * Wed Nov 21 2001 Christian Zoffoli <czoffoli@littlepenguin.org> 2.7.1-4jpp |
---|
310 | - removed packager tag |
---|
311 | - new jpp extension |
---|
312 | |
---|
313 | * Sat Oct 6 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 2.7.1-3jpp |
---|
314 | - used a build file instead of makefile |
---|
315 | - build classes instead of blindly jared them ! |
---|
316 | - used original tarball |
---|
317 | - corrected license spelling |
---|
318 | |
---|
319 | * Sun Sep 30 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 2.7.1-2jpp |
---|
320 | - first unified release |
---|
321 | - s/jPackage/JPackage |
---|
322 | |
---|
323 | * Tue Aug 28 2001 Guillaume Rousse <guillomovitch@users.sourceforge.net> 2.7.1-1mdk |
---|
324 | - first Mandrake release |
---|