Hello community,

here is the log from the commit of package gcovr for openSUSE:Factory checked 
in at 2019-02-01 11:46:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gcovr (Old)
 and      /work/SRC/openSUSE:Factory/.gcovr.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gcovr"

Fri Feb  1 11:46:14 2019 rev:3 rq:670102 version:4.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/gcovr/gcovr.changes      2019-01-11 
14:06:34.751734236 +0100
+++ /work/SRC/openSUSE:Factory/.gcovr.new.28833/gcovr.changes   2019-02-01 
11:46:17.192500654 +0100
@@ -1,0 +2,5 @@
+Wed Jan 30 11:15:18 UTC 2019 - Dan Čermák <[email protected]>
+
+- Build documentation on Tumbleweed
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gcovr.spec ++++++
--- /var/tmp/diff_new_pack.cKO1BS/_old  2019-02-01 11:46:17.732500099 +0100
+++ /var/tmp/diff_new_pack.cKO1BS/_new  2019-02-01 11:46:17.732500099 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package gcovr
 #
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 # Copyright (c) 2019 Neal Gompa <[email protected]>.
 #
 # All modifications and additions to the file contributed by third parties
@@ -13,7 +13,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -26,9 +26,19 @@
 URL:            https://gcovr.com/
 Source0:        
https://github.com/gcovr/%{name}/archive/%{version}/%{name}-%{version}.tar.gz
 
+BuildRequires:  python-rpm-macros
 BuildRequires:  python3-devel
 BuildRequires:  python3-setuptools
-BuildRequires:  python-rpm-macros
+
+# Only build the documentation on Tumbleweed, as
+# python3-sphinxcontrib-autoprogram has not yet landed in anything
+# else
+%if 0%{?suse_version} > 1500 
+BuildRequires:  python3-Jinja2
+BuildRequires:  python3-Sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+BuildRequires:  python3-sphinxcontrib-autoprogram
+%endif
 
 Requires:       %{_bindir}/gcov
 Requires:       python3-Jinja2
@@ -46,6 +56,23 @@
 as a command-line alternative to the lcov utility, which runs gcov and
 generates an HTML-formatted report.
 
+%if 0%{?suse_version} > 1500 
+%package        doc
+Summary:        Documentation of gcovr
+Group:          Documentation/HTML
+Requires:       %{name} = %{version}-%{release}
+
+BuildRequires:  python3-Jinja2
+BuildRequires:  python3-Sphinx
+BuildRequires:  python3-sphinx_rtd_theme
+BuildRequires:  python3-sphinxcontrib-autoprogram
+
+%description    doc
+Gcovr provides a utility for managing the use of the GNU gcov utility
+and generating summarized code coverage results.
+
+This package contains the documentation of gcovr.
+%endif
 
 %prep
 %autosetup
@@ -56,6 +83,32 @@
 %install
 %py3_install
 
+%if 0%{?suse_version} > 1500 
+# the documentation can only be build **after** gcovr is installed
+# => need to set PATH, PYTHONPATH so that the installed binary & package are
+# found
+# also set PYTHON so that the sphinx Makefile picks up python3 instead of
+# python2
+export PYTHONPATH=%{buildroot}%{python3_sitelib}
+export PATH=%{buildroot}%{_bindir}:$PATH
+export PYTHON=%{__python3}
+
+pushd .
+cd doc
+
+# Manpage
+make man
+install -D -p -m 0644 build/man/%{name}.1 %{buildroot}%{_mandir}/man1/%{name}.1
+
+# html doc
+make html
+cd build
+for file in $(find html/ -type f); do
+    install -D -p -m 0644 $file %{buildroot}%{_docdir}/%{name}/$file
+done
+
+popd
+%endif
 
 %files
 %license LICENSE.txt
@@ -64,4 +117,11 @@
 %{_bindir}/%{name}
 %{python3_sitelib}/%{name}*
 
+%if 0%{?suse_version} > 1500
+%{_mandir}/man1/%{name}.1*
+
+%files          doc
+%doc %{_docdir}/%{name}/html/
+%endif
+
 %changelog


Reply via email to