Packaging: update version to 0.7.3
[platform/core/api/efl-util.git] / packaging / capi-ui-efl-util.spec
index c28a557..996bdd5 100644 (file)
@@ -1,7 +1,7 @@
 
 Name:       capi-ui-efl-util
 Summary:    An EFL utility library in Tizen C API
-Version:    0.3.15
+Version:    0.7.3
 Release:    1
 Group:      Graphics & UI Framework/API
 License:    Apache-2.0
@@ -13,13 +13,14 @@ BuildRequires:  pkgconfig(wayland-client)
 BuildRequires:  pkgconfig(wayland-tbm-client)
 BuildRequires:  pkgconfig(screenshooter-client)
 BuildRequires:  pkgconfig(tizen-extension-client)
-BuildRequires:  pkgconfig(ecore-wayland)
+BuildRequires:  pkgconfig(ecore-wl2)
 BuildRequires:  pkgconfig(elementary)
 BuildRequires:  pkgconfig(capi-base-common)
+BuildRequires:  pkgconfig(capi-system-info)
 BuildRequires:  pkgconfig(libdrm)
 BuildRequires:  pkgconfig(libtbm)
 
-%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.
@@ -32,38 +33,46 @@ Requires: %{name} = %{version}-%{release}
 %description devel
 %devel_desc
 
+%if 0%{?gcov:1}
+%package gcov
+Summary: efl-util gcov data package
+Group: Development/Libraries
+
+%description gcov
+efl-util gcno data for gcov
+%endif
+
 %prep
 %setup -q
 cp %{SOURCE1001} .
 
 cp -a include/efl_util.h.in include/efl_util.h
-%if "%{profile}" != "wearable"
-   sed -i 's/\$TZ_CFG_VER_24_OR_30\$/2.4/g'    include/efl_util.h
-   sed -i 's/\$TZ_CFG_VER_24_OR_231\$/2.4/g'   include/efl_util.h
-   sed -i '/\$TZ_CFG_KEEP_BEGIN\$/d'           include/efl_util.h
-   sed -i '/\$TZ_CFG_KEEP_END\$/d'             include/efl_util.h
-%else
-   sed -i 's/\$TZ_CFG_VER_24_OR_30\$/3.0/g'    include/efl_util.h
-   sed -i 's/\$TZ_CFG_VER_24_OR_231\$/2.3.1/g' include/efl_util.h
-   sed -ie '/\$TZ_CFG_KEEP_BEGIN\$/,/\$TZ_CFG_KEEP_END\$/{s/\$TZ_CFG_KEEP_BEGIN\$//p;d}' include/efl_util.h
-%endif
-
+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}'`
-%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} \
-%if "%{profile}" == "wearable"
-    -DTIZEN_WEARABLE=YES \
+%if 0%{?gcov:1}
+%cmake . -DFULLVER=%{version} -DMAJORVER=${MAJORVER} -DEFLUTILGCOV=ON \
+%else
+%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
 
-# 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}
+mkdir -p %{buildroot}%{_datadir}/gcov/obj
+install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
+%endif
 
 %post -p /sbin/ldconfig
 
@@ -72,8 +81,8 @@ cp -a LICENSE.APLv2 %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
 
 %files
 %manifest %{name}.manifest
+%license LICENSE.APLv2
 %{_libdir}/libcapi-ui-efl-util.so.*
-%{TZ_SYS_RO_SHARE}/license/%{name}
 
 %files devel
 %manifest %{name}.manifest
@@ -82,3 +91,8 @@ cp -a LICENSE.APLv2 %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
 %{_libdir}/pkgconfig/*.pc
 %{_libdir}/libcapi-ui-efl-util.so
 %exclude %{_includedir}/ui/config.h
+
+%if 0%{?gcov:1}
+%files gcov
+%{_datadir}/gcov/obj/*
+%endif