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