]> git.pld-linux.org Git - packages/antlr.git/blob - antlr.spec
- update to 2.7.5, rel. 1, fix finally the .jar location and make the antlr binary...
[packages/antlr.git] / antlr.spec
1 # TODO: 
2 #  *  Add a csharp bindings subpacakge (feel free to do it)
3 #  *  Package the python bindings as subpackage as well
4 #
5 # Conditional build:
6 %bcond_with     javac   # 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:        1
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
20 %if !%{with javac}
21 BuildRequires:  gcc-java
22 BuildRequires:  gcc-java-tools
23 %else
24 BuildRequires:  jar
25 BuildRequires:  jdk
26 Requires:       jre
27 %endif
28 Conflicts:      pccts < 1.33MR33-6
29 BuildRequires:  sed >= 4.0
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         _javalibdir     %{_datadir}/java
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
56 %build
57 #export CLASSPATH=$RPM_BUILD_DIR/%{name}-%{version}
58
59 cp -f /usr/share/automake/config.sub scripts
60
61 %configure \
62         %{?with_javac:CLASSPATH=`pwd`} \
63         %{!?with_javac:--enable-gcj}
64
65 %{__make}
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69 install -d $RPM_BUILD_ROOT%{_javalibdir}
70
71 %{__make} install \
72         DESTDIR=$RPM_BUILD_ROOT
73
74 mv $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/antlr.jar $RPM_BUILD_ROOT%{_javalibdir}
75
76 %{__sed} -i -e "s#%{name}-%{version}#java#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 %{!?with_javac:%attr(755,root,root) %{_bindir}/antlr-java}
87 %{_includedir}/%{name}
88 %{_libdir}/libantlr.a
89 # Dont separate it, antlr binary wont work without it
90 %{_javalibdir}/*.jar
This page took 0.047617 seconds and 3 git commands to generate.