Use private dbus connection for synchronous calls.
[platform/core/system/libstorage.git] / packaging / libstorage.spec
1 Name:       libstorage
2 Summary:    Library to get storage information
3 Version:    1.0.0
4 Release:    0
5 Group:      System/Libraries
6 License:    Apache-2.0
7 Source0:    %{name}-%{version}.tar.gz
8 Source1:    %{name}.manifest
9 BuildRequires:  cmake
10 BuildRequires:  pkgconfig(dlog)
11 BuildRequires:  pkgconfig(capi-base-common)
12 BuildRequires:  pkgconfig(vconf)
13 BuildRequires:  pkgconfig(glib-2.0)
14 BuildRequires:  pkgconfig(gio-2.0)
15 BuildRequires:  pkgconfig(libtzplatform-config)
16 BuildRequires:  pkgconfig(mount)
17 BuildRequires:  pkgconfig(blkid)
18 BuildRequires:  pkgconfig(capi-system-info)
19 BuildRequires:  pkgconfig(libsyscommon)
20 %if 0%{?gcov:1}
21 BuildRequires: lcov
22 %endif
23
24 %description
25 development package of library to get storage
26
27 %package devel
28 Summary:        Get storage information (devel)
29 Group:          Development/Libraries
30 Requires:       %{name} = %{version}-%{release}
31
32 %description devel
33 Library to get storage information (devel)
34
35 %if 0%{?gcov:1}
36 %package gcov
37 Summary:        Get storage information (gcov)
38 Group:          Development/Libraries
39 %description gcov
40 Library to get storage information (gcov)
41 %endif
42
43 %prep
44 %setup -q
45 cp %{SOURCE1} .
46
47 %build
48 %if 0%{?gcov:1}
49 export CFLAGS+=" -fprofile-arcs -ftest-coverage"
50 export LDFLAGS+=" -lgcov"
51 %endif
52
53 %cmake .
54 make %{?jobs:-j%jobs}
55 %if 0%{?gcov:1}
56 mkdir -p gcov-obj
57 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
58 %endif
59
60
61 %install
62 %make_install
63
64 %if 0%{?gcov:1}
65 mkdir -p %{buildroot}%{_datadir}/gcov/obj/%{name}
66 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj/%{name}
67 %endif
68
69 %post -p /sbin/ldconfig
70
71 %postun -p /sbin/ldconfig
72
73 %files
74 %manifest %{name}.manifest
75 %license LICENSE.Apache-2.0
76 %{_libdir}/*.so.*
77 %{_sysconfdir}/storage/libstorage.conf
78
79 %files devel
80 %manifest %{name}.manifest
81 %license LICENSE.Apache-2.0
82 %{_includedir}/storage/*.h
83 %{_libdir}/*.so
84 %{_libdir}/pkgconfig/*.pc
85
86 %if 0%{?gcov:1}
87 %files gcov
88 %{_datadir}/gcov/*
89 %endif