-%bcond_with x
-%bcond_with wayland
Name: capi-ui-efl-util
Summary: An EFL utility library in Tizen C API
-Version: 0.2.4
+Version: 0.7.22
Release: 1
Group: Graphics & UI Framework/API
License: Apache-2.0
Source1001: capi-ui-efl-util.manifest
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
-%if %{with x}
-BuildRequires: pkgconfig(x11)
-BuildRequires: pkgconfig(utilX)
-BuildRequires: pkgconfig(ecore-x)
-BuildRequires: pkgconfig(xtst)
-BuildRequires: pkgconfig(libdri2)
-BuildRequires: pkgconfig(dri2proto)
-BuildRequires: pkgconfig(xext)
-BuildRequires: pkgconfig(xv)
-BuildRequires: pkgconfig(xdamage)
-%endif
-%if %{with wayland}
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-tbm-client)
BuildRequires: pkgconfig(screenshooter-client)
BuildRequires: pkgconfig(tizen-extension-client)
-BuildRequires: pkgconfig(ecore-wayland)
-%endif
+BuildRequires: pkgconfig(ecore-wl2)
BuildRequires: pkgconfig(elementary)
BuildRequires: pkgconfig(capi-base-common)
+BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(libtbm)
+BuildRequires: gtest-devel
-%global TZ_SYS_RO_SHARE %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
+%{!?TZ_SYS_RO_SHARE: %global TZ_SYS_RO_SHARE /usr/share}
%description
An EFL utility library in SLP C API.
%description devel
%devel_desc
+%package -n efl-util-tests
+Summary: Tizen EFL utility library unit tests package
+Group: Development/Libraries
+
+%description -n efl-util-tests
+Test module for testing efl-util APIs
+
+%if 0%{?gcov:1}
+%package -n capi-ui-efl-util-gcov
+Summary: efl-util gcov data package
+Group: Development/Libraries
+
+%description -n capi-ui-efl-util-gcov
+efl-util gcno data for gcov
+%endif
+
%prep
%setup -q
cp %{SOURCE1001} .
-
%build
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
-%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
-%if %{with wayland}
--DWITH_WAYLAND=TRUE
-%endif
-%if %{with x}
--DWITH_X11=TRUE
+%if 0%{?gcov:1}
+export CFLAGS+=" -DEFL_BETA_API_SUPPORT -fPIC -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV "
+%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DEFLUTILGCOV=ON \
+%else
+export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
+%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DEFLUTILGCOV=OFF \
%endif
make %{?jobs:-j%jobs}
%install
%make_install
-# for license notification
-mkdir -p %{buildroot}/%{TZ_SYS_RO_SHARE}/license
-cp -a LICENSE.APLv2 %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
+%if 0%{?gcov:1}
+builddir=$(basename $PWD)
+gcno_obj_dir=%{buildroot}%{_datadir}/gcov/obj/%{name}/"$builddir"
+mkdir -p "$gcno_obj_dir"
+find . -name '*.gcno' -exec cp --parents '{}' "$gcno_obj_dir" ';'
+%endif
%post -p /sbin/ldconfig
%files
%manifest %{name}.manifest
+%license LICENSE.APLv2
%{_libdir}/libcapi-ui-efl-util.so.*
-%{TZ_SYS_RO_SHARE}/license/%{name}
%files devel
%manifest %{name}.manifest
%{_includedir}/ui/efl_util.h
+%{_includedir}/ui/efl_util_screenshot_extension.h
%{_libdir}/pkgconfig/*.pc
%{_libdir}/libcapi-ui-efl-util.so
%exclude %{_includedir}/ui/config.h
+
+%files -n efl-util-tests
+%defattr(-,root,root,-)
+%{_bindir}/efl-util-tests
+
+%if 0%{?gcov:1}
+%files -n capi-ui-efl-util-gcov
+%{_datadir}/gcov/obj/*
+%endif