add tbm_surface_internal_dump_with_scale_start() func.
[platform/core/uifw/libtbm.git] / packaging / libtbm.spec
1 %bcond_with x
2 %bcond_with wayland
3 %bcond_with utest
4
5 Name:           libtbm
6 Version:        2.0.22
7 Release:        1
8 License:        MIT
9 Summary:        The library for Tizen Buffer Manager
10 Group:          System/Libraries
11 Source0:        %{name}-%{version}.tar.gz
12 Source1001:             %name.manifest
13
14 BuildRequires:  pkgconfig(libdrm)
15 BuildRequires:  pkgconfig(wayland-server)
16 BuildRequires:  pkgconfig(wayland-client)
17 BuildRequires:  pkgconfig(capi-base-common)
18 BuildRequires:  pkgconfig(libpng)
19 BuildRequires:  pkgconfig(dlog)
20 BuildRequires:  pkgconfig(pixman-1)
21
22 %if %{with utest}
23 BuildRequires:  gtest-devel
24 %endif
25
26 %description
27 Description: %{summary}
28
29 %package devel
30 Summary:        Tizen Buffer Manager Library - Development
31 Group:          Development/Libraries
32 Requires:       libtbm = %{version}
33 Requires:       pkgconfig(capi-base-common)
34
35 %description devel
36 The library for Tizen Buffer Manager.
37
38 Development Files.
39
40 %global TZ_SYS_RO_SHARE  %{?TZ_SYS_RO_SHARE:%TZ_SYS_RO_SHARE}%{!?TZ_SYS_RO_SHARE:/usr/share}
41
42 %prep
43 %setup -q
44 cp %{SOURCE1001} .
45
46 %build
47 UTEST="no"
48
49 %if %{with utest}
50 UTEST="yes"
51 %endif
52
53 %if %{with wayland}
54 %reconfigure --prefix=%{_prefix} --with-tbm-platform=WAYLAND  --with-utest=${UTEST} \
55             CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
56 %else
57 %reconfigure --prefix=%{_prefix} --with-tbm-platform=X11  --with-utest=${UTEST} \
58             CFLAGS="${CFLAGS} -Wall -Werror" LDFLAGS="${LDFLAGS} -Wl,--hash-style=both -Wl,--as-needed"
59 %endif
60
61 make %{?_smp_mflags}
62
63 %if %{with utest}
64 make -C ut check
65 %endif
66
67 %install
68 rm -rf %{buildroot}
69 %make_install
70
71 %__mkdir_p %{buildroot}%{_unitdir_user}
72 install -m 644 service/tbm-drm-auth-user.service %{buildroot}%{_unitdir_user}
73 install -m 644 service/tbm-drm-auth-user.path %{buildroot}%{_unitdir_user}
74
75 %clean
76 rm -rf %{buildroot}
77
78 %pre
79 %__mkdir_p %{_unitdir_user}/basic.target.wants
80 ln -sf ../tbm-drm-auth-user.path %{_unitdir_user}/basic.target.wants/
81
82 %post -p /sbin/ldconfig
83 %postun -p /sbin/ldconfig
84 rm -f %{_unitdir_user}/basic.target.wants/tbm-drm-auth-user.path
85
86 %files
87 %manifest %{name}.manifest
88 %defattr(-,root,root,-)
89 %license COPYING
90 %{_libdir}/libtbm.so.*
91 %{_unitdir_user}/tbm-drm-auth-user.path
92 %{_unitdir_user}/tbm-drm-auth-user.service
93 %if %{with utest}
94 %{_bindir}/ut
95 %endif
96
97 %files devel
98 %manifest %{name}.manifest
99 %defattr(-,root,root,-)
100 %dir %{_includedir}
101 %{_includedir}/tbm_bufmgr.h
102 %{_includedir}/tbm_surface.h
103 %{_includedir}/tbm_surface_internal.h
104 %{_includedir}/tbm_surface_queue.h
105 %{_includedir}/tbm_bufmgr_backend.h
106 %{_includedir}/tbm_type.h
107 %{_includedir}/tbm_drm_helper.h
108 %{_includedir}/tbm_sync.h
109 %{_libdir}/libtbm.so
110 %{_libdir}/pkgconfig/libtbm.pc