Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Summary: ANother Tool for Language Recognition
Name: antlr3
Version: 3.1.1
Release: 1%{?dist}
# Utility file, in conversation with upstream about this
Source1: antlr-clean-generated
License: BSD
Group: Development/Libraries
BuildArch: noarch
BuildRoot:  %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: java-devel >= 1:1.6.0
# For cleaner script
BuildRequires: python
BuildRequires: ant, stringtemplate, ant-antlr, ant-junit
BuildRequires: jpackage-utils
Requires: jpackage-utils

ANother Tool for Language Recognition, is a language tool
that provides a framework for constructing recognizers,
interpreters, compilers, and translators from grammatical 
descriptions containing actions in a variety of target languages.

%package        python
Group:          Development/Libraries
Summary:        Python runtime support for ANTLR-generated parsers
BuildRequires:  python-devel
BuildRequires:  python-setuptools-devel
BuildArch:      noarch

%description    python
Python runtime support for ANTLR-generated parsers

%setup -q -n antlr-%{version}

rm -f lib/*.jar
build-jar-repository -s -p lib stringtemplate
# Clean out generated files upstream includes
%{__python} %{SOURCE1} .
# Build

# Build the python runtime
cd runtime/Python
%{__python} build
cd ../..

install -D build/antlr-%{version}.jar $RPM_BUILD_ROOT%{_datadir}/java/antlr3.jar

cd runtime/Python
%{__python} install -O1 --skip-build --root %{buildroot}
cd ../..


%doc README.txt LICENSE.txt

%files python

* Mon Nov  3 2008 Bart Vanbrabant <> - 3.1.1-1
- Update to version 3.1.1
- Add python runtime subpackage

* Fri Jun 27 2008 Colin Walters <> - 3.0.1-2
- Fix some BRs

* Sun Apr 06 2008 Colin Walters <> - 3.0.1-1
- First version