39500d612d79eac5df305a9977d4cab8e592cb5f
[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 BuildRequires:  pkgconfig(hal-api-common)
17 BuildRequires:  pkgconfig(hal-api-device)
18 Requires(post): /sbin/ldconfig
19 Requires(postun): /sbin/ldconfig
20
21 %description
22
23
24 %package devel
25 Summary:  A Runtime Information library in Core API (Development)
26 Group:    Development/System
27 Requires: %{name} = %{version}-%{release}
28 Requires:  pkgconfig(capi-base-common)
29
30 %description devel
31 %devel_desc
32
33
34 %package test
35 Summary:  A Runtime Information test binary
36 Requires: %{name} = %{version}-%{release}
37 Requires: memps
38
39 %description test
40 Binary for testing Runtime-info APIs
41
42
43 %if 0%{?gcov:1}
44 %package -n runtime-info-gcov
45 Summary:  A Runtime Information gcov test file
46 %description -n runtime-info-gcov
47 gcno files for Runtime-info line coverage test
48 %endif
49
50
51 %prep
52 %setup -q
53 cp %{SOURCE1001} .
54
55
56 %build
57 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
58 %cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DGCOV=%{?gcov:1}%{!?gcov:0}
59
60 make %{?jobs:-j%jobs}
61
62 %if 0%{?gcov:1}
63 mkdir -p gcov-obj
64 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
65 %endif
66
67
68 %install
69 %make_install
70
71 %if 0%{?gcov:1}
72 mkdir -p %{buildroot}%{_datadir}/gcov/obj
73 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
74 %endif
75
76
77 %post -p /sbin/ldconfig
78
79 %postun -p /sbin/ldconfig
80
81 %files
82 %manifest %{name}.manifest
83 %license LICENSE.APLv2
84 %{_libdir}/lib*.so.*
85
86 %files devel
87 %{_includedir}/system/runtime_info.h
88 %{_includedir}/system/runtime_info-internal.h
89 %{_libdir}/pkgconfig/*.pc
90 %{_libdir}/lib*.so
91
92 %files test
93 %attr(700,root,root) %{_bindir}/runtime-info-test
94
95 %if 0%{?gcov:1}
96 %files -n runtime-info-gcov
97 %{_datadir}/gcov/obj/*
98 %endif