Rename gcov package
[platform/core/api/runtime-info.git] / packaging / capi-system-runtime-info.spec
index 3abbda8..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
@@ -12,6 +12,7 @@ BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(capi-base-common)
 BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(glib-2.0)
 Requires(post): /sbin/ldconfig
 Requires(postun): /sbin/ldconfig
 
@@ -28,26 +29,53 @@ Requires:  pkgconfig(capi-base-common)
 %devel_desc
 
 
+%package test
+Summary:  A Runtime Information test binary
+Requires: %{name} = %{version}-%{release}
+Requires: memps
+
+%description test
+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
@@ -58,4 +86,10 @@ make %{?jobs:-j%jobs}
 %{_libdir}/pkgconfig/*.pc
 %{_libdir}/lib*.so
 
+%files test
+%attr(700,root,root) %{_bindir}/runtime-info-test
 
+%if 0%{?gcov:1}
+%files -n runtime-info-gcov
+%{_datadir}/gcov/obj/*
+%endif