%package devel
Summary: Application Manager API (Development)
Group: Application Framework/Libraries
-Requires: %{name} = %{version}-%{release}
+Requires: %{name} = %{version}
%description devel
The Application Manager API provides functions to get information about running applications. (DEV)
+%if 0%{?gcov:1}
+%package gcov
+Summary: Application Manager API(gcov)
+Group: Application Framework/API
+
+%description gcov
+gcov objects for an application manager library
+%endif
%prep
%setup -q
%build
+%if 0%{?gcov:1}
+export CFLAGS+=" -fprofile-arcs -ftest-coverage"
+export CXXFLAGS+=" -fprofile-arcs -ftest-coverage"
+export FFLAGS+=" -fprofile-arcs -ftest-coverage"
+export LDFLAGS+=" -lgcov"
+%endif
+
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
%__make %{?jobs:-j%jobs}
+%if 0%{?gcov:1}
+mkdir -p gcov-obj
+find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
+%endif
+
%install
rm -rf %{buildroot}
%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
%{_libdir}/libcapi-appfw-app-manager.so
%{_libdir}/pkgconfig/*.pc
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif