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