1623068abe05989b3ea2ef162daeeb0e9d27f86c
[platform/upstream/weston.git] / packaging / weston.spec
1 %bcond_with wayland
2 %bcond_with libva
3 %bcond_with mobile
4 %bcond_with rdp
5
6 %if %{with mobile}
7 %define extra_config_options1 --disable-drm-compositor
8 %endif
9
10 %if %{with rdp}
11 %define extra_config_options2 --enable-rdp-compositor --enable-screen-sharing
12 %endif
13
14 %if "%{profile}" == "common"
15 %define extra_config_options3 --enable-sys-uid --disable-ivi-shell
16 %endif
17
18 %if "%{profile}" == "tv"
19 %define extra_config_options4 --enable-sys-uid --disable-ivi-shell
20 %endif
21
22 %if "%{profile}" == "mobile"
23 %define extra_config_options5 --enable-sys-uid --disable-ivi-shell
24 %endif
25
26 %if "%{profile}" == "ivi"
27 %define extra_config_options4 --disable-default-vkb --enable-transform
28 %endif
29
30 Name:           weston
31 Version:        1.8.0
32 Release:        0
33 Summary:        Wayland Compositor Infrastructure
34 License:        MIT
35 Group:          Graphics & UI Framework/Wayland Window System
36 Url:            http://weston.freedesktop.org/
37
38 #Git-Clone:     git://anongit.freedesktop.org/wayland/weston
39 #Git-Web:       http://cgit.freedesktop.org/wayland/weston/
40 Source0:        %name-%version.tar.xz
41 Source1:        %name.ini
42 Source1001:     %name.manifest
43 BuildRequires:  autoconf >= 2.64, automake >= 1.11
44 BuildRequires:  expat-devel
45 BuildRequires:  libjpeg-devel
46 BuildRequires:  libtool >= 2.2
47 BuildRequires:  libvpx-devel
48 BuildRequires:  pam-devel
49 BuildRequires:  pkgconfig
50 BuildRequires:  xz
51 BuildRequires:  pkgconfig(cairo)
52 BuildRequires:  pkgconfig(cairo-egl) >= 1.11.3
53 BuildRequires:  pkgconfig(egl) >= 7.10
54 %if %{with rdp}
55 BuildRequires:  pkgconfig(freerdp)
56 %endif
57 BuildRequires:  pkgconfig(gbm)
58 BuildRequires:  pkgconfig(gio-2.0)
59 BuildRequires:  pkgconfig(glesv2)
60 BuildRequires:  pkgconfig(glib-2.0)
61 BuildRequires:  pkgconfig(gobject-2.0)
62 %if !%{with mobile}
63 BuildRequires:  pkgconfig(libdrm) >= 2.4.30
64 %endif
65 BuildRequires:  pkgconfig(libffi)
66 BuildRequires:  pkgconfig(libinput) >= 0.8.0
67 BuildRequires:  pkgconfig(libsystemd-login)
68 BuildRequires:  pkgconfig(libudev) >= 136
69 %if %{with libva}
70 BuildRequires:  pkgconfig(libva)
71 %endif
72 BuildRequires:  pkgconfig(mtdev) >= 1.1.0
73 BuildRequires:  pkgconfig(pangocairo)
74 BuildRequires:  pkgconfig(pixman-1)
75 BuildRequires:  pkgconfig(poppler-glib)
76 BuildRequires:  pkgconfig(wayland-client)
77 BuildRequires:  pkgconfig(wayland-egl)
78 BuildRequires:  pkgconfig(wayland-server)
79 BuildRequires:  pkgconfig(xkbcommon) >= 0.3.0
80 Requires:       tlm
81 Requires(pre):  /usr/sbin/groupadd
82
83 %if !%{with wayland}
84 ExclusiveArch:
85 %endif
86
87 %description
88 Weston is the reference implementation of a Wayland compositor, and a
89 useful compositor in its own right. Weston has various backends that
90 lets it run on Linux kernel modesetting and evdev input as well as
91 under X11. Weston ships with a few example clients, from simple
92 clients that demonstrate certain aspects of the protocol to more
93 complete clients and a simplistic toolkit. There is also a quite
94 capable terminal emulator (weston-terminal) and an toy/example
95 desktop shell. Finally, weston also provides integration with the
96 Xorg server and can pull X clients into the Wayland desktop and act
97 as a X window manager.
98
99 %package devel
100 Summary: Development files for package %{name}
101 Group:   Graphics & UI Framework/Development
102 %description devel
103 This package provides header files and other developer releated files
104 for package %{name}.
105
106 %package clients
107 Summary: Sample clients for package %{name}
108 Group:   Graphics & UI Framework/Development
109 %description clients
110 This package provides a set of example wayland clients useful for
111 validating the functionality of wayland with very little dependencies
112 on other system components.
113
114 %if %{with rdp}
115 %package rdp
116 Summary: RDP compositor for %{name}
117 Group:   Graphics & UI Framework/Development
118 %description rdp
119 This package provides a RDP compositor allowing to do remote rendering
120 through the network.
121 %endif
122
123 %if "%{profile}" == "ivi"
124 %package ivi-shell
125 Summary: %{name} IVI Shell
126 Group:   Graphics & UI Framework/Wayland Window System
127 %description ivi-shell
128 A reference Weston shell designed for use in IVI systems.
129
130 %package ivi-shell-config
131 Summary: Tizen IVI %{name} configuration
132 Group:   Automotive/Configuration
133 Conflicts: weston-ivi-config
134 Conflicts: ico-uxf-weston-plugin
135 %description ivi-shell-config
136 This package contains Tizen IVI-specific configuration.
137 %endif
138
139 %prep
140 %setup -q
141 cp %{SOURCE1001} .
142
143 %build
144 %autogen --disable-static \
145          --disable-setuid-install \
146          --enable-simple-clients \
147          --enable-clients \
148          --disable-libunwind \
149          --disable-xwayland \
150          --disable-xwayland-test \
151          --disable-x11-compositor \
152          --disable-rpi-compositor \
153          --with-cairo=glesv2 \
154          %{?extra_config_options1:%extra_config_options1} \
155          %{?extra_config_options2:%extra_config_options2} \
156          %{?extra_config_options3:%extra_config_options3} \
157          %{?extra_config_options4:%extra_config_options4} \
158          %{?extra_config_options5:%extra_config_options5}
159
160 make %{?_smp_mflags}
161
162 %install
163 %make_install
164
165 # install example clients
166 install -m 755 weston-calibrator %{buildroot}%{_bindir}
167 install -m 755 weston-simple-touch %{buildroot}%{_bindir}
168 install -m 755 weston-simple-shm %{buildroot}%{_bindir}
169 install -m 755 weston-simple-egl %{buildroot}%{_bindir}
170 install -m 755 weston-simple-damage %{buildroot}%{_bindir}
171 install -m 755 weston-presentation-shm %{buildroot}%{_bindir}
172 install -m 755 weston-nested-client %{buildroot}%{_bindir}
173 install -m 755 weston-nested %{buildroot}%{_bindir}
174 install -m 755 weston-multi-resource %{buildroot}%{_bindir}
175 install -m 755 weston-flower %{buildroot}%{_bindir}
176 install -m 755 weston-image %{buildroot}%{_bindir}
177 install -m 755 weston-cliptest %{buildroot}%{_bindir}
178 install -m 755 weston-dnd %{buildroot}%{_bindir}
179 install -m 755 weston-editor %{buildroot}%{_bindir}
180 install -m 755 weston-stacking %{buildroot}%{_bindir}
181 install -m 755 weston-smoke %{buildroot}%{_bindir}
182 install -m 755 weston-scaler %{buildroot}%{_bindir}
183 install -m 755 weston-resizor %{buildroot}%{_bindir}
184 install -m 755 weston-eventdemo %{buildroot}%{_bindir}
185 install -m 755 weston-clickdot %{buildroot}%{_bindir}
186 install -m 755 weston-subsurfaces %{buildroot}%{_bindir}
187 install -m 755 weston-transformed %{buildroot}%{_bindir}
188 install -m 755 weston-fullscreen %{buildroot}%{_bindir}
189
190 %if "%{profile}" == "ivi"
191 mkdir -p %{buildroot}%{_sysconfdir}/xdg
192 install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/xdg
193 %endif
194
195 rm -rf %{buildroot}%{_datadir}/wayland-sessions
196
197 %pre
198 getent group weston-launch >/dev/null || %{_sbindir}/groupadd -o -r weston-launch
199
200 %docs_package
201
202 %files
203 %manifest %{name}.manifest
204 %defattr(-,root,root)
205 %license COPYING
206 %{_bindir}/wcap-*
207 %{_bindir}/weston
208 %{_bindir}/weston-info
209 %attr(4755,root,root) %{_bindir}/weston-launch
210 %{_bindir}/weston-terminal
211 %{_libexecdir}/weston-*
212 %{_libdir}/weston/desktop-shell.so
213 %if !%{with mobile}
214 %{_libdir}/weston/drm-backend.so
215 %endif
216 %{_libdir}/weston/fbdev-backend.so
217 %{_libdir}/weston/fullscreen-shell.so
218 %{_libdir}/weston/headless-backend.so
219 %{_libdir}/weston/wayland-backend.so
220 %{_libdir}/weston/gl-renderer.so
221 %{_datadir}/weston
222 # exclude ivi-shell-specific files
223 %exclude %{_libexecdir}/weston-ivi-shell-user-interface
224 %exclude %{_datadir}/weston/background.png
225 %exclude %{_datadir}/weston/panel.png
226 %exclude %{_datadir}/weston/tiling.png
227 %exclude %{_datadir}/weston/sidebyside.png
228 %exclude %{_datadir}/weston/fullscreen.png
229 %exclude %{_datadir}/weston/random.png
230 %exclude %{_datadir}/weston/home.png
231 %exclude %{_datadir}/weston/icon_ivi_simple-egl.png
232 %exclude %{_datadir}/weston/icon_ivi_simple-shm.png
233 %exclude %{_datadir}/weston/icon_ivi_smoke.png
234 %exclude %{_datadir}/weston/icon_ivi_flower.png
235 %exclude %{_datadir}/weston/icon_ivi_clickdot.png
236
237 %files devel
238 %manifest %{name}.manifest
239 %{_includedir}/weston/*.h
240 %{_libdir}/pkgconfig/*.pc
241
242 %files clients
243 %manifest %{name}.manifest
244 %{_bindir}/weston-simple-touch
245 %{_bindir}/weston-simple-shm
246 %{_bindir}/weston-simple-egl
247 %{_bindir}/weston-simple-damage
248 %{_bindir}/weston-presentation-shm
249 %{_bindir}/weston-nested-client
250 %{_bindir}/weston-nested
251 %{_bindir}/weston-multi-resource
252 %{_bindir}/weston-flower
253 %{_bindir}/weston-image
254 %{_bindir}/weston-cliptest
255 %{_bindir}/weston-dnd
256 %{_bindir}/weston-editor
257 %{_bindir}/weston-stacking
258 %{_bindir}/weston-smoke
259 %{_bindir}/weston-scaler
260 %{_bindir}/weston-resizor
261 %{_bindir}/weston-eventdemo
262 %{_bindir}/weston-clickdot
263 %{_bindir}/weston-subsurfaces
264 %{_bindir}/weston-transformed
265 %{_bindir}/weston-fullscreen
266 %{_bindir}/weston-calibrator
267
268 %if %{with rdp}
269 %files rdp
270 %manifest %{name}.manifest
271 %{_libdir}/weston/rdp-backend.so
272 %{_libdir}/weston/screen-share.so
273 %endif
274
275 %if "%{profile}" == "ivi"
276 %files ivi-shell
277 %manifest %{name}.manifest
278 %{_libdir}/weston/hmi-controller.so
279 %{_libdir}/weston/ivi-shell.so
280 %{_libexecdir}/weston-ivi-shell-user-interface
281 %{_datadir}/weston/background.png
282 %{_datadir}/weston/panel.png
283 %{_datadir}/weston/tiling.png
284 %{_datadir}/weston/sidebyside.png
285 %{_datadir}/weston/fullscreen.png
286 %{_datadir}/weston/random.png
287 %{_datadir}/weston/home.png
288 %{_datadir}/weston/icon_ivi_simple-egl.png
289 %{_datadir}/weston/icon_ivi_simple-shm.png
290 %{_datadir}/weston/icon_ivi_smoke.png
291 %{_datadir}/weston/icon_ivi_flower.png
292 %{_datadir}/weston/icon_ivi_clickdot.png
293
294 %files ivi-shell-config
295 %manifest %{name}.manifest
296 %config  %{_sysconfdir}/xdg/weston.ini
297 %endif
298
299 %changelog