BuildRequires: cmake
BuildRequires: edje-bin
BuildRequires: gettext-tools
+%if 0%{?gcov:1}
+BuildRequires: lcov
+%endif
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
%description devel
UI VIEW MANAGER library providing View management functionality(devel)
+%if 0%{?gcov:1}
+%package gcov
+Summary: UI VIEW MANAGER library (gcov)
+Group: Graphics & UI Framework/Testing
+%description gcov
+UI VIEW MANAGER library gcov objects
+%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
%if "%{?target_language}" == "c++"
%cmake . -DTARGET_LANGUAGE="c++"
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}/ui-viewmgr/efl/mobile/c/*.h
%{_libdir}/*.so
%{_libdir}/pkgconfig/ui-viewmgr.pc
+
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif