package version up to 1.16.13
[platform/core/uifw/libtdm.git] / packaging / libtdm.spec
index 7e9b4f4..c7855e4 100644 (file)
@@ -1,7 +1,8 @@
-%bcond_with utest
+%define UTEST_PACKAGE 1
+%define UTEST_GCOV    0
 
 Name:           libtdm
-Version:        1.8.2
+Version:        1.16.13
 Release:        0
 Summary:        User Library of Tizen Display Manager
 Group:          Development/Libraries
@@ -12,7 +13,9 @@ BuildRequires:  pkgconfig(libtbm)
 BuildRequires:  pkgconfig(libpng)
 BuildRequires:  pkgconfig(ttrace)
 BuildRequires:  pkgconfig(wayland-server)
+BuildRequires:  pkgconfig(iniparser)
 BuildRequires:  pkgconfig(pixman-1)
+BuildRequires:  gtest-devel 
 
 %description
 Common user library of Tizen Display Manager : libtdm front-end library
@@ -43,7 +46,7 @@ Requires:       libtdm-devel
 %description client-devel
 Tizen Display Manager Client Library headers
 
-%if %{with utest}
+%if "%{UTEST_PACKAGE}" == "1"
 %package utests
 Summary: Tizen Display Manager unit tests package
 Group: Development/Libraries
@@ -69,17 +72,20 @@ cp %{SOURCE1001} .
 %build
 UTEST="no"
 
-%if %{with utest}
-cd ut/gtest/googletest
-autoreconf --install
-./configure
-make
-cd ../../..
+%if "%{UTEST_PACKAGE}" == "1"
 UTEST="yes"
 %endif
 
-%reconfigure --disable-static --with-utest=${UTEST} \
+%if "%{UTEST_GCOV}" == "1"
+CFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
+CXXFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
+LDFLAGS+=" -lgcov"
+%endif
+
+%reconfigure --disable-static --with-utests=${UTEST} \
+             --with-tdm-data-path=%{TZ_SYS_RO_SHARE}/tdm \
              CFLAGS="${CFLAGS} -Wall -Werror" \
+             CXXFLAGS="${CXXFLAGS} -Wall -Werror" \
              LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
 make %{?_smp_mflags}
 
@@ -122,6 +128,7 @@ rm -f %{_unitdir_user}/basic.target.wants/tdm-socket-user.path
 %{_includedir}/tdm_list.h
 %{_includedir}/tdm_log.h
 %{_includedir}/tdm_types.h
+%{_includedir}/tdm_deprecated.h
 %{_libdir}/pkgconfig/libtdm.pc
 %{_libdir}/libtdm.so
 
@@ -144,12 +151,10 @@ rm -f %{_unitdir_user}/basic.target.wants/tdm-socket-user.path
 %attr(750,root,root) %{_bindir}/tdm-test-server
 %{_bindir}/tdm-test-client
 
-%if %{with utest}
+%if "%{UTEST_PACKAGE}" == "1"
 %files utests
 %defattr(-,root,root,-)
-%{_bindir}/tdm_utests
-%{TZ_SYS_RO_SHARE}/license/%{name}
-%{TZ_SYS_RO_SHARE}/license/googletest
+%{_bindir}/tdm-utests
 %endif
 
 %changelog