ut: sync with the gtest branch
[platform/core/uifw/libtbm.git] / packaging / libtbm.spec
index bfc657e..c3b8840 100644 (file)
@@ -3,7 +3,7 @@
 %bcond_with utest
 
 Name:           libtbm
-Version:        2.0.20
+Version:        2.1.7
 Release:        1
 License:        MIT
 Summary:        The library for Tizen Buffer Manager
@@ -17,10 +17,7 @@ BuildRequires:  pkgconfig(wayland-client)
 BuildRequires:  pkgconfig(capi-base-common)
 BuildRequires:  pkgconfig(libpng)
 BuildRequires:  pkgconfig(dlog)
-
-%if %{with utest}
-BuildRequires:  gtest-devel
-%endif
+BuildRequires:  pkgconfig(pixman-1)
 
 %description
 Description: %{summary}
@@ -36,6 +33,15 @@ The library for Tizen Buffer Manager.
 
 Development Files.
 
+%if %{with utest}
+%package utests
+Summary: Tizen Buffer Manager unit tests package
+Group: System/Libraries
+
+%description utests
+Test module for testing libtbm APIs
+%endif
+
 %global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
 
 %prep
@@ -46,6 +52,11 @@ cp %{SOURCE1001} .
 UTEST="no"
 
 %if %{with utest}
+cd ut/gtest/googletest
+autoreconf --install
+./configure
+make
+cd ../../..
 UTEST="yes"
 %endif
 
@@ -59,10 +70,6 @@ UTEST="yes"
 
 make %{?_smp_mflags}
 
-%if %{with utest}
-make -C ut check
-%endif
-
 %install
 rm -rf %{buildroot}
 %make_install
@@ -89,9 +96,6 @@ rm -f %{_unitdir_user}/basic.target.wants/tbm-drm-auth-user.path
 %{_libdir}/libtbm.so.*
 %{_unitdir_user}/tbm-drm-auth-user.path
 %{_unitdir_user}/tbm-drm-auth-user.service
-%if %{with utest}
-%{_bindir}/ut
-%endif
 
 %files devel
 %manifest %{name}.manifest
@@ -107,3 +111,9 @@ rm -f %{_unitdir_user}/basic.target.wants/tbm-drm-auth-user.path
 %{_includedir}/tbm_sync.h
 %{_libdir}/libtbm.so
 %{_libdir}/pkgconfig/libtbm.pc
+
+%if %{with utest}
+%files utests
+%defattr(-,root,root,-)
+%{_bindir}/tbm_utests
+%endif