diff --git a/pacemaker.spec b/pacemaker.spec index 0337ad3..1199fe9 100644 --- a/pacemaker.spec +++ b/pacemaker.spec @@ -2,7 +2,7 @@ %global uname hacluster %global pcmk_docdir %{_docdir}/%{name} -%global specversion 2.rev4 +%global specversion 2.rev5 %global commit 6052cd16c2f455809f8088af76ce86483bf98353 %global shortcommit %(c=%{commit}; echo ${c:0:7}) %global github_owner ClusterLabs @@ -25,6 +25,9 @@ # Build with/without support for profiling tools %bcond_with profiling +# Include Build with/without support for performing coverage analysis +%bcond_with coverage + # We generate docs using Publican, Asciidoc and Inkscape, but they're not available everywhere %bcond_without doc @@ -117,7 +120,7 @@ when related resources fail and can be configured to periodically check resource health. Available rpmbuild rebuild options: - --with(out) : stonithd doc profiling pre_release upstart_job + --with(out) : stonithd doc coverage profiling pre_release upstart_job %package cli License: GPLv2+ and LGPLv2+ @@ -234,6 +237,7 @@ find . -exec touch \{\} \; # RHEL <= 5 does not support --docdir docdir=%{pcmk_docdir} %{configure} \ %{?with_profiling: --with-profiling} \ + %{?with_coverage: --with-coverage} \ --with-initdir=%{_initrddir} \ --localstatedir=%{_var} \ --with-version=%{version}-%{release} @@ -276,7 +280,7 @@ rm -f %{buildroot}/%{_initrddir}/pacemaker rm -f %{buildroot}/%{_initrddir}/pacemaker_remote %endif -%if %{with profiling} +%if %{with coverage} GCOV_BASE=%{buildroot}/%{_var}/lib/pacemaker/gcov mkdir -p $GCOV_BASE find . -name '*.gcno' -type f | while read F ; do @@ -480,8 +484,8 @@ exit 0 %{_datadir}/pacemaker/tests %{_includedir}/pacemaker %{_libdir}/*.so -%if %{with profiling} -%{_var}/lib/pacemaker +%if %{with coverage} +%{_var}/lib/pacemaker/gcov %endif %{_libdir}/pkgconfig/*.pc %doc COPYING.LIB