%bcond_with utest
Name: libtdm
-Version: 1.4.3
+Version: 1.7.8
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}
-%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
+make -C ut check
%endif
+
+%install
+rm -rf %{buildroot}
%make_install
-%__mkdir_p %{buildroot}%{_unitdir}
-install -m 644 service/tdm-socket.service %{buildroot}%{_unitdir}
-install -m 644 service/tdm-socket.path %{buildroot}%{_unitdir}
%__mkdir_p %{buildroot}%{_unitdir_user}
install -m 644 service/tdm-socket-user.service %{buildroot}%{_unitdir_user}
install -m 644 service/tdm-socket-user.path %{buildroot}%{_unitdir_user}
%pre
-%__mkdir_p %{_unitdir}/graphical.target.wants
-ln -sf ../tdm-socket.path %{_unitdir}/graphical.target.wants/
-
-%if "%{?profile}" == "mobile" || "%{?profile}" == "wearable"
%__mkdir_p %{_unitdir_user}/basic.target.wants
ln -sf ../tdm-socket-user.path %{_unitdir_user}/basic.target.wants/
-%else
-%__mkdir_p %{_unitdir_user}/default.target.wants
-ln -sf ../tdm-socket-user.path %{_unitdir_user}/default.target.wants/
-%endif
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
-rm -f %{_unitdir}/graphical.target.wants/tdm-socket.path
-
-%if "%{?profile}" == "mobile" || "%{?profile}" == "wearable"
rm -f %{_unitdir_user}/basic.target.wants/tdm-socket-user.path
-%else
-rm -f %{_unitdir_user}/default.target.wants/tdm-socket-user.path
-%endif
%files
%manifest %{name}.manifest
%defattr(-,root,root,-)
-%{TZ_SYS_RO_SHARE}/license/%{name}
+%license COPYING
%{_libdir}/libtdm.so.*
+%{_libdir}/tdm/libtdm-dummy.so
%attr(750,root,root) %{_bindir}/tdm-monitor
-%{_unitdir}/tdm-socket.path
-%{_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
%files client
%manifest %{name}.manifest
%defattr(-,root,root,-)
-%{TZ_SYS_RO_SHARE}/license/%{name}
+%license COPYING
%{_libdir}/libtdm-client.so.*
%files client-devel
%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