antlr-vl.spec 11 KB

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