2 # * Add a csharp bindings subpacakge (feel free to do it)
3 # * Package the python bindings as subpackage as well
6 %bcond_with javac # 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 URL: http://www.antlr.org/
19 BuildRequires: automake
21 BuildRequires: gcc-java
22 BuildRequires: gcc-java-tools
28 Conflicts: pccts < 1.33MR33-6
29 BuildRequires: sed >= 4.0
30 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
32 %define _javalibdir %{_datadir}/java
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.
57 #export CLASSPATH=$RPM_BUILD_DIR/%{name}-%{version}
59 cp -f /usr/share/automake/config.sub scripts
62 %{?with_javac:CLASSPATH=`pwd`} \
63 %{!?with_javac:--enable-gcj}
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT%{_javalibdir}
72 DESTDIR=$RPM_BUILD_ROOT
74 mv $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/antlr.jar $RPM_BUILD_ROOT%{_javalibdir}
76 %{__sed} -i -e "s#%{name}-%{version}#java#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 %{!?with_javac:%attr(755,root,root) %{_bindir}/antlr-java}
87 %{_includedir}/%{name}
89 # Dont separate it, antlr binary wont work without it