X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=packaging%2Flibtbm.spec;h=69396d73d651f4f09356d8d76d13b2ecf3c13321;hb=ae4a641f6a53e7219338846740d42e4b9cc61d2b;hp=258c62d7c6b1c83e443798f5edbb0e472223419e;hpb=e0e08d168111062fe2cac63024caee1190c2f47c;p=platform%2Fcore%2Fuifw%2Flibtbm.git diff --git a/packaging/libtbm.spec b/packaging/libtbm.spec index 258c62d..69396d7 100644 --- a/packaging/libtbm.spec +++ b/packaging/libtbm.spec @@ -1,9 +1,10 @@ %bcond_with x %bcond_with wayland -%bcond_with utest +%define HALTESTS_PACKAGE 1 +%define HALTESTS_GCOV 0 Name: libtbm -Version: 2.1.1 +Version: 3.1.0 Release: 1 License: MIT Summary: The library for Tizen Buffer Manager @@ -18,10 +19,7 @@ BuildRequires: pkgconfig(capi-base-common) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(pixman-1) - -%if %{with utest} BuildRequires: gtest-devel -%endif %description Description: %{summary} @@ -37,6 +35,15 @@ The library for Tizen Buffer Manager. Development Files. +%if "%{HALTESTS_PACKAGE}" == "1" +%package haltests +Summary: Tizen Buffer Manager unit tests package +Group: System/Libraries + +%description haltests +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 @@ -44,26 +51,28 @@ Development Files. cp %{SOURCE1001} . %build -UTEST="no" +HALTESTS="no" + +%if "%{HALTESTS_PACKAGE}" == "1" +HALTESTS="yes" +%endif -%if %{with utest} -UTEST="yes" +%if "%{HALTESTS_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-haltests=${HALTESTS} \ 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-haltests=${HALTESTS} \ CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed" %endif make %{?_smp_mflags} -%if %{with utest} -make -C ut check -%endif - %install rm -rf %{buildroot} %make_install @@ -90,21 +99,17 @@ 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 %defattr(-,root,root,-) %dir %{_includedir} -%{_includedir}/tbm_bufmgr.h -%{_includedir}/tbm_surface.h -%{_includedir}/tbm_surface_internal.h -%{_includedir}/tbm_surface_queue.h -%{_includedir}/tbm_bufmgr_backend.h -%{_includedir}/tbm_type.h -%{_includedir}/tbm_drm_helper.h -%{_includedir}/tbm_sync.h +%{_includedir}/tbm_*.h %{_libdir}/libtbm.so %{_libdir}/pkgconfig/libtbm.pc + +%if "%{HALTESTS_PACKAGE}" == "1" +%files haltests +%defattr(-,root,root,-) +%{_bindir}/tbm-haltests +%endif