Conditionally allow building without C++ docs

This commit is contained in:
Mikolaj Izdebski 2017-09-23 11:30:48 +02:00
parent de69e44a69
commit 9604bc8719

View File

@ -1,3 +1,4 @@
%bcond_without doxygen
%bcond_without python
%global debug_package %{nil}
@ -6,7 +7,7 @@
Summary: ANother Tool for Language Recognition
Name: antlr
Version: 2.7.7
Release: 50%{?dist}
Release: 51%{?dist}
Epoch: 0
License: Public Domain
URL: http://www.antlr2.org/
@ -30,7 +31,9 @@ BuildRequires: ant
BuildRequires: java-devel >= 1:1.7.0
BuildRequires: java-javadoc
BuildRequires: javapackages-local
%if %{with doxygen}
BuildRequires: doxygen graphviz
%endif
%if %{with python}
# Do not support Python3
BuildRequires: python2-devel
@ -77,6 +80,7 @@ Provides: antlr-static = %{version}-%{release}
%description C++
This package provides a static C++ library for parsers generated by ANTLR2.
%if %{with doxygen}
%package C++-doc
Summary: Documentation for C++ bindings for antlr2 generated parsers
BuildArch: noarch
@ -84,6 +88,7 @@ BuildArch: noarch
%description C++-doc
This package contains the documentation for the C++ bindings for parsers
generated by ANTLR2.
%endif
%if %{with python}
%package -n python2-%{name}
@ -127,11 +132,13 @@ rm antlr.jar
rm doc/{Makefile,Makefile.in}
chmod 0644 doc/*
%if %{with doxygen}
# generate doxygen docs for C++ bindings
pushd lib/cpp
doxygen doxygen.cfg
find gen_doc -type f -exec chmod 0644 {} \;
popd
%endif
%if %{with python}
# build python
@ -176,9 +183,11 @@ cd ../..
%{_libdir}/libantlr.a
%{_bindir}/antlr-config
%if %{with doxygen}
%files C++-doc
%license LICENSE.txt
%doc lib/cpp/gen_doc/html/
%endif
%files manual
%license LICENSE.txt
@ -195,6 +204,9 @@ cd ../..
%endif
%changelog
* Sat Sep 23 2017 Mikolaj Izdebski <mizdebsk@redhat.com> - 0:2.7.7-51
- Conditionally allow building without C++ docs
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0:2.7.7-50
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild