diff --git a/antlr.spec b/antlr.spec index 376f702..f0a9a29 100644 --- a/antlr.spec +++ b/antlr.spec @@ -1,10 +1,12 @@ +%bcond_without python + %global debug_package %{nil} # since we have only a static library Summary: ANother Tool for Language Recognition Name: antlr Version: 2.7.7 -Release: 46%{?dist} +Release: 47%{?dist} Epoch: 0 License: Public Domain URL: http://www.antlr2.org/ @@ -29,9 +31,11 @@ BuildRequires: java-devel >= 1:1.7.0 BuildRequires: java-javadoc BuildRequires: javapackages-local BuildRequires: doxygen graphviz +%if %{with python} # Do not support Python3 BuildRequires: python-devel BuildRequires: python-setuptools +%endif %description ANTLR, ANother Tool for Language Recognition, (formerly PCCTS) is a @@ -82,12 +86,14 @@ BuildArch: noarch This package contains the documentation for the C++ bindings for parsers generated by ANTLR2. +%if %{with python} %package python Summary: Python runtime support for ANTLR-generated parsers BuildArch: noarch %description python Python runtime support for ANTLR-generated parsers +%endif %prep %setup -q @@ -122,10 +128,12 @@ pushd lib/cpp find gen_doc -type f -exec chmod 0644 {} \; popd +%if %{with python} # build python cd lib/python %py2_build cd ../../ +%endif %install # jars, POM and depmap @@ -142,10 +150,12 @@ install -p -m 644 lib/cpp/antlr/*.hpp $RPM_BUILD_ROOT%{_includedir}/%{name} install -p -m 644 lib/cpp/src/libantlr.a $RPM_BUILD_ROOT%{_libdir} install -p -m 755 scripts/antlr-config $RPM_BUILD_ROOT%{_bindir} +%if %{with python} # python cd lib/python %py2_install cd ../.. +%endif %files tool -f .mfiles @@ -172,12 +182,17 @@ cd ../.. %files javadoc -f .mfiles-javadoc %license LICENSE.txt +%if %{with python} %files python %license LICENSE.txt %{python2_sitelib}/antlr/* %{python2_sitelib}/antlr-* +%endif %changelog +* Thu Feb 16 2017 Michael Simacek - 0:2.7.7-47 +- Add conditional for python + * Wed Feb 15 2017 Mikolaj Izdebski - 0:2.7.7-46 - Generalize requires on python2 packages