[1774] | 1 | %global debug_package %{nil} |
---|
| 2 | # since we have only a static library |
---|
| 3 | |
---|
| 4 | Summary: ANother Tool for Language Recognition |
---|
[9447] | 5 | Summary(ja): 構文解析器生成ツール |
---|
[1774] | 6 | Name: antlr |
---|
| 7 | Version: 2.7.7 |
---|
[9447] | 8 | Release: 12%{?_dist_release} |
---|
[1774] | 9 | |
---|
| 10 | Group: Development/Tools |
---|
| 11 | License: Public Domain |
---|
| 12 | URL: http://www.antlr.org/ |
---|
| 13 | |
---|
| 14 | Source0: http://www.antlr2.org/download/antlr-%{version}.tar.gz |
---|
| 15 | Source1: %{name}-build.xml |
---|
| 16 | Source2: %{name}-script |
---|
| 17 | Patch1: %{name}-%{version}-newgcc.patch |
---|
[9447] | 18 | # see BZ#848662 |
---|
| 19 | Patch2: antlr-examples-license.patch |
---|
[1774] | 20 | |
---|
| 21 | BuildRoot: %{_tmppath}/%{name}-%{version}-root |
---|
[9447] | 22 | BuildRequires: ant |
---|
| 23 | BuildRequires: doxygen |
---|
| 24 | BuildRequires: java-javadoc |
---|
| 25 | BuildRequires: javapackages-tools |
---|
| 26 | BuildRequires: java-devel >= 1.7.0 |
---|
| 27 | BuildRequires: mono-core |
---|
| 28 | BuildRequires: mono-winforms |
---|
| 29 | BuildRequires: python-devel |
---|
| 30 | BuildRequires: python-setuptools |
---|
[1774] | 31 | |
---|
[9447] | 32 | Requires: javapackages-tools |
---|
| 33 | Requires: java-headless >= 1.7.0 |
---|
[1774] | 34 | |
---|
| 35 | %description |
---|
| 36 | ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a |
---|
| 37 | language tool that provides a framework for constructing recognizers, |
---|
| 38 | compilers, and translators from grammatical descriptions containing |
---|
| 39 | C++ or Java actions [You can use PCCTS 1.xx to generate C-based |
---|
| 40 | parsers]. |
---|
| 41 | |
---|
| 42 | %package tool |
---|
[9447] | 43 | Summary: ANother Tool for Language Recognition |
---|
| 44 | Summary(ja): 構文解析器生成ツール |
---|
| 45 | Group: Development/Tools |
---|
| 46 | BuildArch: noarch |
---|
| 47 | Provides: %{name} = %{version}-%{release} |
---|
[1774] | 48 | |
---|
| 49 | %description tool |
---|
| 50 | ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a |
---|
| 51 | language tool that provides a framework for constructing recognizers, |
---|
| 52 | compilers, and translators from grammatical descriptions containing |
---|
| 53 | C++ or Java actions [You can use PCCTS 1.xx to generate C-based |
---|
| 54 | parsers]. |
---|
| 55 | |
---|
| 56 | %package manual |
---|
[9447] | 57 | Summary: Manual for %{name} |
---|
| 58 | Summary(ja): %{name} のマニュアル |
---|
| 59 | Group: Applications/Documentation |
---|
| 60 | BuildArch: noarch |
---|
[1774] | 61 | |
---|
| 62 | %description manual |
---|
| 63 | Documentation for %{name}. |
---|
| 64 | |
---|
| 65 | %package javadoc |
---|
[9447] | 66 | Summary: Javadoc for %{name} |
---|
| 67 | Summary(ja): %{name} の Javadoc |
---|
| 68 | Group: Documentation |
---|
| 69 | BuildArch: noarch |
---|
[1774] | 70 | |
---|
| 71 | %description javadoc |
---|
| 72 | Javadoc for %{name}. |
---|
| 73 | |
---|
| 74 | %package C++ |
---|
[9447] | 75 | Summary: C++ bindings for antlr2 generated parsers |
---|
| 76 | Summary(ja): ANTLR が生成した構文解析器用の C++ バインディング |
---|
| 77 | Group: Development/Libraries |
---|
| 78 | Provides: antlr-static = %{version}-%{release} |
---|
[1774] | 79 | |
---|
| 80 | %description C++ |
---|
| 81 | This package provides a static C++ library for parsers generated by ANTLR2. |
---|
| 82 | |
---|
| 83 | %package C++-doc |
---|
[9447] | 84 | Summary: Documentation for C++ bindings for antlr2 generated parsers |
---|
| 85 | Summary(ja): ANTLR が生成した構文解析器用の C++ バインディングのドキュメント |
---|
| 86 | Group: Documentation |
---|
| 87 | BuildArch: noarch |
---|
[1774] | 88 | |
---|
| 89 | %description C++-doc |
---|
| 90 | This package contains the documentation for the C++ bindings for parsers |
---|
| 91 | generated by ANTLR2. |
---|
| 92 | |
---|
[9447] | 93 | %package python |
---|
| 94 | Summary: Python runtime support for ANTLR-generated parsers |
---|
| 95 | Summary(ja): ANTLR が生成した構文解析器用の Python ランタイムサポート |
---|
| 96 | Group: Development/Libraries |
---|
| 97 | BuildArch: noarch |
---|
| 98 | |
---|
| 99 | %description python |
---|
| 100 | Python runtime support for ANTLR-generated parsers |
---|
| 101 | |
---|
| 102 | |
---|
[1774] | 103 | %prep |
---|
| 104 | %setup -q |
---|
| 105 | # remove all binary libs |
---|
| 106 | find . -name "*.jar" -exec rm -f {} \; |
---|
| 107 | cp -p %{SOURCE1} build.xml |
---|
| 108 | %patch1 |
---|
[9447] | 109 | %patch2 -p1 |
---|
[1774] | 110 | # CRLF->LF |
---|
| 111 | sed -i 's/\r//' LICENSE.txt |
---|
| 112 | |
---|
| 113 | %build |
---|
| 114 | ant -Dj2se.apidoc=%{_javadocdir}/java |
---|
| 115 | cp work/lib/antlr.jar . # make expects to find it here |
---|
| 116 | export CLASSPATH=. |
---|
| 117 | %configure --without-examples |
---|
| 118 | make CXXFLAGS="${CXXFLAGS} -fPIC" DEBUG=1 verbose=1 |
---|
| 119 | rm antlr.jar # no longer needed |
---|
| 120 | |
---|
| 121 | # fix doc permissions and remove Makefiles |
---|
| 122 | rm doc/{Makefile,Makefile.in} |
---|
| 123 | chmod 0644 doc/* |
---|
| 124 | |
---|
| 125 | # generate doxygen docs for C++ bindings |
---|
| 126 | pushd lib/cpp |
---|
| 127 | doxygen doxygen.cfg |
---|
| 128 | find gen_doc -type f -exec chmod 0644 {} \; |
---|
| 129 | popd |
---|
| 130 | |
---|
[9447] | 131 | # build python |
---|
| 132 | cd lib/python |
---|
| 133 | %{__python} setup.py build |
---|
| 134 | cd ../../ |
---|
| 135 | |
---|
[1774] | 136 | %install |
---|
| 137 | rm -rf $RPM_BUILD_ROOT |
---|
| 138 | mkdir -p $RPM_BUILD_ROOT{%{_includedir}/%{name},%{_libdir},%{_bindir}} |
---|
| 139 | |
---|
| 140 | # jars |
---|
| 141 | mkdir -p $RPM_BUILD_ROOT%{_javadir} |
---|
[9447] | 142 | cp -p work/lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar |
---|
[1774] | 143 | |
---|
| 144 | # script |
---|
| 145 | install -p -m 755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/antlr |
---|
| 146 | |
---|
| 147 | # C++ lib and headers, antlr-config |
---|
| 148 | |
---|
| 149 | install -p -m 644 lib/cpp/antlr/*.hpp $RPM_BUILD_ROOT%{_includedir}/%{name} |
---|
| 150 | install -p -m 644 lib/cpp/src/libantlr.a $RPM_BUILD_ROOT%{_libdir} |
---|
| 151 | install -p -m 755 scripts/antlr-config $RPM_BUILD_ROOT%{_bindir} |
---|
| 152 | |
---|
| 153 | # javadoc |
---|
[9447] | 154 | mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name} |
---|
| 155 | cp -pr work/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name} |
---|
[1774] | 156 | |
---|
[9447] | 157 | # python |
---|
| 158 | cd lib/python |
---|
| 159 | %{__python} setup.py install -O1 --skip-build --root %{buildroot} |
---|
| 160 | cd ../.. |
---|
| 161 | |
---|
| 162 | |
---|
[1774] | 163 | %clean |
---|
| 164 | rm -rf $RPM_BUILD_ROOT |
---|
| 165 | |
---|
| 166 | %files tool |
---|
| 167 | %defattr(-,root,root,-) |
---|
[9447] | 168 | %doc LICENSE.txt |
---|
| 169 | %{_bindir}/antlr |
---|
[1774] | 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,-) |
---|
[9447] | 177 | %doc LICENSE.txt |
---|
[1774] | 178 | %{_includedir}/%{name} |
---|
| 179 | %{_libdir}/libantlr.a |
---|
| 180 | %{_bindir}/antlr-config |
---|
| 181 | |
---|
| 182 | %files C++-doc |
---|
| 183 | %defattr(-,root,root,-) |
---|
[9447] | 184 | %doc LICENSE.txt |
---|
[1774] | 185 | %doc lib/cpp/gen_doc/html/ |
---|
| 186 | |
---|
| 187 | %files manual |
---|
| 188 | %defattr(-,root,root,-) |
---|
[9447] | 189 | %doc LICENSE.txt |
---|
[1774] | 190 | %doc doc/* |
---|
| 191 | |
---|
| 192 | %files javadoc |
---|
| 193 | %defattr(-,root,root,-) |
---|
[9447] | 194 | %doc LICENSE.txt |
---|
[1774] | 195 | %doc %{_javadocdir}/%{name} |
---|
| 196 | |
---|
[9447] | 197 | %files python |
---|
| 198 | %defattr(-,root,root,-) |
---|
| 199 | %doc LICENSE.txt |
---|
| 200 | %{python_sitelib}/antlr/* |
---|
| 201 | %{python_sitelib}/antlr-* |
---|
| 202 | |
---|
[1774] | 203 | %changelog |
---|
[9447] | 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 | |
---|
[1774] | 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 |
---|