%bcond_with utest
Name: libtdm
-Version: 1.4.3
+Version: 1.4.5
Release: 0
Summary: User Library of Tizen Display Manager
Group: Development/Libraries
BuildRequires: pkgconfig(wayland-server)
BuildRequires: pkgconfig(pixman-1)
+%if %{with utest}
+BuildRequires: gtest-devel
+%endif
+
%description
Common user library of Tizen Display Manager : libtdm front-end library
%description client-devel
Tizen Display Manager Client Library headers
-%if %{with utest}
-%package utests
-Summary: Tizen Display Manager unit tests package
-Group: Development/Libraries
-
-%description utests
-Test module for testing libtdm APIs
-%endif
-
%global TZ_SYS_RO_SHARE %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
%package tools
UTEST="no"
%if %{with utest}
-cd ut/gtest/googletest
-autoreconf --install
-./configure
-make
-cd ../../..
UTEST="yes"
%endif
LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
make %{?_smp_mflags}
+%if %{with utest}
+make -C ut check
+%endif
+
%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/%{TZ_SYS_RO_SHARE}/license
cp -af COPYING %{buildroot}/%{TZ_SYS_RO_SHARE}/license/%{name}
-%if %{with utest}
-cp -af %{_builddir}/%{buildsubdir}/ut/gtest/googletest/LICENSE %{buildroot}/%{TZ_SYS_RO_SHARE}/license/googletest
-%endif
%make_install
%__mkdir_p %{buildroot}%{_unitdir}
%{_unitdir}/tdm-socket.service
%{_unitdir_user}/tdm-socket-user.path
%{_unitdir_user}/tdm-socket-user.service
+%if %{with utest}
+%{_bindir}/ut
+%endif
%files devel
%manifest %{name}.manifest
%attr(750,root,root) %{_bindir}/tdm-test-server
%{_bindir}/tdm-test-client
-%if %{with utest}
-%files utests
-%defattr(-,root,root,-)
-%{_bindir}/tdm_utests
-%{TZ_SYS_RO_SHARE}/license/%{name}
-%{TZ_SYS_RO_SHARE}/license/googletest
-%endif
-
%changelog