source: projects/specs/trunk/a/antlr/antlr-vl.spec @ 9447

Revision 9447, 11.1 KB checked in by inagaki, 9 years ago (diff)

2015-03-21 Ryoichi INAGAKi <ryo1@…>

  • antlr, junit, xalan-j2: updated
  • bcel, xml-stylebook: new


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