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