downstream: allow regular users to launch Weston
[platform/upstream/weston.git] / packaging / weston.spec
1 %bcond_with wayland
2 %bcond_with mobile
3 %bcond_with rdp
4
5 %if %{with mobile}
6 %define extra_config_options1 --disable-drm-compositor
7 %endif
8
9 %if %{with rdp}
10 %define extra_config_options2 --enable-rdp-compositor --enable-screen-sharing
11 %endif
12
13 %if "%{profile}" == "common"
14 %define extra_config_options3 --enable-sys-uid
15 %endif
16
17 Name:           weston
18 Version:        1.6.0
19 Release:        0
20 Summary:        Wayland Compositor Infrastructure
21 License:        MIT
22 Group:          Graphics & UI Framework/Wayland Window System
23 Url:            http://weston.freedesktop.org/
24
25 #Git-Clone:     git://anongit.freedesktop.org/wayland/weston
26 #Git-Web:       http://cgit.freedesktop.org/wayland/weston/
27 Source0:        %name-%version.tar.xz
28 Source1:        %name.target
29 Source1001:     %name.manifest
30 BuildRequires:  autoconf >= 2.64, automake >= 1.11
31 BuildRequires:  expat-devel
32 BuildRequires:  libjpeg-devel
33 BuildRequires:  libtool >= 2.2
34 BuildRequires:  libvpx-devel
35 BuildRequires:  pam-devel
36 BuildRequires:  pkgconfig
37 BuildRequires:  xz
38 BuildRequires:  pkgconfig(cairo)
39 BuildRequires:  pkgconfig(cairo-egl) >= 1.11.3
40 BuildRequires:  pkgconfig(egl) >= 7.10
41 %if %{with rdp}
42 BuildRequires:  pkgconfig(freerdp)
43 %endif
44 BuildRequires:  pkgconfig(gbm)
45 BuildRequires:  pkgconfig(gio-2.0)
46 BuildRequires:  pkgconfig(glesv2)
47 BuildRequires:  pkgconfig(glib-2.0)
48 BuildRequires:  pkgconfig(gobject-2.0)
49 %if !%{with mobile}
50 BuildRequires:  pkgconfig(libdrm) >= 2.4.30
51 %endif
52 BuildRequires:  pkgconfig(libffi)
53 BuildRequires:  pkgconfig(libinput) >= 0.6.0
54 BuildRequires:  pkgconfig(libsystemd-login)
55 BuildRequires:  pkgconfig(libudev) >= 136
56 BuildRequires:  pkgconfig(mtdev) >= 1.1.0
57 BuildRequires:  pkgconfig(pangocairo)
58 BuildRequires:  pkgconfig(pixman-1)
59 BuildRequires:  pkgconfig(poppler-glib)
60 BuildRequires:  pkgconfig(wayland-client)
61 BuildRequires:  pkgconfig(wayland-egl)
62 BuildRequires:  pkgconfig(wayland-server)
63 BuildRequires:  pkgconfig(xkbcommon) >= 0.3.0
64 Requires:       weston-startup
65 Requires(pre):  /usr/sbin/groupadd
66
67 %if !%{with wayland}
68 ExclusiveArch:
69 %endif
70
71 %description
72 Weston is the reference implementation of a Wayland compositor, and a
73 useful compositor in its own right. Weston has various backends that
74 lets it run on Linux kernel modesetting and evdev input as well as
75 under X11. Weston ships with a few example clients, from simple
76 clients that demonstrate certain aspects of the protocol to more
77 complete clients and a simplistic toolkit. There is also a quite
78 capable terminal emulator (weston-terminal) and an toy/example
79 desktop shell. Finally, weston also provides integration with the
80 Xorg server and can pull X clients into the Wayland desktop and act
81 as a X window manager.
82
83 %package devel
84 Summary: Development files for package %{name}
85 Group:   Graphics & UI Framework/Development
86 %description devel
87 This package provides header files and other developer releated files
88 for package %{name}.
89
90 %package clients
91 Summary: Sample clients for package %{name}
92 Group:   Graphics & UI Framework/Development
93 %description clients
94 This package provides a set of example wayland clients useful for
95 validating the functionality of wayland with very little dependencies
96 on other system components.
97
98 %if %{with rdp}
99 %package rdp
100 Summary: RDP compositor for %{name}
101 Group:   Graphics & UI Framework/Development
102 %description rdp
103 This package provides a RDP compositor allowing to do remote rendering
104 through the network.
105 %endif
106
107 %prep
108 %setup -q
109 cp %{SOURCE1001} .
110
111 %build
112 %autogen --disable-static \
113          --disable-setuid-install \
114          --enable-simple-clients \
115          --enable-clients \
116          --disable-libunwind \
117          --disable-xwayland \
118          --disable-xwayland-test \
119          --disable-x11-compositor \
120          --disable-rpi-compositor \
121          --with-cairo=glesv2 \
122          %{?extra_config_options1:%extra_config_options1} \
123          %{?extra_config_options2:%extra_config_options2} \
124          %{?extra_config_options3:%extra_config_options3}
125
126 make %{?_smp_mflags}
127
128 %install
129 %make_install
130
131 # install example clients
132 install -m 755 weston-calibrator %{buildroot}%{_bindir}
133 install -m 755 weston-simple-touch %{buildroot}%{_bindir}
134 install -m 755 weston-simple-shm %{buildroot}%{_bindir}
135 install -m 755 weston-simple-egl %{buildroot}%{_bindir}
136 install -m 755 weston-simple-damage %{buildroot}%{_bindir}
137 install -m 755 weston-nested-client %{buildroot}%{_bindir}
138 install -m 755 weston-nested %{buildroot}%{_bindir}
139 install -m 755 weston-flower %{buildroot}%{_bindir}
140 install -m 755 weston-image %{buildroot}%{_bindir}
141 install -m 755 weston-cliptest %{buildroot}%{_bindir}
142 install -m 755 weston-dnd %{buildroot}%{_bindir}
143 install -m 755 weston-editor %{buildroot}%{_bindir}
144 install -m 755 weston-stacking %{buildroot}%{_bindir}
145 install -m 755 weston-smoke %{buildroot}%{_bindir}
146 install -m 755 weston-scaler %{buildroot}%{_bindir}
147 install -m 755 weston-resizor %{buildroot}%{_bindir}
148 install -m 755 weston-eventdemo %{buildroot}%{_bindir}
149 install -m 755 weston-clickdot %{buildroot}%{_bindir}
150 install -m 755 weston-subsurfaces %{buildroot}%{_bindir}
151 install -m 755 weston-transformed %{buildroot}%{_bindir}
152 install -m 755 weston-fullscreen %{buildroot}%{_bindir}
153
154
155 install -d %{buildroot}%{_unitdir_user}
156 install -m 644 %{SOURCE1} %{buildroot}%{_unitdir_user}/weston.target
157 # The weston.service unit file must be provided by the weston-startup
158 # virtual package, i.e. "Provide: weston-startup".  The weston-startup
159 # virtual package requirement is intended to force Tizen profile
160 # maintainers to add the necessary start-up script or systemd unit
161 # file to start weston. Otherwise it becomes possible to install
162 # weston without an automated means to start weston at boot, which may
163 # lead to confusion.  This approach allows startup related files to be
164 # maintained outside of this weston package.
165
166 %pre
167 getent group weston-launch >/dev/null || %{_sbindir}/groupadd -o -r weston-launch
168
169 %docs_package
170
171 %files
172 %manifest %{name}.manifest
173 %defattr(-,root,root)
174 %license COPYING
175 %{_bindir}/wcap-*
176 %{_bindir}/weston
177 %{_bindir}/weston-info
178 %attr(4755,root,root) %{_bindir}/weston-launch
179 %{_bindir}/weston-terminal
180 %{_libexecdir}/weston-*
181 %{_libdir}/weston/desktop-shell.so
182 %if !%{with mobile}
183 %{_libdir}/weston/drm-backend.so
184 %endif
185 %{_libdir}/weston/fbdev-backend.so
186 %{_libdir}/weston/fullscreen-shell.so
187 %{_libdir}/weston/headless-backend.so
188 %{_libdir}/weston/wayland-backend.so
189 %{_libdir}/weston/gl-renderer.so
190 %{_datadir}/weston
191 %{_unitdir_user}/weston.target
192
193 %files devel
194 %manifest %{name}.manifest
195 %{_includedir}/weston/*.h
196 %{_libdir}/pkgconfig/*.pc
197
198 %files clients
199 %manifest %{name}.manifest
200 %{_bindir}/weston-simple-touch
201 %{_bindir}/weston-simple-shm
202 %{_bindir}/weston-simple-egl
203 %{_bindir}/weston-simple-damage
204 %{_bindir}/weston-nested-client
205 %{_bindir}/weston-nested
206 %{_bindir}/weston-flower
207 %{_bindir}/weston-image
208 %{_bindir}/weston-cliptest
209 %{_bindir}/weston-dnd
210 %{_bindir}/weston-editor
211 %{_bindir}/weston-stacking
212 %{_bindir}/weston-smoke
213 %{_bindir}/weston-scaler
214 %{_bindir}/weston-resizor
215 %{_bindir}/weston-eventdemo
216 %{_bindir}/weston-clickdot
217 %{_bindir}/weston-subsurfaces
218 %{_bindir}/weston-transformed
219 %{_bindir}/weston-fullscreen
220 %{_bindir}/weston-calibrator
221
222 %if %{with rdp}
223 %files rdp
224 %manifest %{name}.manifest
225 %{_libdir}/weston/rdp-backend.so
226 %{_libdir}/weston/screen-share.so
227 %endif
228
229 %changelog