2008-11-06 10:53:46 +00:00
|
|
|
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
|
|
|
|
|
2008-07-01 17:42:02 +00:00
|
|
|
Summary: ANother Tool for Language Recognition
|
|
|
|
Name: antlr3
|
2008-11-06 10:53:46 +00:00
|
|
|
Version: 3.1.1
|
2009-07-24 16:55:10 +00:00
|
|
|
Release: 8%{?dist}
|
2008-07-01 17:42:02 +00:00
|
|
|
URL: http://www.antlr.org/
|
2008-11-06 10:53:46 +00:00
|
|
|
Source0: http://www.antlr.org/download/antlr-3.1.1.tar.gz
|
2008-07-01 17:42:02 +00:00
|
|
|
# Utility file, in conversation with upstream about this
|
|
|
|
Source1: antlr-clean-generated
|
2008-11-10 13:52:51 +00:00
|
|
|
Source2: antlr3
|
2008-07-01 17:42:02 +00:00
|
|
|
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
|
2009-01-12 22:01:24 +00:00
|
|
|
# The build.xml uses this to version the jar
|
|
|
|
BuildRequires: bcel
|
2008-07-01 17:42:02 +00:00
|
|
|
BuildRequires: jpackage-utils
|
|
|
|
Requires: jpackage-utils
|
2008-11-10 13:52:51 +00:00
|
|
|
Requires: antlr
|
|
|
|
Requires: stringtemplate
|
2008-07-01 17:42:02 +00:00
|
|
|
|
|
|
|
%description
|
|
|
|
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.
|
|
|
|
|
2008-11-06 10:53:46 +00:00
|
|
|
%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
|
|
|
|
|
2008-07-01 17:42:02 +00:00
|
|
|
%prep
|
|
|
|
%setup -q -n antlr-%{version}
|
|
|
|
|
|
|
|
%build
|
|
|
|
rm -f lib/*.jar
|
2009-01-12 23:38:35 +00:00
|
|
|
build-jar-repository -s -p lib stringtemplate bcel
|
2008-07-01 17:42:02 +00:00
|
|
|
# Clean out generated files upstream includes
|
2008-11-06 10:53:46 +00:00
|
|
|
%{__python} %{SOURCE1} .
|
2008-07-01 17:42:02 +00:00
|
|
|
# Build
|
|
|
|
ant
|
|
|
|
|
2008-11-06 10:53:46 +00:00
|
|
|
# Build the python runtime
|
|
|
|
cd runtime/Python
|
|
|
|
%{__python} setup.py build
|
|
|
|
cd ../..
|
|
|
|
|
2008-07-01 17:42:02 +00:00
|
|
|
%install
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
2009-03-17 21:15:51 +00:00
|
|
|
install -D build/antlr.jar $RPM_BUILD_ROOT%{_datadir}/java/antlr3.jar
|
2008-11-10 13:52:51 +00:00
|
|
|
install -D -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/antlr3
|
2008-11-06 10:53:46 +00:00
|
|
|
|
|
|
|
cd runtime/Python
|
|
|
|
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
|
|
|
|
cd ../..
|
2008-07-01 17:42:02 +00:00
|
|
|
|
|
|
|
%clean
|
|
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
%files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%doc README.txt LICENSE.txt
|
|
|
|
%{_datadir}/java/*.jar
|
2008-11-10 13:52:51 +00:00
|
|
|
%{_bindir}/antlr3
|
2008-07-01 17:42:02 +00:00
|
|
|
|
2008-11-06 10:53:46 +00:00
|
|
|
%files python
|
|
|
|
%defattr(0644,root,root,0755)
|
|
|
|
%{python_sitelib}/antlr3/*
|
|
|
|
%{python_sitelib}/antlr_python_runtime-*
|
|
|
|
|
2008-07-01 17:42:02 +00:00
|
|
|
%changelog
|
2009-07-24 16:55:10 +00:00
|
|
|
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-8
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
|
|
2009-03-17 21:15:51 +00:00
|
|
|
* Mon Mar 17 2009 Bart Vanbrabant <bart.vanbrabant@zoeloelip.be> - 3.1.1-7
|
|
|
|
- Fix the name of the jar to antlr.jar
|
|
|
|
|
2009-02-24 01:13:59 +00:00
|
|
|
* Mon Feb 23 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.1.1-6
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
|
|
2009-01-12 23:38:35 +00:00
|
|
|
* Mon Jan 12 2009 Colin Walters <walters@redhat.com> - 3.1.1-5
|
|
|
|
- Add bcel to build path
|
|
|
|
|
2009-01-12 22:01:24 +00:00
|
|
|
* Mon Jan 12 2009 Colin Walters <walters@redhat.com> - 3.1.1-4
|
|
|
|
- Add bcel build dep to version jar name
|
|
|
|
|
2008-11-10 13:52:51 +00:00
|
|
|
* Mon Nov 10 2008 Colin Walters <walters@redhat.com> - 3.1.1-3
|
|
|
|
- Add antlr3 script
|
|
|
|
|
2008-11-06 11:12:28 +00:00
|
|
|
* Mon Nov 6 2008 Bart Vanbrabant <bart.vanbrabant@zoeloelip.be> - 3.1.1-2
|
|
|
|
- Fix the install of the jar (remove the version)
|
|
|
|
|
2008-11-06 10:53:46 +00:00
|
|
|
* Mon Nov 3 2008 Bart Vanbrabant <bart.vanbrabant@zoeloelip.be> - 3.1.1-1
|
|
|
|
- Update to version 3.1.1
|
|
|
|
- Add python runtime subpackage
|
|
|
|
|
2008-07-01 17:42:02 +00:00
|
|
|
* Fri Jun 27 2008 Colin Walters <walters@redhat.com> - 3.0.1-2
|
|
|
|
- Fix some BRs
|
|
|
|
|
|
|
|
* Sun Apr 06 2008 Colin Walters <walters@redhat.com> - 3.0.1-1
|
|
|
|
- First version
|