1 |
#global gitdate 20151027 |
2 |
# temporary build fix: |
3 |
%define _python_bytecompile_build 0 |
4 |
|
5 |
%bcond_with debug |
6 |
%define enable_builddocs 0 |
7 |
|
8 |
# Need this for shared objects that reference X Server, or other modules symbols |
9 |
%define _disable_ld_no_undefined 1 |
10 |
|
11 |
# Alternatives priority for standard libglx.so and mesa libs |
12 |
%define priority 500 |
13 |
|
14 |
%define rel 4 |
15 |
%define subrel 1 |
16 |
|
17 |
%global __provides_exclude_from %{_datadir}/%{name}-source |
18 |
%global __requires_exclude_from %{_datadir}/%{name}-source |
19 |
|
20 |
# Released ABI versions. Have to keep these manually in sync with the |
21 |
# source because rpm is a terrible language. |
22 |
%global ansic_major 0 |
23 |
%global ansic_minor 4 |
24 |
%global videodrv_major 24 |
25 |
%global videodrv_minor 1 |
26 |
%global xinput_major 24 |
27 |
%global xinput_minor 1 |
28 |
%global extension_major 10 |
29 |
%global extension_minor 0 |
30 |
|
31 |
%global pkgname xorg-server |
32 |
|
33 |
Name: x11-server |
34 |
Version: 1.20.14 |
35 |
Release: %mkrel %rel%{?gitdate:.%{gitdate}} |
36 |
Summary: X11 servers |
37 |
Group: System/X11 |
38 |
URL: https://xorg.freedesktop.org |
39 |
%if 0%{?gitdate} |
40 |
Source0: xorg-server-%{gitdate}.tar.xz |
41 |
%else |
42 |
Source0: http://www.x.org/pub/individual/xserver/%{pkgname}-%{version}.tar.xz |
43 |
Source1: gitignore |
44 |
%endif |
45 |
Source4: 10-quirks.conf |
46 |
Source5: mageia-setup-keyboard-udev |
47 |
Source6: 61-x11-input.rules |
48 |
Source10: xserver.pamd |
49 |
# from RH/FC: |
50 |
# "useful" xvfb-run script |
51 |
Source20: https://svn.exactcode.de/t2/trunk/package/xorg/xorg-server/xvfb-run.sh |
52 |
Source21: https://svn.exactcode.de/t2/trunk/package/xorg/xorg-server/xvfb-run.1 |
53 |
# for requires generation in drivers |
54 |
Source30: xserver-sdk-abi-requires.release |
55 |
# for finding & loading nvidia and flgrx drivers: |
56 |
Source90: 00-modules.conf |
57 |
License: GPLv2+ and MIT |
58 |
|
59 |
# Instructions to setup your repository clone |
60 |
# git://anongit.freedesktop.org/git/xorg/xserver |
61 |
# git checkout origin/server-1.7-branch |
62 |
# git checkout -b mdv-1.7-cherry-picks |
63 |
# git am ../03??-*.patch |
64 |
# git checkout -b mdv-1.7-redhat |
65 |
# git am ../04??-*.patch |
66 |
# git checkout -b mdv-1.7-patches |
67 |
# git am ../09??-*.patch |
68 |
|
69 |
# Sync with server-1.20-branch |
70 |
# git format-patch --start-number 100 xorg-server-1.20.3..server-1.20-branch |
71 |
Patch100: 0100-present-Check-for-NULL-to-prevent-crash.patch |
72 |
Patch101: 0101-xf86-Accept-devices-with-the-simpledrm-driver.patch |
73 |
|
74 |
# xorg server master branch from 200 |
75 |
Patch200: 0200-xfree86-modes-Add-NoOutputInitialSize-option.patch |
76 |
Patch203: 0203-Revert-systemd-logind-Monitor-systemd-logind-going-a.patch |
77 |
Patch204: 0204-dri2-Set-fallback-driver-names-for-Intel-and-AMD-chi.patch |
78 |
# CVE pre-req |
79 |
Patch205: 0205-xkb-switch-to-array-index-loops-to-moving-pointers.patch |
80 |
# ZDI-CAN 16070, CVE-2022-2320 |
81 |
Patch206: 0206-xkb-swap-XkbSetDeviceInfo-and-XkbSetDeviceInfoCheck.patch |
82 |
# ZDI-CAN 16062, CVE-2022-2319 |
83 |
Patch207: 0207-xkb-add-request-length-validation-for-XkbSetGeometry.patch |
84 |
# CVE-2022-3550 |
85 |
Patch208: 0208-xkb-proof-GetCountedString-against-request-length-at.patch |
86 |
# CVE-2022-3551 |
87 |
Patch209: 0209-xkb-fix-some-possible-memleaks-in-XkbGetKbdByName.patch |
88 |
|
89 |
# Fedora Patches |
90 |
Patch1001: 0001-Xtest-disallow-GenericEvents-in-XTestSwapFakeInput.patch |
91 |
Patch1002: 0002-Xi-return-an-error-from-XI-property-changes-if-verif.patch |
92 |
Patch1003: 0003-Xi-avoid-integer-truncation-in-length-check-of-ProcX.patch |
93 |
Patch1004: 0004-Xi-disallow-passive-grabs-with-a-detail-255.patch |
94 |
Patch1005: 0005-Xext-free-the-screen-saver-resource-when-replacing-i.patch |
95 |
Patch1006: 0006-Xext-free-the-XvRTVideoNotify-when-turning-off-from-.patch |
96 |
Patch1007: 0007-xkb-reset-the-radio_groups-pointer-to-NULL-after-fre.patch |
97 |
Patch1008: 0008-Xext-fix-invalid-event-type-mask-in-XTestSwapFakeInp.patch |
98 |
|
99 |
# XXX needs rebase, but also va_gl should probably just be the default |
100 |
# Patch3: 0001-xf86-dri2-Use-va_gl-as-vdpau_driver-for-Intel-i965-G.patch |
101 |
|
102 |
# Submitted upstream, but not going anywhere |
103 |
Patch5: 0001-autobind-GPUs-to-the-screen.patch |
104 |
|
105 |
# because the display-managers are not ready yet, do not upstream |
106 |
Patch6: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch |
107 |
|
108 |
# Backports from current stable "server-1.20-branch": |
109 |
# <empty> |
110 |
|
111 |
# Backports from "master" upstream: |
112 |
# <empty> |
113 |
|
114 |
# Backported Xwayland randr resolution change emulation support |
115 |
Patch501: 0001-dix-Add-GetCurrentClient-helper.patch |
116 |
Patch502: 0002-xwayland-Add-wp_viewport-wayland-extension-support.patch |
117 |
Patch503: 0003-xwayland-Use-buffer_damage-instead-of-surface-damage.patch |
118 |
Patch504: 0004-xwayland-Add-fake-output-modes-to-xrandr-output-mode.patch |
119 |
Patch505: 0005-xwayland-Use-RandR-1.2-interface-rev-2.patch |
120 |
Patch506: 0006-xwayland-Add-per-client-private-data.patch |
121 |
Patch507: 0007-xwayland-Add-support-for-storing-per-client-per-outp.patch |
122 |
Patch508: 0008-xwayland-Add-support-for-randr-resolution-change-emu.patch |
123 |
Patch509: 0009-xwayland-Add-xwlRRModeToDisplayMode-helper-function.patch |
124 |
Patch510: 0010-xwayland-Add-xwlVidModeGetCurrentRRMode-helper-to-th.patch |
125 |
Patch511: 0011-xwayland-Add-vidmode-mode-changing-emulation-support.patch |
126 |
Patch512: 0012-xwayland-xwl_window_should_enable_viewport-Add-extra.patch |
127 |
Patch513: 0013-xwayland-Set-_XWAYLAND_RANDR_EMU_MONITOR_RECTS-prope.patch |
128 |
Patch514: 0014-xwayland-Cache-client-id-for-the-window-manager-clie.patch |
129 |
Patch515: 0015-xwayland-Reuse-viewport-instead-of-recreating.patch |
130 |
Patch516: 0016-xwayland-Recurse-on-finding-the-none-wm-owner.patch |
131 |
Patch517: 0017-xwayland-Make-window_get_none_wm_owner-return-a-Wind.patch |
132 |
Patch518: 0018-xwayland-Check-emulation-on-client-toplevel-resize.patch |
133 |
Patch519: 0019-xwayland-Also-check-resolution-change-emulation-when.patch |
134 |
Patch520: 0020-xwayland-Also-hook-screen-s-MoveWindow-method.patch |
135 |
Patch521: 0021-xwayland-Fix-emulated-modes-not-being-removed-when-s.patch |
136 |
Patch522: 0022-xwayland-Call-xwl_window_check_resolution_change_emu.patch |
137 |
Patch523: 0023-xwayland-Fix-setting-of-_XWAYLAND_RANDR_EMU_MONITOR_.patch |
138 |
Patch524: 0024-xwayland-Remove-unnecessary-xwl_window_is_toplevel-c.patch |
139 |
Patch525: 0025-xwayland-Make-window_get_client_toplevel-non-recursi.patch |
140 |
|
141 |
# Mageia patches |
142 |
# git format-patch --start-number 900 mdv-1.6.4-redhat..mdv-1.6.4-patches |
143 |
Patch900: 0900-Use-a-X-wrapper-that-uses-pam-and-consolehelper-to-g.patch |
144 |
Patch901: 0901-Don-t-print-information-about-X-Server-being-a-pre-r.patch |
145 |
Patch902: 0902-Take-width-into-account-when-choosing-default-mode.patch |
146 |
Patch903: 0903-LED-behavior-fixes.patch |
147 |
Patch906: 0906-xfree86-need-to-press-Ctrl-Alt-Bksp-twice-to-termina.patch |
148 |
|
149 |
# Candidates for dropping: |
150 |
# 902: by pixel, so that X11 choose the best resolution with a better algorithm |
151 |
# 903: Input subsystem has changed *a lot* since this patch was written... I |
152 |
# fear it might break things now |
153 |
# 906: All this patch does is force users to hit ctrl+alt+bksp twice (with |
154 |
# an annoying sound) IF the hotkey is enabled. If the user chooses to |
155 |
# enable ctrk+alt+bksp, why force him to hit twice? OTOH, the sound is |
156 |
# annoying, and it should teach users to not use ctrl+alt+bksp =D |
157 |
|
158 |
# Do not crash if Xv is not initialized (patch from xorg-devel ML) |
159 |
# The crash happened when v4l was loaded and xv was not registered, |
160 |
# for example on RV610 with radeon driver |
161 |
Patch4001: 1001-do-not-crash-if-xv-not-initialized.patch |
162 |
|
163 |
# (cg) Point the user at the journal rather than a logfile at /dev/null |
164 |
Patch5001: point-user-at-journal-rather-than-dev-null.patch |
165 |
|
166 |
# from Suse |
167 |
Patch5009: N_Disable-HW-Cursor-for-cirrus-and-mgag200-kernel-modules.patch |
168 |
Source5010: u_os-connections-Check-for-stale-FDs.patch |
169 |
|
170 |
# Security fixes |
171 |
|
172 |
Requires: %{name}-xorg |
173 |
Requires: %{name}-xdmx |
174 |
Requires: %{name}-xnest |
175 |
Requires: %{name}-xvfb |
176 |
|
177 |
# This should be removed when any of the vnc packages provide x11-server-xvnc: |
178 |
Obsoletes: %{name}-xvnc < %{version}-%{release} |
179 |
|
180 |
Obsoletes: %{name}-xfake < %{version}-%{release} |
181 |
|
182 |
# temp force new gcc |
183 |
BuildRequires: gcc >= 10.1.0-1 |
184 |
BuildRequires: binutils >= 1:2.34-10 |
185 |
# temp force new glibc |
186 |
BuildRequires: glibc >= 6:2.31-8 |
187 |
# nsl bits gone in glibc 2.32, add separate libnsl dep |
188 |
BuildRequires: pkgconfig(libnsl) |
189 |
# rpc bits gone in glibc 2.32, add separate libtirpc dep |
190 |
BuildRequires: pkgconfig(libtirpc) |
191 |
|
192 |
BuildRequires: systemtap-sdt-devel |
193 |
BuildRequires: git-core |
194 |
BuildRequires: libpam-devel |
195 |
BuildRequires: pkgconfig(egl) |
196 |
BuildRequires: pkgconfig(fontutil) >= 1.1 |
197 |
BuildRequires: pkgconfig(gbm) |
198 |
BuildRequires: pkgconfig(dri) |
199 |
BuildRequires: pkgconfig(gl) |
200 |
BuildRequires: pkgconfig(libudev) |
201 |
BuildRequires: pkgconfig(pciaccess) |
202 |
BuildRequires: pkgconfig(pixman-1) >= 0.9.5 |
203 |
BuildRequires: pkgconfig(systemd) |
204 |
BuildRequires: pkgconfig(xau) >= 1.0.0 |
205 |
BuildRequires: pkgconfig(xaw7) >= 1.0.1 |
206 |
BuildRequires: pkgconfig(xdmcp) >= 1.0.0 |
207 |
BuildRequires: pkgconfig(xext) >= 1.1 |
208 |
BuildRequires: pkgconfig(xfixes) |
209 |
BuildRequires: pkgconfig(xfont2) |
210 |
BuildRequires: pkgconfig(xi) >= 1.1.3 |
211 |
BuildRequires: pkgconfig(xkbfile) >= 1.0.4 |
212 |
BuildRequires: pkgconfig(xmu) >= 1.0.0 |
213 |
BuildRequires: pkgconfig(xorg-macros) >= 1.10 |
214 |
BuildRequires: pkgconfig(xpm) >= 3.5.4.2 |
215 |
BuildRequires: pkgconfig(xrender) >= 0.9.4 |
216 |
BuildRequires: pkgconfig(xres) >= 1.0.0 |
217 |
BuildRequires: pkgconfig(xtrans) >= 1.3.5 |
218 |
BuildRequires: pkgconfig(xv) |
219 |
BuildRequires: x11-proto-devel >= 7.7-11 |
220 |
|
221 |
# for ./hw/xwin/glx/gen_gl_wrappers.py: |
222 |
%define _python_bytecompile_errors_terminate_build 0 |
223 |
|
224 |
# Probably only needed if we change .l or .y files, but let's have them anyway: |
225 |
BuildRequires: byacc |
226 |
BuildRequires: flex |
227 |
|
228 |
# for xkbcomp patch |
229 |
BuildRequires: pkgconfig(libcrypto) |
230 |
|
231 |
|
232 |
BuildRequires: pkgconfig(dbus-1) |
233 |
|
234 |
BuildRequires: pkgconfig(dmx) |
235 |
BuildRequires: pkgconfig(xtst) >= 1.1 |
236 |
|
237 |
BuildRequires: pkgconfig(wayland-client) >= 1.3.0 |
238 |
BuildRequires: pkgconfig(wayland-eglstream-protocols) |
239 |
BuildRequires: pkgconfig(wayland-protocols) |
240 |
BuildRequires: pkgconfig(epoxy) |
241 |
BuildRequires: pkgconfig(xshmfence) >= 1.1 |
242 |
|
243 |
BuildRequires: pkgconfig(libunwind) |
244 |
|
245 |
BuildRequires: pkgconfig(xcb-aux) pkgconfig(xcb-image) pkgconfig(xcb-icccm) |
246 |
BuildRequires: pkgconfig(xcb-keysyms) pkgconfig(xcb-renderutil) |
247 |
|
248 |
%if %{enable_builddocs} |
249 |
BuildRequires: doxygen |
250 |
BuildRequires: fop |
251 |
BuildRequires: xmlto |
252 |
BuildRequires: pkgconfig(xorg-sgml-doctools) |
253 |
%endif |
254 |
|
255 |
%description |
256 |
X.Org X11 X server |
257 |
|
258 |
|
259 |
%package common |
260 |
Summary: Xorg server common files |
261 |
Group: System/X11 |
262 |
License: MIT |
263 |
Provides: XFree86 = 7.0.0 |
264 |
Requires: rgb |
265 |
# for 'fixed' and 'cursor' fonts |
266 |
Requires: x11-font-misc-misc |
267 |
Requires: x11-font-cursor-misc |
268 |
Requires: x11-font-alias |
269 |
Requires: x11-data-xkbdata |
270 |
Requires: xkbcomp |
271 |
Requires: udev |
272 |
# else modesetting fails on minimal install: |
273 |
Requires: %{mklibname mesaegl 1} |
274 |
Requires(post): update-alternatives |
275 |
Requires(postun): update-alternatives |
276 |
# nvidia-71xx does not support X.org server >= 1.5 |
277 |
Conflicts: x11-driver-video-nvidia71xx < 71.86.09-2 |
278 |
# old fglrx does not support X.org server >= 1.7 |
279 |
Conflicts: x11-driver-video-fglrx < 8.720 |
280 |
# Fix: missing conflicts to allow upgrade from 2008.0 to cooker |
281 |
# http://qa.mandriva.com/show_bug.cgi?id=36651 |
282 |
Conflicts: x11-driver-video-nvidia-current <= 100.14.19 |
283 |
|
284 |
|
285 |
Provides: xserver-abi(ansic-%{ansic_major}) = %{ansic_minor} |
286 |
Provides: xserver-abi(videodrv-%{videodrv_major}) = %{videodrv_minor} |
287 |
Provides: xserver-abi(xinput-%{xinput_major}) = %{xinput_minor} |
288 |
Provides: xserver-abi(extension-%{extension_major}) = %{extension_minor} |
289 |
# For proprietary drivers that can support multiple videodrv versions: |
290 |
Provides: xserver-abi(videodrv) = %{videodrv_major}.%{videodrv_minor} |
291 |
|
292 |
%description common |
293 |
X server common files |
294 |
|
295 |
%package xorg |
296 |
Summary: Xorg X server |
297 |
Group: System/X11 |
298 |
License: MIT |
299 |
Requires: x11-server-common = %{version}-%{release} |
300 |
Requires: x11-data-xkbdata > 1.3-5 |
301 |
Requires: x11-font-alias |
302 |
Requires: libx11-common |
303 |
Requires: x11-driver-input-libinput |
304 |
|
305 |
# minimum libxfont needed for xserver-1.9: |
306 |
Requires: libxfont >= 1.4.2 |
307 |
|
308 |
%rename glamor |
309 |
%rename x11-driver-video-modesetting |
310 |
|
311 |
%description xorg |
312 |
X.org X11 is an open source implementation of the X Window System. It |
313 |
provides the basic low level functionality which full fledged |
314 |
graphical user interfaces (GUIs) such as GNOME and KDE are designed |
315 |
upon. |
316 |
|
317 |
|
318 |
%package xnest |
319 |
Summary: A nested server |
320 |
Group: System/X11 |
321 |
License: MIT |
322 |
Requires: x11-server-common = %{version}-%{release} |
323 |
|
324 |
%description xnest |
325 |
Xnest is an X server which has been implemented as an ordinary |
326 |
X application. It runs in a window just like other X applications, |
327 |
but it is an X server itself in which you can run other software. It |
328 |
is a very useful tool for developers who wish to test their |
329 |
applications without running them on their real X server. |
330 |
|
331 |
|
332 |
%package xdmx |
333 |
Summary: Distributed Multihead X Server and utilities |
334 |
Group: System/X11 |
335 |
License: MIT |
336 |
Requires: x11-server-common = %{version}-%{release} |
337 |
|
338 |
%description xdmx |
339 |
Xdmx is a proxy X server that provides multi-head support for multiple displays |
340 |
attached to different machines (each of which is running a typical X server). |
341 |
When Xinerama is used with Xdmx, the multiple displays on multiple machines |
342 |
are presented to the user as a single unified screen. A simple application |
343 |
for Xdmx would be to provide multi-head support using two desktop machines, |
344 |
each of which has a single display device attached to it. A complex |
345 |
application for Xdmx would be to unify a 4 by 4 grid of 1280x1024 displays |
346 |
(each attached to one of 16 computers) into a unified 5120x4096 display. |
347 |
|
348 |
|
349 |
%package xvfb |
350 |
Summary: A X Windows System virtual framebuffer X server |
351 |
Group: System/X11 |
352 |
# xvfb-run is GPLv2, rest is MIT |
353 |
License: MIT and GPLv2 |
354 |
Requires: x11-server-common = %{version}-%{release} |
355 |
Requires: xauth |
356 |
|
357 |
|
358 |
%description xvfb |
359 |
Xvfb (X Virtual Frame Buffer) is an X server that is able to run on |
360 |
machines with no display hardware and no physical input devices. |
361 |
Xvfb simulates a dumb framebuffer using virtual memory. Xvfb does |
362 |
not open any devices, but behaves otherwise as an X display. Xvfb |
363 |
is normally used for testing servers. |
364 |
|
365 |
|
366 |
%package xephyr |
367 |
Summary: A nested server |
368 |
Group: System/X11 |
369 |
License: MIT |
370 |
Requires: x11-server-common = %{version}-%{release} |
371 |
|
372 |
%description xephyr |
373 |
Xephyr is an X server which has been implemented as an ordinary |
374 |
X application. It runs in a window just like other X applications, |
375 |
but it is an X server itself in which you can run other software. It |
376 |
is a very useful tool for developers who wish to test their |
377 |
applications without running them on their real X server. Unlike |
378 |
Xnest, Xephyr renders to an X image rather than relaying the |
379 |
X protocol, and therefore supports the newer X extensions like |
380 |
Render and Composite. |
381 |
|
382 |
|
383 |
%package xwayland |
384 |
Summary: Wayland X Server |
385 |
Group: System/X11 |
386 |
License: MIT |
387 |
Requires: x11-server-common = %{version}-%{release} |
388 |
|
389 |
%description xwayland |
390 |
Xwayland is an X server for running X clients under Wayland. |
391 |
|
392 |
%package devel |
393 |
Summary: SDK for X server driver module development |
394 |
Group: Development/X11 |
395 |
License: MIT |
396 |
|
397 |
%define oldxorgnamedevel %mklibname xorg-x11 |
398 |
Requires: libpixman-1-devel |
399 |
Requires: libpciaccess-devel |
400 |
Requires: libxkbfile-devel |
401 |
Requires: libxext-devel >= 1.1 |
402 |
Requires: pkgconfig(xfont2) |
403 |
# pkgconfig file needs dri.pc: |
404 |
Requires: GL-devel |
405 |
|
406 |
%description devel |
407 |
The SDK package provides the developmental files which are necessary for |
408 |
developing X server driver modules, and for compiling driver modules |
409 |
outside of the standard X11 source code tree. Developers writing video |
410 |
drivers, input drivers, or other X modules should install this package. |
411 |
|
412 |
|
413 |
%package source |
414 |
Summary: Xserver source code required to build VNC server (Xvnc) |
415 |
Group: Development/X11 |
416 |
License: MIT |
417 |
BuildArch: noarch |
418 |
|
419 |
%description source |
420 |
Xserver source code needed to build VNC server (Xvnc) |
421 |
|
422 |
|
423 |
%prep |
424 |
%autosetup -N -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} |
425 |
rm -rf .git |
426 |
cp %{SOURCE1} .gitignore |
427 |
# ick |
428 |
%global __scm git |
429 |
%{expand:%__scm_setup_git -q} |
430 |
%autopatch |
431 |
|
432 |
# check the ABI in the source against what we expect. |
433 |
getmajor() { |
434 |
grep -i ^#define.ABI.$1_VERSION hw/xfree86/common/xf86Module.h | |
435 |
tr '(),' ' ' | awk '{ print $4 }' |
436 |
} |
437 |
|
438 |
getminor() { |
439 |
grep -i ^#define.ABI.$1_VERSION hw/xfree86/common/xf86Module.h | |
440 |
tr '(),' ' ' | awk '{ print $5 }' |
441 |
} |
442 |
|
443 |
test `getmajor ansic` == %{ansic_major} |
444 |
test `getminor ansic` == %{ansic_minor} |
445 |
test `getmajor videodrv` == %{videodrv_major} |
446 |
test `getminor videodrv` == %{videodrv_minor} |
447 |
test `getmajor xinput` == %{xinput_major} |
448 |
test `getminor xinput` == %{xinput_minor} |
449 |
test `getmajor extension` == %{extension_major} |
450 |
test `getminor extension` == %{extension_minor} |
451 |
|
452 |
|
453 |
%build |
454 |
|
455 |
%ifnarch %{ix86} x86_64 |
456 |
%global no_int10 --disable-vbe --disable-int10-module |
457 |
%endif |
458 |
%global kdrive --enable-kdrive --enable-xephyr |
459 |
%global xservers --enable-xvfb --enable-xnest %{kdrive} --enable-xorg |
460 |
%global default_font_path "catalogue:/etc/X11/fontpath.d,built-ins" |
461 |
%global dri_flags --enable-dri2 --enable-dri3 --enable-suid-wrapper --enable-glamor |
462 |
%global bodhi_flags --with-vendor-name="%_vendor" |
463 |
|
464 |
%if %with debug |
465 |
CFLAGS='-DBUILDDEBUG -O0 -g3' \ |
466 |
%endif |
467 |
autoreconf -f -v --install || exit 1 |
468 |
%configure %{xservers} \ |
469 |
--with-log-dir=%{_logdir} \ |
470 |
--enable-dependency-tracking \ |
471 |
--enable-xwayland-eglstream \ |
472 |
%{?no_int10} --with-int10=x86emu \ |
473 |
--with-default-font-path=%{default_font_path} \ |
474 |
--with-module-dir=%{_libdir}/xorg/modules \ |
475 |
--with-vendor-web="https://bugs.mageia.org" \ |
476 |
%if %{with debug} |
477 |
--enable-debug \ |
478 |
%else |
479 |
--disable-debug \ |
480 |
%endif |
481 |
--with-builderstring="Build ID: %{name} %{version}-%{release}" \ |
482 |
--with-os-name="$(hostname -s) $(uname -r)" \ |
483 |
--without-dtrace \ |
484 |
--disable-xselinux --enable-record --enable-present \ |
485 |
--enable-xcsecurity \ |
486 |
--enable-config-udev \ |
487 |
--disable-strict-compilation \ |
488 |
--enable-dpms \ |
489 |
--disable-install-setuid \ |
490 |
--enable-pam \ |
491 |
--enable-dmx \ |
492 |
--enable-xwayland \ |
493 |
%{dri_flags} %{?bodhi_flags} \ |
494 |
--with-sha1=libcrypto \ |
495 |
|
496 |
pushd include && make xorg-server.h dix-config.h xorg-config.h && popd |
497 |
%make_build |
498 |
|
499 |
%install |
500 |
%make_install |
501 |
|
502 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} |
503 |
|
504 |
mkdir -p %{buildroot}%{_sysconfdir}/X11/ |
505 |
ln -s %{_bindir}/Xorg %{buildroot}%{_sysconfdir}/X11/X |
506 |
ln -sf %{_libexecdir}/Xorg.wrap %{buildroot}%{_bindir}/X |
507 |
|
508 |
mkdir -p %{buildroot}%{_sysconfdir}/pam.d |
509 |
install -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/xserver |
510 |
mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps |
511 |
touch %{buildroot}%{_sysconfdir}/security/console.apps/xserver |
512 |
|
513 |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d |
514 |
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d |
515 |
|
516 |
# make sure the (empty) /etc/X11/xorg.conf.d is there, system-setup-keyboard |
517 |
# relies on it more or less. |
518 |
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d |
519 |
|
520 |
mkdir -p %{buildroot}%{_sysconfdir}/X11/app-defaults |
521 |
mkdir -p %{buildroot}%{_sysconfdir}/X11/fontpath.d |
522 |
|
523 |
# move README.compiled outside compiled/ dir, so there won't be any problem with x11-data-xkbdata |
524 |
mv -f %{buildroot}%{_datadir}/X11/xkb/compiled/README.compiled %{buildroot}%{_datadir}/X11/xkb/ |
525 |
|
526 |
# (anssi) manage proprietary drivers |
527 |
install -d -m755 %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL |
528 |
cat > %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL/standard.conf << EOF |
529 |
# This file is knowingly empty since the libraries are in standard search |
530 |
# path. Please do not remove this file. |
531 |
EOF |
532 |
touch %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL.conf |
533 |
|
534 |
mkdir -p %{buildroot}/sbin |
535 |
mkdir -p %{buildroot}/lib/udev/rules.d/ |
536 |
install -m 0755 %{SOURCE5} %{buildroot}/sbin/mageia-setup-keyboard |
537 |
install -m 0644 %{SOURCE6} %{buildroot}/lib/udev/rules.d |
538 |
|
539 |
install -m 755 %{SOURCE30} $RPM_BUILD_ROOT%{_bindir}/xserver-sdk-abi-requires |
540 |
|
541 |
install -m 0755 %{SOURCE20} $RPM_BUILD_ROOT%{_bindir}/xvfb-run |
542 |
|
543 |
# Make the source package |
544 |
%global xserver_source_dir %{_datadir}/x11-server-source |
545 |
%global inst_srcdir %{buildroot}/%{xserver_source_dir} |
546 |
mkdir -p %{inst_srcdir}/{Xext,xkb,GL,hw/{xquartz/bundle,xfree86/common}} |
547 |
mkdir -p %{inst_srcdir}/{hw/dmx/doc,man,doc,hw/dmx/doxygen} |
548 |
cp {,%{inst_srcdir}/}hw/xquartz/bundle/cpprules.in |
549 |
cp {,%{inst_srcdir}/}man/Xserver.man |
550 |
cp {,%{inst_srcdir}/}doc/smartsched |
551 |
cp {,%{inst_srcdir}/}hw/dmx/doxygen/doxygen.conf.in |
552 |
cp {,%{inst_srcdir}/}xserver.ent.in |
553 |
cp {,%{inst_srcdir}/}hw/xfree86/Xorg.sh.in |
554 |
cp xkb/README.compiled %{inst_srcdir}/xkb |
555 |
cp hw/xfree86/xorgconf.cpp %{inst_srcdir}/hw/xfree86 |
556 |
|
557 |
install -m 0755 %{SOURCE21} $RPM_BUILD_ROOT%{_mandir}/man1/xvfb-run.1 |
558 |
install -m 0644 %{SOURCE90} $RPM_BUILD_ROOT/usr/share/X11/xorg.conf.d/ |
559 |
|
560 |
find . -type f | egrep '.*\.(c|h|am|ac|inc|m4|h.in|pc.in|man.pre|pl|txt)$' | |
561 |
xargs tar cf - | (cd %{inst_srcdir} && tar xf -) |
562 |
find %{inst_srcdir}/hw/xfree86 -name \*.c -delete |
563 |
|
564 |
# Remove unwanted files/dirs |
565 |
{ |
566 |
find $RPM_BUILD_ROOT -type f -name '*.la' | xargs rm -f -- || : |
567 |
# wtf |
568 |
%ifnarch %{ix86} x86_64 |
569 |
rm -f $RPM_BUILD_ROOT%{_libdir}/xorg/modules/lib{int10,vbe}.so |
570 |
%endif |
571 |
} |
572 |
|
573 |
%post common |
574 |
%{_sbindir}/update-alternatives \ |
575 |
--install %{_sysconfdir}/ld.so.conf.d/GL.conf gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf %{priority} |
576 |
|
577 |
# (anssi) |
578 |
%triggerun common -- %{name}-common < 1.3.0.0-17 |
579 |
[ $1 -eq 2 ] || exit 0 # do not run if downgrading |
580 |
current_glconf="$(readlink -e %{_sysconfdir}/ld.so.conf.d/GL.conf)" |
581 |
if [ "${current_glconf#*mesa}" == "gl1.conf" ]; then |
582 |
# This an upgrade of a system with no proprietary drivers enabled, update |
583 |
# the link to point to the new standard.conf instead of libmesagl1.conf (2008.0 change). |
584 |
%{_sbindir}/update-alternatives --set gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf |
585 |
else |
586 |
# XFdrake did not set symlink to manual mode before 2008.0, so we ensure it here. |
587 |
%{_sbindir}/update-alternatives --set gl_conf "${current_glconf}" |
588 |
fi |
589 |
true |
590 |
|
591 |
%postun common |
592 |
if [ ! -f %{_sysconfdir}/ld.so.conf.d/GL/standard.conf ]; then |
593 |
/usr/sbin/update-alternatives --remove gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf |
594 |
fi |
595 |
|
596 |
%files |
597 |
|
598 |
%files common |
599 |
%dir %{_libdir}/xorg/modules |
600 |
%dir %{_sysconfdir}/X11 |
601 |
%dir %{_sysconfdir}/X11/app-defaults |
602 |
%dir %{_sysconfdir}/X11/fontpath.d |
603 |
%dir %{_sysconfdir}/ld.so.conf.d/GL |
604 |
%dir %{_sysconfdir}/X11/xorg.conf.d |
605 |
%ghost %{_sysconfdir}/ld.so.conf.d/GL.conf |
606 |
%{_sysconfdir}/ld.so.conf.d/GL/standard.conf |
607 |
%{_bindir}/gtf |
608 |
%{_bindir}/cvt |
609 |
/sbin/mageia-setup-keyboard |
610 |
/lib/udev/rules.d/61-x11-input.rules |
611 |
%{_bindir}/vdltodmx |
612 |
%{_libdir}/xorg/modules/* |
613 |
%{_libdir}/xorg/protocol.txt |
614 |
%{_datadir}/X11/xkb/README.compiled |
615 |
%{_mandir}/man1/gtf.* |
616 |
%{_mandir}/man1/cvt.* |
617 |
%{_mandir}/man1/vdltodmx.* |
618 |
%{_mandir}/man4/* |
619 |
|
620 |
%global Xorgperms %attr(4755, root, root) |
621 |
|
622 |
%files xorg |
623 |
%{_bindir}/X |
624 |
%{_bindir}/Xorg |
625 |
%{_libexecdir}/Xorg |
626 |
%{Xorgperms} %{_libexecdir}/Xorg.wrap |
627 |
%attr(4755,root,root)%{_bindir}/Xwrapper |
628 |
%{_sysconfdir}/X11/X |
629 |
%{_sysconfdir}/pam.d/xserver |
630 |
%{_sysconfdir}/security/console.apps/xserver |
631 |
%{_mandir}/man1/Xorg.1* |
632 |
%{_mandir}/man1/Xorg.wrap.1* |
633 |
%{_mandir}/man1/Xserver.1* |
634 |
%{_mandir}/man5/Xwrapper.config.5* |
635 |
%{_mandir}/man5/xorg.conf.5* |
636 |
%{_mandir}/man5/xorg.conf.d.5* |
637 |
%{_datadir}/X11/xorg.conf.d/00-modules.conf |
638 |
%{_datadir}/X11/xorg.conf.d/10-quirks.conf |
639 |
|
640 |
%files xnest |
641 |
%{_bindir}/Xnest |
642 |
%{_mandir}/man1/Xnest.1* |
643 |
|
644 |
%files xdmx |
645 |
%{_bindir}/Xdmx |
646 |
%{_bindir}/dmx* |
647 |
%{_bindir}/xdmx* |
648 |
%{_mandir}/man1/Xdmx.1* |
649 |
%{_mandir}/man1/dmxtodmx.1* |
650 |
%{_mandir}/man1/xdmxconfig.1* |
651 |
|
652 |
%files xvfb |
653 |
%{_bindir}/Xvfb |
654 |
%{_bindir}/xvfb-run |
655 |
%{_mandir}/man1/Xvfb.1* |
656 |
%{_mandir}/man1/xvfb-run.1* |
657 |
|
658 |
%files xephyr |
659 |
%{_bindir}/Xephyr |
660 |
%{_mandir}/man1/Xephyr.1* |
661 |
|
662 |
%files xwayland |
663 |
%{_bindir}/Xwayland |
664 |
|
665 |
%files devel |
666 |
%{_bindir}/xserver-sdk-abi-requires |
667 |
%{_libdir}/pkgconfig/xorg-server.pc |
668 |
%dir %{_includedir}/xorg |
669 |
%{_includedir}/xorg/*.h |
670 |
%{_datadir}/aclocal/xorg-server.m4 |
671 |
|
672 |
%files source |
673 |
%{xserver_source_dir} |