2 # * Add a csharp bindings subpackage (feel free to do it)
3 # * Package the python bindings as subpackage as well
6 %bcond_without gcj # use javac instead of GCJ
8 Summary: ANother Tool for Language Recognition
9 Summary(pl): Jeszcze jedno narzêdzie do rozpoznawania jêzyka
13 License: Public Domain
14 Group: Development/Tools
15 Source0: http://www.antlr.org/download/%{name}-%{version}.tar.gz
16 # Source0-md5: 1ef201f29283179c8e5ab618529cac78
17 Patch0: %{name}-DESTDIR.patch
18 Patch1: %{name}-remove-ugly-gcj-hack.patch
19 URL: http://www.antlr.org/
20 BuildRequires: automake
22 BuildRequires: gcc-java >= 5:4.0.0
23 BuildRequires: gcc-java-tools >= 5:4.0.0
24 Requires: /usr/bin/gij
30 Conflicts: pccts < 1.33MR33-6
31 BuildRequires: sed >= 4.0
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35 ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a language
36 tool that provides a framework for constructing recognizers, compilers, and
37 translators from grammatical descriptions containing Java, C#, or C++ actions.
38 ANTLR is popular because it is easy to understand, powerful, flexible,
39 generates human-readable output, and comes with complete source. ANTLR provides
40 excellent support for tree construction, tree walking, and translation.
43 ANTLR (ANother Tool for Language Recognition; poprzednio znane jako
44 PCCTS) to narzêdzie jêzykowe dostarczaj±ce szkielet do tworzenia
45 programów rozpoznaj±cych jêzyki, kompilatorów, translatorów z opisów
46 gramatycznych obejmuj±cych Javê, C# lub C++. ANTLR jest popularne
47 poniewa¿ jest ³atwe do zrozumienia, potê¿ne, elastyczne, generuje
48 wyj¶cie czytelne dla cz³owieka i jest dostêpne z pe³nymi ¼ród³ami.
49 ANTLR ma ¶wietne wsparcie dla tworzenia drzew, przechodzenia po
50 drzewach oraz translacji.
58 cp -f /usr/share/automake/config.sub scripts
61 %{!?with_gcj:CLASSPATH=`pwd` --with-javac=javac} \
62 %{?with_gcj:--with-javac=gcj --with-jar=fastjar}
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT%{_javadir}
71 DESTDIR=$RPM_BUILD_ROOT
73 install $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/antlr.jar \
74 $RPM_BUILD_ROOT%{_javadir}
76 %{__sed} -i -e "s,ANTLR_JAR=.*,ANTLR_JAR=\"%{_javadir}/antlr.jar\",g" $RPM_BUILD_ROOT%{_bindir}/antlr
79 rm -rf $RPM_BUILD_ROOT
82 %defattr(644,root,root,755)
84 %attr(755,root,root) %{_bindir}/antlr
85 %attr(755,root,root) %{_bindir}/antlr-config
86 %{_includedir}/%{name}
88 # Dont separate it, antlr binary wont work without it