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