summaryrefslogtreecommitdiffstats
path: root/mir.spec
blob: cb71f02e726a43760dd1fff1efc6655239864322 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
# Enable tests only for Fedora >= 27 (c.f. rhbz#304121)
%if 0%{?fedora} >= 27
%bcond_without check
%endif

%ifnarch ppc64
# Enable LTO on non-ppc64 (c.f. rhbz#1515934)
%bcond_without lto
%endif


Name:           mir
Version:        0.29.0
Release:        0%{?dist}.1
Summary:        Next generation display server

# mirserver is GPLv2/GPLv3, mirclient is LGPLv2/LGPLv3
License:        (GPLv2 or GPLv3) and (LGPLv2 or LGPLv3)
URL:            https://mir-server.io/
Source0:        https://github.com/MirServer/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.xz

# Fedora-specific patches
Patch1001:      mir-0.29.0-tests-Make-wlcs-build-as-a-static-library.patch

BuildRequires:  cmake, make, doxygen, graphviz, lcov, gcovr
BuildRequires:  /usr/bin/xsltproc
BuildRequires:  boost-devel, protobuf-compiler, capnproto
BuildRequires:  libdrm-devel, mesa-libEGL-devel, mesa-libGLES-devel
BuildRequires:  python3-devel
BuildRequires:  mesa-libgbm-devel, glm-devel, libepoxy-devel
BuildRequires:  protobuf-devel, protobuf-lite-devel, capnproto-devel
BuildRequires:  glog-devel, lttng-ust-devel
BuildRequires:  libxkbcommon-devel, umockdev-devel
BuildRequires:  systemd-devel, libevdev-devel
BuildRequires:  libinput-devel
BuildRequires:  libuuid-devel, nettle-devel
BuildRequires:  glib2-devel, freetype-devel, gflags-devel
BuildRequires:  wayland-devel, libxml++-devel, python3-pillow
# For some reason, this doesn't get pulled in automatically into the buildroot
BuildRequires:  libatomic
%if %{with check}
BuildRequires:  gtest-devel, gmock-devel
%endif

# For detecting the font for CMake
BuildRequires:  gnu-free-sans-fonts

# For validating the desktop file for mir-demos
BuildRequires:  %{_bindir}/desktop-file-validate

BuildRequires:  python3

# Add architectures as verified to work
%ifarch %{ix86} x86_64 %{arm} aarch64
BuildRequires:  valgrind
%endif


%description
Mir is a display server running on linux systems,
with a focus on efficiency, robust operation,
and a well-defined driver model.

%package utils
Summary:       Utilities for Mir
Requires:      %{name}-server-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires:      %{name}-client-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description utils
Utilities for Mir.

%package devel
Summary:       Development files for Mir
# mirserver components are GPLv2/GPLv3 while mirclient components are LGPLv2/LGPLv3
License:       (LGPLv2 or LGPLv3) and (GPLv2 or GPLv3)
Requires:      %{name}-common-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires:      %{name}-server-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires:      %{name}-client-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires:      %{name}-client-libs-debugext%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%if %{with check}
Requires:      %{name}-test-libs-static%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%endif

%description devel
This package provides the development files to create
applications that can run on Mir.

%package common-libs
Summary:       Common libraries for Mir
License:       LGPLv2 or LGPLv3

%description common-libs
This package provides the libraries common to be used
by Mir clients or Mir servers.

%package server-libs
Summary:       Server libraries for Mir
License:       GPLv2 or GPLv3
Requires:      %{name}-common-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description server-libs
This package provides the libraries for applications
that use the Mir server.

%package client-libs
Summary:       Client libraries for Mir
License:       LGPLv2 or LGPLv3
Requires:      %{name}-common-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description client-libs
This package provides the libraries for applications
that connect to a Mir server.

%package client-libs-debugext
Summary:       Debug extension for Mir client libraries
License:       LGPLv2 or LGPLv3
Requires:      %{name}-client-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description client-libs-debugext
This package provides a debug extension library for
Mir clients.

