]> git.pld-linux.org Git - packages/antlr.git/blame - antlr.spec
- converted to UTF-8
[packages/antlr.git] / antlr.spec
CommitLineData
37b7bddf 1# TODO:
37b7bddf 2# * add python bcond
910d46cf 3# * package the Emacs and Jedit modes
699fd5e5
JB
4#
5# Conditional build:
2a24e544 6%bcond_without gcj # use javac instead of GCJ
92bb3d9b 7%bcond_without dotnet # don't build .NET modules
699fd5e5 8#
b6b66cee 9%{?with_dotnet:%include /usr/lib/rpm/macros.mono}
10#
cbedff71 11Summary: ANother Tool for Language Recognition
dce2ef47 12Summary(pl.UTF-8): Jeszcze jedno narzędzie do rozpoznawania języka
cbedff71 13Name: antlr
f4747d8d 14Version: 2.7.7
daa87e9a 15Release: 2
cbedff71 16License: Public Domain
17Group: Development/Tools
1d445de3 18Source0: http://www.antlr.org/download/%{name}-%{version}.tar.gz
f4747d8d 19# Source0-md5: 01cc9a2a454dd33dcd8c856ec89af090
3fcd93ca 20Patch0: %{name}-DESTDIR.patch
cbedff71 21URL: http://www.antlr.org/
910d46cf 22BuildRequires: autoconf
699fd5e5 23BuildRequires: automake
f2b9dcc3 24BuildRequires: libstdc++-devel
910d46cf
JB
25%{?with_dotnet:BuildRequires: mono-csharp}
26BuildRequires: python
27BuildRequires: sed >= 4.0
7caa83ad 28%if %{with gcj}
6bc104b5
PS
29BuildRequires: gcc-java >= 5:4.0.0
30BuildRequires: gcc-java-tools >= 5:4.0.0
d6eb2976 31Requires: /usr/bin/gij
699fd5e5
JB
32%else
33BuildRequires: jar
34BuildRequires: jdk
35Requires: jre
36%endif
be010786 37Conflicts: pccts < 1.33MR33-6
cbedff71 38BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
39
40%description
37b7bddf 41ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a
42language tool that provides a framework for constructing recognizers,
43compilers, and translators from grammatical descriptions containing
44Java, C#, or C++ actions. ANTLR is popular because it is easy to
45understand, powerful, flexible, generates human-readable output, and
46comes with complete source. ANTLR provides excellent support for tree
47construction, tree walking, and translation.
cbedff71 48
dce2ef47 49%description -l pl.UTF-8
0969fdb0 50ANTLR (ANother Tool for Language Recognition; poprzednio znane jako
dce2ef47
JR
51PCCTS) to narzędzie językowe dostarczające szkielet do tworzenia
52programów rozpoznających języki, kompilatorów, translatorów z opisów
53gramatycznych obejmujących Javę, C# lub C++. ANTLR jest popularne
54ponieważ jest łatwe do zrozumienia, potężne, elastyczne, generuje
55wyjście czytelne dla człowieka i jest dostępne z pełnymi źródłami.
56ANTLR ma świetne wsparcie dla tworzenia drzew, przechodzenia po
0969fdb0 57drzewach oraz translacji.
cbedff71 58
92bb3d9b
PS
59%package -n dotnet-antlr
60Summary: .NET support for ANTLR
dce2ef47 61Summary(pl.UTF-8): Moduły języka .NET dla biblioteki ANTLR
92bb3d9b
PS
62Group: Libraries
63
64%description -n dotnet-antlr
65.NET support for ANTLR.
66
dce2ef47
JR
67%description -n dotnet-antlr -l pl.UTF-8
68Moduły języka .NET dla biblioteki ANTLR.
92bb3d9b
PS
69
70%package -n python-antlr
910d46cf 71Summary: Python runtime support for ANTLR-generated parsers
dce2ef47 72Summary(pl.UTF-8): Moduł uruchomieniowy języka Python dla analizatorów ANTLR
37b7bddf 73Group: Libraries/Python
37b7bddf 74%pyrequires_eq python-libs
75
92bb3d9b 76%description -n python-antlr
910d46cf 77Python runtime support for ANTLR-generated parsers.
37b7bddf 78
dce2ef47
JR
79%description -n python-antlr -l pl.UTF-8
80Moduł uruchomieniowy języka Python dla analizatorów wygenerowanych
910d46cf 81przez ANTLR.
37b7bddf 82
31e07e85
83%package examples
84Summary: Examples of ANTLR usage
dce2ef47 85Summary(pl.UTF-8): Przykładowe programy używające ANTLR
31e07e85
86Group: Development
87Requires: %{name} = %{epoch}:%{version}-%{release}
88
89%description examples
90Examples of ANTLR usage.
91
dce2ef47
JR
92%description examples -l pl.UTF-8
93Przykładowe programy używające ANTLR.
31e07e85 94
cbedff71 95%prep
1d445de3 96%setup -q
ac7d2958 97%patch0 -p1
cbedff71 98
99%build
699fd5e5 100cp -f /usr/share/automake/config.sub scripts
910d46cf 101%{__autoconf}
f469e294 102%configure \
92bb3d9b
PS
103 --enable-cxx \
104 %{?with_dotnet:--enable-csharp} \
1c229459 105 %{!?with_dotnet:--disable-csharp} \
b877073f 106 %{!?with_gcj:CLASSPATH=`pwd` --with-java=java --with-javac=javac --with-jar=jar} \
daa87e9a 107 %{?with_gcj:--with-java=gij --with-javac=gcj --with-jar=jar}
cbedff71 108
5482314e 109CXXFLAGS="%{rpmcxxflags}" \
cbedff71 110%{__make}
111
112%install
113rm -rf $RPM_BUILD_ROOT
235272ff 114install -d $RPM_BUILD_ROOT{%{_javadir},%{py_sitescriptdir}/%{name},%{_prefix}/lib/mono/%{name},%{_examplesdir}/%{name}-%{version}}
cbedff71 115
116%{__make} install \
117 DESTDIR=$RPM_BUILD_ROOT
118
7caa83ad
PS
119install $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/antlr.jar \
120 $RPM_BUILD_ROOT%{_javadir}
37b7bddf 121install $RPM_BUILD_ROOT%{_datadir}/%{name}-%{version}/*.py \
122 $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}
31e07e85 123cp -Rf examples/{cpp,csharp,java,python} \
6918e3c1 124 $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
235272ff 125find $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} -name Makefile -exec rm -f {} \;
b6b66cee 126
127%{?with_dotnet:install lib/*.dll $RPM_BUILD_ROOT%{_prefix}/lib/mono/%{name}}
37b7bddf 128
129%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}
130%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}
131rm $RPM_BUILD_ROOT%{py_sitescriptdir}/%{name}/*.py
3fcd93ca 132
7caa83ad 133%{__sed} -i -e "s,ANTLR_JAR=.*,ANTLR_JAR=\"%{_javadir}/antlr.jar\",g" $RPM_BUILD_ROOT%{_bindir}/antlr
c49ecfd2 134
cbedff71 135%clean
136rm -rf $RPM_BUILD_ROOT
137
138%files
139%defattr(644,root,root,755)
1d445de3 140%doc doc/*
cbedff71 141%attr(755,root,root) %{_bindir}/antlr
142%attr(755,root,root) %{_bindir}/antlr-config
143%{_includedir}/%{name}
144%{_libdir}/libantlr.a
3fcd93ca 145# Dont separate it, antlr binary wont work without it
7caa83ad 146%{_javadir}/*.jar
37b7bddf 147
92bb3d9b
PS
148%if %{with dotnet}
149%files -n dotnet-antlr
150%defattr(644,root,root,755)
2a24e544 151%dir %{_prefix}/lib/mono/%{name}
92bb3d9b
PS
152%{_prefix}/lib/mono/%{name}/*.dll
153%endif
154
155%files -n python-antlr
37b7bddf 156%defattr(644,root,root,755)
157%{py_sitescriptdir}/%{name}
31e07e85
158
159%files examples
160%defattr(644,root,root,755)
6918e3c1 161%{_examplesdir}/%{name}-%{version}
This page took 0.092114 seconds and 4 git commands to generate.