3 %define HALTESTS_PACKAGE 1
5 %define HALTESTS_GCOV 1
7 %define HALTESTS_GCOV 0
10 %define _tmpfilesdir %{_libdir}/tmpfiles.d
16 Summary: The library for Tizen Buffer Manager
17 Group: System/Libraries
18 Source0: %{name}-%{version}.tar.gz
19 Source1001: %name.manifest
20 Source1002: sw_sync.conf
22 BuildRequires: pkgconfig(libdrm)
23 BuildRequires: pkgconfig(wayland-server)
24 BuildRequires: pkgconfig(wayland-client)
25 BuildRequires: pkgconfig(capi-base-common)
26 BuildRequires: pkgconfig(libpng)
27 BuildRequires: pkgconfig(dlog)
28 BuildRequires: pkgconfig(pixman-1)
29 BuildRequires: pkgconfig(gmock)
32 Description: %{summary}
35 Summary: Tizen Buffer Manager Library - Development
36 Group: Development/Libraries
37 Requires: libtbm = %{version}
38 Requires: pkgconfig(capi-base-common)
41 The library for Tizen Buffer Manager.
47 Summary: Tizen Buffer Manager gcov data package
48 Group: Development/Libraries
51 Tizen Buffer Manager gcno data for gcov
54 %if "%{HALTESTS_PACKAGE}" == "1"
56 Summary: Tizen Buffer Manager unit tests package
57 Group: System/Libraries
60 Test module for testing libtbm APIs
63 %global TZ_SYS_RO_SHARE %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
72 %if "%{HALTESTS_PACKAGE}" == "1"
76 %if "%{HALTESTS_GCOV}" == "1"
77 CFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
78 CXXFLAGS+=" -fprofile-arcs -ftest-coverage -DTIZEN_TEST_GCOV"
83 %reconfigure --prefix=%{_prefix} --with-tbm-platform=WAYLAND --with-haltests=${HALTESTS} \
84 CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
86 %reconfigure --prefix=%{_prefix} --with-tbm-platform=X11 --with-haltests=${HALTESTS} \
87 CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
94 find . -name '*.gcno' -exec cp '{}' gcov-obj ';'
95 rm gcov-obj/tbm_haltests-tc*
102 %__mkdir_p %{buildroot}%{_tmpfilesdir}
103 install -m 0644 %SOURCE1002 %{buildroot}%{_tmpfilesdir}/sw_sync.conf
105 %__mkdir_p %{buildroot}%{_unitdir_user}
106 install -m 644 service/tbm-drm-auth-user.service %{buildroot}%{_unitdir_user}
107 install -m 644 service/tbm-drm-auth-user.path %{buildroot}%{_unitdir_user}
110 mkdir -p %{buildroot}%{_datadir}/gcov/obj
111 install -m 0644 gcov-obj/* %{buildroot}%{_datadir}/gcov/obj
118 %__mkdir_p %{_unitdir_user}/basic.target.wants
119 ln -sf ../tbm-drm-auth-user.path %{_unitdir_user}/basic.target.wants/
121 %post -p /sbin/ldconfig
122 %postun -p /sbin/ldconfig
123 rm -f %{_unitdir_user}/basic.target.wants/tbm-drm-auth-user.path
126 %manifest %{name}.manifest
127 %defattr(-,root,root,-)
129 %{_libdir}/libtbm.so.*
130 %{_unitdir_user}/tbm-drm-auth-user.path
131 %{_unitdir_user}/tbm-drm-auth-user.service
134 %manifest %{name}.manifest
135 %defattr(-,root,root,-)
137 %{_includedir}/tbm_*.h
139 %{_libdir}/pkgconfig/libtbm.pc
140 %{_tmpfilesdir}/sw_sync.conf
142 %if "%{HALTESTS_PACKAGE}" == "1"
144 %defattr(-,root,root,-)
145 %{_bindir}/tbm-haltests
150 %{_datadir}/gcov/obj/*