[antlr/f14/master] - Remove INSTALL.txt (fix BZ#661626) - add python subpackage (fix BZ#505312)

Miloš Jakubíček mjakubicek at fedoraproject.org
Mon Feb 7 12:42:07 UTC 2011


commit 14e96cd4c9dfbbc3a95bb43f356c01c6c215586f
Author: Milos Jakubicek <xjakub at fi.muni.cz>
Date:   Mon Feb 7 12:04:14 2011 +0100

    - Remove INSTALL.txt (fix BZ#661626)
    - add python subpackage (fix BZ#505312)

 antlr.spec |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)
---
diff --git a/antlr.spec b/antlr.spec
index a7681ba..ccb6755 100644
--- a/antlr.spec
+++ b/antlr.spec
@@ -4,7 +4,7 @@
 Summary:		ANother Tool for Language Recognition
 Name:			antlr
 Version:		2.7.7
-Release:		13%{?dist}
+Release:		14%{?dist}
 Epoch:			0
 License:		Public Domain
 URL:			http://www.antlr.org/
@@ -84,6 +84,16 @@ BuildArch:		noarch
 This package contains the documentation for the C++ bindings for parsers
 generated by ANTLR2.
 
+%package		python
+Group:			Development/Libraries
+Summary:		Python runtime support for ANTLR-generated parsers
+BuildRequires:	python2-devel
+BuildRequires:	python-setuptools-devel
+BuildArch:		noarch
+
+%description	python
+Python runtime support for ANTLR-generated parsers
+
 %prep
 %setup -q
 # remove all binary libs
@@ -111,6 +121,11 @@ pushd lib/cpp
 	find gen_doc -type f -exec chmod 0644 {} \;
 popd
 
+# build python
+cd lib/python
+%{__python} setup.py build
+cd ../../
+
 %install
 rm -rf $RPM_BUILD_ROOT
 mkdir -p $RPM_BUILD_ROOT{%{_includedir}/%{name},%{_libdir},%{_bindir}}
@@ -134,6 +149,11 @@ mkdir -p $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
 cp -pr work/api/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
 ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
 
+# python
+cd lib/python
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+cd ../..
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -165,7 +185,16 @@ rm -rf $RPM_BUILD_ROOT
 %doc %{_javadocdir}/%{name}-%{version}
 %doc %{_javadocdir}/%{name}
 
+%files python
+%defattr(-,root,root,-)
+%{python_sitelib}/antlr/*
+%{python_sitelib}/antlr-*
+
 %changelog
+* Mon Feb 07 2011 Miloš Jakubíček <xjakub at fi.muni.cz> - 0:2.7.7-14
+- Remove INSTALL.txt (fix BZ#661626)
+- add python subpackage (fix BZ#505312)
+
 * Mon Feb 07 2011 Miloš Jakubíček <xjakub at fi.muni.cz> - 0:2.7.7-13
 - Added missing Obsoletes: antlr on antlr-tool (fix BZ#603466)
 


More information about the scm-commits mailing list