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