]> git.pld-linux.org Git - packages/antlr.git/blob - antlr.spec
- needs gij at runtime
[packages/antlr.git] / antlr.spec
1 # TODO: 
2 #  *  Add a csharp bindings subpackage (feel free to do it)
3 #  *  Package the python bindings as subpackage as well
4 #
5 # Conditional build:
6 %bcond_without  gcj     # use javac instead of GCJ
7 #
8 Summary:        ANother Tool for Language Recognition
9 Summary(pl):    Jeszcze jedno narzêdzie do rozpoznawania jêzyka
10 Name:           antlr
11 Version:        2.7.5
12 Release:        3
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
21 %if %{with gcj}
22 BuildRequires:  gcc-java >= 5:4.0.0
23 BuildRequires:  gcc-java-tools >= 5:4.0.0
24 Requires:       /usr/bin/gij
25 %else
26 BuildRequires:  jar
27 BuildRequires:  jdk
28 Requires:       jre
29 %endif
30 Conflicts:      pccts < 1.33MR33-6
31 BuildRequires:  sed >= 4.0
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
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. 
41
42 %description -l pl
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.
51
52 %prep
53 %setup -q
54 %patch0 -p1
55 %patch1 -p1
56
57 %build
58 cp -f /usr/share/automake/config.sub scripts
59
60 %configure \
61         %{!?with_gcj:CLASSPATH=`pwd` --with-javac=javac} \
62         %{?with_gcj:--with-javac=gcj --with-jar=fastjar}
63
64 %{__make}
65
66 %install
67 rm -rf $RPM_BUILD_ROOT
68 install -d $RPM_BUILD_ROOT%{_javadir}
69
70 %{__make} install \
71         DESTDIR=$RPM_BUILD_ROOT
72
73 install $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/antlr.jar \
74         $RPM_BUILD_ROOT%{_javadir}
75
76 %{__sed} -i -e "s,ANTLR_JAR=.*,ANTLR_JAR=\"%{_javadir}/antlr.jar\",g" $RPM_BUILD_ROOT%{_bindir}/antlr
77
78 %clean
79 rm -rf $RPM_BUILD_ROOT
80
81 %files
82 %defattr(644,root,root,755)
83 %doc doc/*
84 %attr(755,root,root) %{_bindir}/antlr
85 %attr(755,root,root) %{_bindir}/antlr-config
86 %{_includedir}/%{name}
87 %{_libdir}/libantlr.a
88 # Dont separate it, antlr binary wont work without it
89 %{_javadir}/*.jar
This page took 0.092431 seconds and 4 git commands to generate.