change the log macro at all files
[platform/core/uifw/libtbm.git] / packaging / libtbm.spec
index 8c6e0c0..2db1978 100644 (file)
@@ -1,9 +1,10 @@
 %bcond_with x
 %bcond_with wayland
-%bcond_with utest
+%define UTEST_PACKAGE 1
+%define UTEST_GCOV    0
 
 Name:           libtbm
-Version:        2.1.7
+Version:        2.5.0
 Release:        1
 License:        MIT
 Summary:        The library for Tizen Buffer Manager
@@ -18,6 +19,7 @@ BuildRequires:  pkgconfig(capi-base-common)
 BuildRequires:  pkgconfig(libpng)
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(pixman-1)
+BuildRequires:  gtest-devel 
 
 %description
 Description: %{summary}
@@ -33,7 +35,7 @@ The library for Tizen Buffer Manager.
 
 Development Files.
 
-%if %{with utest}
+%if "%{UTEST_PACKAGE}" == "1"
 %package utests
 Summary: Tizen Buffer Manager unit tests package
 Group: System/Libraries
@@ -51,20 +53,21 @@ cp %{SOURCE1001} .
 %build
 UTEST="no"
 
-%if %{with utest}
-cd ut/gtest/googletest
-autoreconf --install
-./configure
-make
-cd ../../..
+%if "%{UTEST_PACKAGE}" == "1"
 UTEST="yes"
 %endif
 
+%if "%{UTEST_GCOV}" == "1"
+CFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
+CXXFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
+LDFLAGS+=" -lgcov"
+%endif
+
 %if %{with wayland}
-%reconfigure --prefix=%{_prefix} --with-tbm-platform=WAYLAND  --with-utest=${UTEST} \
+%reconfigure --prefix=%{_prefix} --with-tbm-platform=WAYLAND  --with-utests=${UTEST} \
             CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
 %else
-%reconfigure --prefix=%{_prefix} --with-tbm-platform=X11  --with-utest=${UTEST} \
+%reconfigure --prefix=%{_prefix} --with-tbm-platform=X11  --with-utests=${UTEST} \
             CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
 %endif
 
@@ -107,15 +110,16 @@ rm -f %{_unitdir_user}/basic.target.wants/tbm-drm-auth-user.path
 %{_includedir}/tbm_surface_queue.h
 %{_includedir}/tbm_bufmgr_backend.h
 %{_includedir}/tbm_type.h
+%{_includedir}/tbm_type_int.h
 %{_includedir}/tbm_drm_helper.h
 %{_includedir}/tbm_sync.h
+%{_includedir}/tbm_bo.h
+%{_includedir}/tbm_log.h
 %{_libdir}/libtbm.so
 %{_libdir}/pkgconfig/libtbm.pc
 
-%if %{with utest}
+%if "%{UTEST_PACKAGE}" == "1"
 %files utests
 %defattr(-,root,root,-)
-%{_bindir}/tbm_utests
-%{TZ_SYS_RO_SHARE}/license/%{name}
-%{TZ_SYS_RO_SHARE}/license/googletest
+%{_bindir}/tbm-utests
 %endif