  License: LGPLv2+
  Group: Development/Libraries
  BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
-@@ -474,6 +474,9 @@ Requires: numad
+@@ -444,6 +444,9 @@ Requires: numad
  Requires: dbus
  # For uid creation during pre
  Requires(pre): shadow-utils

+# <http://www.gnu.org/licenses/>.
+
+version="@VERSION@"
+COVPATH="/usr/share/doc/libvirt-docs-${version}/gcno/"
+WORKPATH="/usr/coverage/BUILD/libvirt-${version}/"
+COVERAGE_POOL="127.0.0.1:8000"
+

From 51320ad3cd08605d590436a1a53aadd0f2f8e4f9 Mon Sep 17 00:00:00 2001
From: Luyao Huang <lhuang@redhat.com>
Date: Fri, 4 Nov 2016 11:02:40 +0800
Subject: [PATCH] Virtcov for v0.10.0~

Signed-off-by: Luyao Huang <lhuang@redhat.com>
---
 Makefile.am       |   2 +-
 libvirt.spec.in   |  16 ++++-
 tools/Makefile.am |   6 ++
 tools/virtcov.in  | 208 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 230 insertions(+), 2 deletions(-)
 create mode 100644 tools/virtcov.in

diff --git a/Makefile.am b/Makefile.am
index 333e300..487523b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -50,7 +50,7 @@ $(top_srcdir)/HACKING: $(top_srcdir)/docs/hacking1.xsl $(top_srcdir)/docs/hackin
 	   > $@-t && mv $@-t $@ ; fi );
 
 rpm: clean
-	@(unset CDPATH ; $(MAKE) dist && rpmbuild -ta $(distdir).tar.gz)
+	@(unset CDPATH ; $(MAKE) dist && rpmbuild --define "_topdir /usr/coverage" -ta $(distdir).tar.gz)
 
 check-local: all tests
 
diff --git a/libvirt.spec.in b/libvirt.spec.in
index 174053d..66499d4 100644
--- a/libvirt.spec.in
+++ b/libvirt.spec.in
@@ -319,7 +319,7 @@
 Summary: Library providing a simple virtualization API
 Name: libvirt
 Version: @VERSION@
