Rename gcov package
[platform/core/api/runtime-info.git] / packaging / capi-system-runtime-info.spec
1 Name:       capi-system-runtime-info
2 Summary:    A Runtime Information library in Core API
3 Version:    0.5.2
4 Release:    1
5 Group:      System/API
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1001:     %{name}.manifest
9
10 BuildRequires:  cmake
11 BuildRequires:  pkgconfig(dlog)
12 BuildRequires:  pkgconfig(vconf)
13 BuildRequires:  pkgconfig(capi-base-common)
14 BuildRequires:  pkgconfig(capi-system-info)
15 BuildRequires:  pkgconfig(glib-2.0)
16 Requires(post): /sbin/ldconfig
17 Requires(postun): /sbin/ldconfig
18
19 %description
20
21
22 %package devel
23 Summary:  A Runtime Information library in Core API (Development)
24 Group:    Development/System
25 Requires: %{name} = %{version}-%{release}
26 Requires:  pkgconfig(capi-base-common)
27
28 %description devel
29 %devel_desc
30
31
32 %package test
33 Summary:  A Runtime Information test binary
34 Requires: %{name} = %{version}-%{release}
35 Requires: memps
36
37 %description test
38 Binary for testing Runtime-info APIs
39
40
41 %if 0%{?gcov:1}
42 %package -n runtime-info-gcov
43 Summary:  A Runtime Information gcov test file
44 %description -n runtime-info-gcov
45 gcno files for Runtime-info line coverage test
46 %endif
47
48
49 %prep
50 %setup -q
51 cp %{SOURCE1001} .
52
53
54 %build
55 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
56 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DGCOV=%{?gcov:1}%{!?gcov:0}
57
58 make %{?jobs:-j%jobs}
59
60 %if 0%{?gcov:1}
61 mkdir -p gcov-obj
62 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
63 %endif
64
65
66 %install
67 %make_install
68
69 %if 0%{?gcov:1}
70 mkdir -p %{buildroot}%{_datadir}/gcov/obj
71 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
72 %endif
73
74
75 %post -p /sbin/ldconfig
76
77 %postun -p /sbin/ldconfig
78
79 %files
80 %manifest %{name}.manifest
81 %license LICENSE.APLv2
82 %{_libdir}/lib*.so.*
83
84 %files devel
85 %{_includedir}/system/*.h
86 %{_libdir}/pkgconfig/*.pc
87 %{_libdir}/lib*.so
88
89 %files test
90 %attr(700,root,root) %{_bindir}/runtime-info-test
91
92 %if 0%{?gcov:1}
93 %files -n runtime-info-gcov
94 %{_datadir}/gcov/obj/*
95 %endif