Rename gcov package
[platform/core/api/runtime-info.git] / packaging / capi-system-runtime-info.spec
index fa652ec..bab433b 100644 (file)
@@ -1,7 +1,7 @@
 Name:       capi-system-runtime-info
 Summary:    A Runtime Information library in Core API
-Version:    0.0.4
-Release:    2
+Version:    0.5.2
+Release:    1
 Group:      System/API
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
@@ -38,25 +38,44 @@ Requires: memps
 Binary for testing Runtime-info APIs
 
 
+%if 0%{?gcov:1}
+%package -n runtime-info-gcov
+Summary:  A Runtime Information gcov test file
+%description -n runtime-info-gcov
+gcno files for Runtime-info line coverage test
+%endif
+
+
 %prep
 %setup -q
 cp %{SOURCE1001} .
 
+
 %build
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
-
+%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DGCOV=%{?gcov:1}%{!?gcov:0}
 
 make %{?jobs:-j%jobs}
 
+%if 0%{?gcov:1}
+mkdir -p gcov-obj
+find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
+%endif
+
+
 %install
 %make_install
 
+%if 0%{?gcov:1}
+mkdir -p %{buildroot}%{_datadir}/gcov/obj
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+%endif
+
+
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
 
-
 %files
 %manifest %{name}.manifest
 %license LICENSE.APLv2
@@ -69,3 +88,8 @@ make %{?jobs:-j%jobs}
 
 %files test
 %attr(700,root,root) %{_bindir}/runtime-info-test
+
+%if 0%{?gcov:1}
+%files -n runtime-info-gcov
+%{_datadir}/gcov/obj/*
+%endif