%package devel
Summary: Job Scheduler library in Tizen C API (Development)
Group: System/API
-Requires: %{name} = %{version}-%{release}
+Requires: %{name} = %{version}
%description devel
An Application library in SLP C API (Development) package.
+%if 0%{?gcov:1}
+%package gcov
+Summary: Job Scheduler library(gcov)
+Group: System/API
+
+%description gcov
+gcov objects of a job scheduler library
+%endif
%prep
%setup -q
cp %{SOURCE1001} .
%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
%{_includedir}/appfw/*.h
%{_libdir}/pkgconfig/capi-appfw-job-scheduler.pc
%{_libdir}/libcapi-appfw-job-scheduler.so
+
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif