[waf] - Enable building without html docs.

Thomas Moschny thm at fedoraproject.org
Tue Jan 18 18:55:57 UTC 2011


commit c38965408c6141290f7c1cf07558ffbb2d8ca426
Author: Thomas Moschny <thm at fedoraproject.org>
Date:   Tue Jan 18 19:55:32 2011 +0100

    - Enable building without html docs.

 waf.spec |   16 +++++++++++++++-
 1 files changed, 15 insertions(+), 1 deletions(-)
---
diff --git a/waf.spec b/waf.spec
index 2f5c7a2..ca30352 100644
--- a/waf.spec
+++ b/waf.spec
@@ -1,6 +1,10 @@
+# Enable building without html docs (e.g. in case no recent sphinx is
+# available)
+%global with_docs 1
+
 Name:           waf
 Version:        1.6.2
-Release:        1%{?dist}
+Release:        2%{?dist}
 Summary:        A Python-based build system
 Group:          Development/Tools
 # The entire source code is BSD apart from pproc.py (taken from Python 2.5)
@@ -16,7 +20,9 @@ Patch0:         waf-1.6.2-libdir.patch
 BuildRoot:      %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
 BuildArch:      noarch
 BuildRequires:  python-devel
+%if 0%{?with_docs}
 BuildRequires:  python-sphinx
+%endif # with_docs
 BuildRequires:  graphviz
 BuildRequires:  ImageMagick
 # Seems like automatic ABI dependency is not detected since the files are
@@ -51,9 +57,12 @@ for f in waflib/extras/*.py ; do
 done
 ./waf-light --make-waf --strip --tools="$extras"
 
+%if 0%{?with_docs}
 # build html docs
 pushd docs/sphinx
 ../../waf configure build
+popd
+%endif # with_docs
 
 
 %install
@@ -87,12 +96,17 @@ rm -rf %{buildroot}
 %files
 %defattr(-,root,root,-)
 %doc README TODO ChangeLog demos
+%if 0%{?with_docs}
 %doc docs/sphinx/build/html
+%endif # with_docs
 %{_bindir}/waf
 %{_datadir}/waf
 
 
 %changelog
+* Tue Jan 18 2011 Thomas Moschny <thomas.moschny at gmx.de> - 1.6.2-2
+- Enable building without html docs.
+
 * Sat Jan 15 2011 Thomas Moschny <thomas.moschny at gmx.de> - 1.6.2-1
 - Update to 1.6.2.
 - Generate and include html docs.


More information about the scm-commits mailing list