Name: capi-ui-efl-util
Summary: An EFL utility library in Tizen C API
-Version: 0.7.3
+Version: 0.7.22
Release: 1
Group: Graphics & UI Framework/API
License: Apache-2.0
BuildRequires: pkgconfig(capi-system-info)
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(libtbm)
+BuildRequires: gtest-devel
%{!?TZ_SYS_RO_SHARE: %global TZ_SYS_RO_SHARE /usr/share}
%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 gcov
+%package -n capi-ui-efl-util-gcov
Summary: efl-util gcov data package
Group: Development/Libraries
-%description gcov
+%description -n capi-ui-efl-util-gcov
efl-util gcno data for gcov
%endif
%setup -q
cp %{SOURCE1001} .
-cp -a include/efl_util.h.in include/efl_util.h
-sed -i 's/\$TZ_CFG_VER_24_OR_30\$/@if WEARABLE 3.0 @else 2.4 @endif/g' include/efl_util.h
-sed -i 's/\$TZ_CFG_VER_24_OR_231\$/@if WEARABLE 2.3.1 @else 2.4 @endif/g' include/efl_util.h
-
%build
-export CFLAGS+=" -DEFL_BETA_API_SUPPORT "
MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
%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}
-%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
-install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+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
%{_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 gcov
+%files -n capi-ui-efl-util-gcov
%{_datadir}/gcov/obj/*
%endif