3 %define HALTESTS_PACKAGE 1
4 %define HALTESTS_GCOV 0
10 Summary: The library for Tizen Buffer Manager
11 Group: System/Libraries
12 Source0: %{name}-%{version}.tar.gz
13 Source1001: %name.manifest
15 BuildRequires: pkgconfig(libdrm)
16 BuildRequires: pkgconfig(wayland-server)
17 BuildRequires: pkgconfig(wayland-client)
18 BuildRequires: pkgconfig(capi-base-common)
19 BuildRequires: pkgconfig(libpng)
20 BuildRequires: pkgconfig(dlog)
21 BuildRequires: pkgconfig(pixman-1)
22 BuildRequires: gtest-devel
25 Description: %{summary}
28 Summary: Tizen Buffer Manager Library - Development
29 Group: Development/Libraries
30 Requires: libtbm = %{version}
31 Requires: pkgconfig(capi-base-common)
34 The library for Tizen Buffer Manager.
38 %if "%{HALTESTS_PACKAGE}" == "1"
40 Summary: Tizen Buffer Manager unit tests package
41 Group: System/Libraries
44 Test module for testing libtbm APIs
47 %global TZ_SYS_RO_SHARE %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
56 %if "%{HALTESTS_PACKAGE}" == "1"
60 %if "%{HALTESTS_GCOV}" == "1"
61 CFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
62 CXXFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
67 %reconfigure --prefix=%{_prefix} --with-tbm-platform=WAYLAND --with-haltests=${HALTESTS} \
68 CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
70 %reconfigure --prefix=%{_prefix} --with-tbm-platform=X11 --with-haltests=${HALTESTS} \
71 CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
80 %__mkdir_p %{buildroot}%{_unitdir_user}
81 install -m 644 service/tbm-drm-auth-user.service %{buildroot}%{_unitdir_user}
82 install -m 644 service/tbm-drm-auth-user.path %{buildroot}%{_unitdir_user}
88 %__mkdir_p %{_unitdir_user}/basic.target.wants
89 ln -sf ../tbm-drm-auth-user.path %{_unitdir_user}/basic.target.wants/
91 %post -p /sbin/ldconfig
92 %postun -p /sbin/ldconfig
93 rm -f %{_unitdir_user}/basic.target.wants/tbm-drm-auth-user.path
96 %manifest %{name}.manifest
97 %defattr(-,root,root,-)
99 %{_libdir}/libtbm.so.*
100 %{_unitdir_user}/tbm-drm-auth-user.path
101 %{_unitdir_user}/tbm-drm-auth-user.service
104 %manifest %{name}.manifest
105 %defattr(-,root,root,-)
107 %{_includedir}/tbm_*.h
109 %{_libdir}/pkgconfig/libtbm.pc
111 %if "%{HALTESTS_PACKAGE}" == "1"
113 %defattr(-,root,root,-)
114 %{_bindir}/tbm-haltests