%package test-tools
Summary:       Testing tools for Mir
License:       GPLv2 or GPLv3
Requires:      %{name}-server-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires:      %{name}-client-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Recommends:    %{name}-demos
Recommends:    glmark2
Recommends:    xorg-x11-server-Xwayland
# There's no release of this yet, and the buildsystem isn't set up for independent installs
# upstream issue: https://github.com/MirServer/mir/issues/106
Provides:      bundled(wlcs)

%description test-tools
This package provides tools for testing Mir.

%package demos
Summary:       Demonstration applications using Mir
Requires:      %{name}-server-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires:      %{name}-client-libs%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires:      hicolor-icon-theme
# For some of the demos
Requires:      gnu-free-sans-fonts

%description demos
This package provides applications for demonstrating
the capabilities of the Mir display server.

%package doc
Summary:       Documentation for developing Mir based applications
BuildArch:     noarch

%description doc
This package provides documentation for developing Mir based
applications.

%if %{with check}
%package -n python3-mir-perf-framework
Summary:       Performance benchmark framework for Mir
BuildArch:     noarch

%description -n python3-mir-perf-framework
This package provides a benchmark framework for Mir
and Mir based applications.

%package test-libs-static
Summary:       Testing framework library for Mir
License:       LGPLv2 or LGPLv3
Requires:      %{name}-devel%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}

%description test-libs-static
This package provides the static library for building
Mir unit and integration tests.

%endif

%prep
%autosetup -p1


%build

mkdir -p %{_target_platform}
pushd %{_target_platform}
%cmake .. %{?with_lto:-DMIR_LINK_TIME_OPTIMIZATION=ON} \
       	  -DCMAKE_INSTALL_LIBEXECDIR="usr/libexec/mir" \
	  %{?!with_check:-DMIR_ENABLE_TESTS=OFF -DMIR_RUN_ACCEPTANCE_TESTS=OFF -DRUN_INTEGRATION_TESTS=OFF} \
	  -DMIR_PLATFORM="mesa-kms;mesa-x11;eglstream-kms"
%make_build
popd

%install
pushd %{_target_platform}
%make_install

# Build and install documentation
make doc
mkdir -p %{buildroot}%{_datadir}/doc/mir-doc
cp -a doc/html %{buildroot}%{_datadir}/doc/mir-doc
popd

# Nothing outside Mir should link to libmirprotobuf directly.
rm -fv %{buildroot}%{_libdir}/libmirprotobuf.so

%if ! %{with check}
rm -rf %{buildroot}%{_datadir}/mir-perf-framework
%endif

%check
%if %{with check}
pushd %{_target_platform}
# The mir_unit_tests_mesa-kms test is fiddly on some machines, but generally passes on the buildsystem...
ctest -V .. || :
popd
%endif
desktop-file-validate %{buildroot}%{_datadir}/applications/miral-shell.desktop


%post common-libs -p /sbin/ldconfig

%postun common-libs -p /sbin/ldconfig

%post server-libs -p /sbin/ldconfig

%postun server-libs -p /sbin/ldconfig

%post client-libs -p /sbin/ldconfig

%postun client-libs -p /sbin/ldconfig

%post client-libs-debugext -p /sbin/ldconfig

%postun client-libs-debugext -p /sbin/ldconfig


%post demos
# This really should be a file trigger in hicolor-icon-theme...
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun demos
# This really should be a file trigger in hicolor-icon-theme...
if [ $1 -eq 0 ] ; then
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

%posttrans demos
# This really should be a file trigger in hicolor-icon-theme...
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :


%files utils
%license COPYING.*
%doc README.md
%{_bindir}/mirbacklight
%{_bindir}/mirin
%{_bindir}/mirout
%{_bindir}/mirrun
%{_bindir}/mirscreencast

%files devel
%{_libdir}/libmir*.so
%exclude %{_libdir}/libmir_demo_server_loadable.so
%{_libdir}/pkgconfig/mir*.pc
%{_includedir}/mir*

%files common-libs
%license COPYING.*
%doc README.md
%{_libdir}/libmircore.so.*
%{_libdir}/libmircommon.so.*
%{_libdir}/libmircookie.so.*
%{_libdir}/libmirplatform.so.*
%{_libdir}/libmirprotobuf.so.*
%dir %{_libdir}/mir

