]> git.pld-linux.org Git - packages/antlr.git/blob - antlr.spec
- packaged python files
[packages/antlr.git] / antlr.spec
1 # TODO:
2 #  *  Add a csharp bindings subpackage (feel free to do it)
3 #  *  add python bcond
4 #  *  add an axamples subpackage (and python-examples as well)
5 #
6 # Conditional build:
7 %bcond_without  gcj     # use javac instead of GCJ
8 #
9 Summary:        ANother Tool for Language Recognition
10 Summary(pl):    Jeszcze jedno narzêdzie do rozpoznawania jêzyka
11 Name:           antlr
12 Version:        2.7.5
13 Release:        4
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
22 %if %{with gcj}
23 BuildRequires:  gcc-java >= 5:4.0.0
24 BuildRequires:  gcc-java-tools >= 5:4.0.0
25 Requires:       /usr/bin/gij
26 %else
27 BuildRequires:  jar
28 BuildRequires:  jdk
29 Requires:       jre
30 %endif
31 Conflicts:      pccts < 1.33MR33-6
32 BuildRequires:  sed >= 4.0
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
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.
43
44 %description -l pl
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.
53
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
60
61 %description -n python-%{name}
62 Python support for ANTLR.
63
64 %description -n python-%{name} -l pl
65 Modu³y jêzyka Python dla biblioteki ANTLR.
66
67 %prep
68 %setup -q
69 %patch0 -p1
70 %patch1 -p1
71
72 %build
73 cp -f /usr/share/automake/config.sub scripts
74
75 %configure \
76         %{!?with_gcj:CLASSPATH=`pwd` --with-javac=javac} \
77         %{?with_gcj:--with-javac=gcj --with-jar=fastjar}
78
79 %{__make}
80
81 %install
82 rm -rf $RPM_BUILD_ROOT
83 install -d $RPM_BUILD_ROOT{%{_javadir},%{py_sitescriptdir}/%{name}}
84
85 %{__make} install \
86         DESTDIR=$RPM_BUILD_ROOT
87
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}
92
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
96
97 %{__sed} -i -e "s,ANTLR_JAR=.*,ANTLR_JAR=\"%{_javadir}/antlr.jar\",g" $RPM_BUILD_ROOT%{_bindir}/antlr
98
99
100 %clean
101 rm -rf $RPM_BUILD_ROOT
102
103 %files
104 %defattr(644,root,root,755)
105 %doc doc/*
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
111 %{_javadir}/*.jar
112
113 %files -n python-%{name}
114 %defattr(644,root,root,755)
115 %{py_sitescriptdir}/%{name}
This page took 0.073296 seconds and 3 git commands to generate.