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