antlr-vl.spec 10 KB

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