2 # * Add a csharp bindings subpackage (feel free to do it)
4 # * add an axamples subpackage (and python-examples as well)
7 %bcond_without gcj # use javac instead of GCJ
9 Summary: ANother Tool for Language Recognition
10 Summary(pl): Jeszcze jedno narzêdzie do rozpoznawania jêzyka
14 License: Public Domain
15 Group: Development/Tools
16 Source0: http://www.antlr.org/download/%{name}-%{version}.tar.gz
17 # Source0-md5: 1ef201f29283179c8e5ab618529cac78
18 Patch0: %{name}-DESTDIR.patch
19 Patch1: %{name}-remove-ugly-gcj-hack.patch
20 URL: http://www.antlr.org/
21 BuildRequires: automake
23 BuildRequires: gcc-java >= 5:4.0.0
24 BuildRequires: gcc-java-tools >= 5:4.0.0
25 Requires: /usr/bin/gij
31 Conflicts: pccts < 1.33MR33-6
32 BuildRequires: sed >= 4.0
33 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
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 Java, C#, or C++ actions. ANTLR is popular because it is easy to
40 understand, powerful, flexible, generates human-readable output, and
41 comes with complete source. ANTLR provides excellent support for tree
42 construction, tree walking, and translation.
45 ANTLR (ANother Tool for Language Recognition; poprzednio znane jako
46 PCCTS) to narzêdzie jêzykowe dostarczaj±ce szkielet do tworzenia
47 programów rozpoznaj±cych jêzyki, kompilatorów, translatorów z opisów
48 gramatycznych obejmuj±cych Javê, C# lub C++. ANTLR jest popularne
49 poniewa¿ jest ³atwe do zrozumienia, potê¿ne, elastyczne, generuje
50 wyj¶cie czytelne dla cz³owieka i jest dostêpne z pe³nymi ¼ród³ami.
51 ANTLR ma ¶wietne wsparcie dla tworzenia drzew, przechodzenia po
52 drzewach oraz translacji.
54 %package -n python-%{name}
55 Summary: Python support for ANTLR
56 Summary(pl): Modu³y jêzyka Python dla biblioteki ANTLR
57 Group: Libraries/Python
58 Requires: %{name} = %{epoch}:%{version}-%{release}
59 %pyrequires_eq python-libs
61 %description -n python-%{name}
62 Python support for ANTLR.
64 %description -n python-%{name} -l pl
65 Modu³y jêzyka Python dla biblioteki ANTLR.
73 cp -f /usr/share/automake/config.sub scripts
76 %{!?with_gcj:CLASSPATH=`pwd` --with-javac=javac} \
77 %{?with_gcj:--with-javac=gcj --with-jar=fastjar}
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT{%{_javadir},%{py_sitescriptdir}/%{name}}
86 DESTDIR=$RPM_BUILD_ROOT
88 install $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/antlr.jar \
89 $RPM_BUILD_ROOT%{_javadir}
90 install $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/*.py \
91 $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}
93 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}
94 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}
95 rm $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/*.py
97 %{__sed} -i -e "s,ANTLR_JAR=.*,ANTLR_JAR=\"%{_javadir}/antlr.jar\",g" $RPM_BUILD_ROOT%{_bindir}/antlr
101 rm -rf $RPM_BUILD_ROOT
104 %defattr(644,root,root,755)
106 %attr(755,root,root) %{_bindir}/antlr
107 %attr(755,root,root) %{_bindir}/antlr-config
108 %{_includedir}/%{name}
109 %{_libdir}/libantlr.a
110 # Dont separate it, antlr binary wont work without it
113 %files -n python-%{name}
114 %defattr(644,root,root,755)
115 %{py_sitescriptdir}/%{name}