Use private dbus connection for synchronous calls.
[platform/core/system/libstorage.git] / packaging / libstorage.spec
index 57611e7..bf89f7d 100644 (file)
@@ -1,6 +1,6 @@
 Name:       libstorage
 Summary:    Library to get storage information
-Version:    0.1.1
+Version:    1.0.0
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
@@ -14,6 +14,12 @@ BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(gio-2.0)
 BuildRequires:  pkgconfig(libtzplatform-config)
 BuildRequires:  pkgconfig(mount)
+BuildRequires:  pkgconfig(blkid)
+BuildRequires:  pkgconfig(capi-system-info)
+BuildRequires:  pkgconfig(libsyscommon)
+%if 0%{?gcov:1}
+BuildRequires: lcov
+%endif
 
 %description
 development package of library to get storage
@@ -26,29 +32,58 @@ Requires:   %{name} = %{version}-%{release}
 %description devel
 Library to get storage information (devel)
 
+%if 0%{?gcov:1}
+%package gcov
+Summary:       Get storage information (gcov)
+Group:         Development/Libraries
+%description gcov
+Library to get storage information (gcov)
+%endif
 
 %prep
 %setup -q
 cp %{SOURCE1} .
 
 %build
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
 %cmake .
 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/%{name}
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj/%{name}
+%endif
+
 %post -p /sbin/ldconfig
 
 %postun -p /sbin/ldconfig
 
 %files
+%manifest %{name}.manifest
+%license LICENSE.Apache-2.0
 %{_libdir}/*.so.*
 %{_sysconfdir}/storage/libstorage.conf
-%license LICENSE
-%manifest %{name}.manifest
 
 %files devel
+%manifest %{name}.manifest
+%license LICENSE.Apache-2.0
 %{_includedir}/storage/*.h
 %{_libdir}/*.so
 %{_libdir}/pkgconfig/*.pc
+
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/*
+%endif