%files server-libs
%license COPYING.*
%doc README.md
%{_libdir}/libmiral.so.*
%{_libdir}/libmirserver.so.*
%dir %{_libdir}/mir/server-platform
%{_libdir}/mir/server-platform/graphics-mesa-kms.so.*
%{_libdir}/mir/server-platform/input-evdev.so.*
%{_libdir}/mir/server-platform/server-mesa-x11.so.*
%{_libdir}/mir/server-platform/graphics-eglstream-kms.so.*

%files client-libs
%license COPYING.*
%doc README.md
%{_libdir}/libmirclient.so.*
%dir %{_libdir}/mir/client-platform
%{_libdir}/mir/client-platform/mesa.so.*
%{_libdir}/mir/client-platform/eglstream.so.*

%files client-libs-debugext
%{_libdir}/libmirclient-debug-extension.so.*

%files test-tools
%if %{with check}
%{_bindir}/mir-*test*
%{_bindir}/mir_*test*
%{_bindir}/mir_stress
%{_libdir}/mir/client-platform/dummy.so
%{_libdir}/mir/server-platform/graphics-dummy.so
%{_libdir}/mir/server-platform/graphics-throw.so
%{_libdir}/mir/server-platform/input-stub.so
%{_datadir}/mir-test-data/
%endif
%dir %{_libdir}/mir/tools
%{_libdir}/mir/tools/libmirserverlttng.so
%{_libdir}/mir/tools/libmirclientlttng.so

%files demos
%license COPYING.*
%doc README.md
%{_bindir}/mir_demo_*
%{_bindir}/miral-*
%{_libdir}/libmir_demo_server_loadable.so
%{_datadir}/applications/miral-shell.desktop
%{_datadir}/icons/hicolor/scalable/apps/ubuntu-logo.svg

%files doc
%license COPYING.*
%doc README.md
%{_datadir}/doc/mir-doc/html

%if %{with check}
%files -n python3-mir-perf-framework
%license COPYING.*
%doc README.md
%{python3_sitelib}/mir_perf_framework
%{python3_sitelib}/mir_perf_framework*.egg-info
%{_datadir}/mir-perf-framework

%files test-libs-static
%license COPYING.*
%doc README.md
%{_libdir}/libmir-test-assist.a
%endif

%changelog
* Sun Dec 17 2017 Neal Gompa <ngompa13@gmail.com> - 0.29.0-0.1
- Update to 0.29.0 (RH#1526660)

* Tue Dec 12 2017 Neal Gompa <ngompa13@gmail.com> - 0.29~git20171212-0.1
- Rebase to 0.29 prerelease

* Mon Nov 20 2017 Neal Gompa <ngompa13@gmail.com> - 0.28.1-1
- Initial import into Fedora (RH#1513512)

* Sat Nov 18 2017 Neal Gompa <ngompa13@gmail.com> - 0.28.1-0.3
- Add scriptlets for updating icon cache to mir-demos
- Add hicolor-icon-theme dependency to mir-demos
- Validate the desktop file shipped in mir-demos
- Declare which subpackages own Mir library subdirectories

* Fri Nov 17 2017 Neal Gompa <ngompa13@gmail.com> - 0.28.1-0.2
- Add patch to fix building with libprotobuf 3.4.1

* Wed Nov 15 2017 Neal Gompa <ngompa13@gmail.com> - 0.28.1-0.1
- Rebase to 0.28.1
- Add patch to fix installing the perf framework
- Add patch to fix locating Google Mock for building Mir

* Sat Apr 15 2017 Neal Gompa <ngompa13@gmail.com> - 0.26.2-0.1
- Rebase to 0.26.2

* Wed Nov  9 2016 Neal Gompa <ngompa13@gmail.com> - 0.24.1-0.2
- Add patch to add missing xkbcommon Requires to mirclient.pc

* Mon Oct 31 2016 Neal Gompa <ngompa13@gmail.com> - 0.24.1-0.1
- Initial packaging