1 |
#global gitdate 20151027 |
2 |
# temporary build fix: |
3 |
%define _python_bytecompile_build 0 |
4 |
|
5 |
%bcond_with debug |
6 |
%bcond_without xfake |
7 |
%define enable_builddocs 0 |
8 |
|
9 |
# Need this for shared objects that reference X Server, or other modules symbols |
10 |
%define _disable_ld_no_undefined 1 |
11 |
|
12 |
# Alternatives priority for standard libglx.so and mesa libs |
13 |
%define priority 500 |
14 |
|
15 |
%define rel 5 |
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 23 |
25 |
%global videodrv_minor 0 |
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.19.6 |
35 |
Release: %mkrel %rel%{?gitdate:.%{gitdate}} |
36 |
Summary: X11 servers |
37 |
Group: System/X11 |
38 |
URL: http://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.bz2 |
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: http://svn.exactcode.de/t2/trunk/package/xorg/xorg-server/xvfb-run.sh |
52 |
Source21: http://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.19-branch |
70 |
# git format-patch --start-number 100 xorg-server-1.19.0..server-1.19-branch |
71 |
Patch100: 0100-glx-do-not-pick-sRGB-config-for-32-bit-RGBA-visual.patch |
72 |
Patch101: 0101-xfree86-add-default-modes-for-16-9-and-16-10.patch |
73 |
|
74 |
# Fedora Patches |
75 |
|
76 |
# Various fixes pending upstream |
77 |
Patch2: 0005-xfree86-Remove-redundant-ServerIsNotSeat0-check-from.patch |
78 |
Patch3: 0006-xfree86-Make-adding-unclaimed-devices-as-GPU-devices.patch |
79 |
Patch4: 0007-xfree86-Try-harder-to-find-atleast-1-non-GPU-Screen.patch |
80 |
|
81 |
# Patches for better integration with the nvidia driver, pending upstream |
82 |
Patch11: 0001-xfree86-Free-devlist-returned-by-xf86MatchDevice.patch |
83 |
Patch12: 0002-xfree86-Make-OutputClassMatches-take-a-xf86_platform.patch |
84 |
Patch13: 0003-xfree86-Add-options-support-for-OutputClass-Options.patch |
85 |
Patch14: 0004-xfree86-xf86platformProbe-split-finding-pci-info-and.patch |
86 |
Patch15: 0005-xfree86-Allow-overriding-primary-GPU-detection-from-.patch |
87 |
Patch16: 0006-xfree86-Add-ModulePath-support-for-OutputClass-confi.patch |
88 |
|
89 |
# Backport tablet support for Xwayland - *NOT* in server-1.19-branch |
90 |
Patch9901: 0001-xwayland-Depend-on-wayland-protocols-to-build-tablet.patch |
91 |
Patch9902: 0002-xwayland-Bind-to-wp_tablet_manager-if-available-and-.patch |
92 |
Patch9903: 0003-xwayland-Listen-for-wp_tablet_seat-events.patch |
93 |
Patch9904: 0004-xwayland-Handle-wp_tablet-events.patch |
94 |
Patch9905: 0005-xwayland-Handle-tablet_tool-events.patch |
95 |
Patch9906: 0006-xwayland-handle-button-events-after-motion-events.patch |
96 |
Patch9907: 0007-xwayland-Refactor-cursor-management-into-xwl_cursor.patch |
97 |
Patch9908: 0008-xwayland-update-cursor-on-tablet-tools-in-proximity.patch |
98 |
Patch9909: 0009-xwayland-add-tablet-pad-support.patch |
99 |
Patch9910: 0010-xwayland-Unconditionally-initialize-lists-in-init_ta.patch |
100 |
Patch9911: 0011-xwayland-Correct-off-by-one-error-in-tablet-button-n.patch |
101 |
Patch9912: 0012-xwayland-Implement-tablet_tool_wheel-for-scrolling.patch |
102 |
|
103 |
# Upstream commit fe46cbe for Xwayland - Not in server-1.19-branch |
104 |
Patch9950: 0001-xwayland-Give-up-cleanly-on-Wayland-socket-errors.patch |
105 |
# Upstream commit 60f4646a for Xwayland - Not in xorg-server-1.19.6 |
106 |
Patch9951: 0001-xwayland-Keep-separate-variables-for-pointer-and-tab.patch |
107 |
# Upstream commit 16fd1847 for Xwayland - Not in xorg-server-1.19.6 |
108 |
Patch9952: 0001-xwayland-avoid-race-condition-on-new-keymap.patch |
109 |
|
110 |
# Submitted upstream |
111 |
Patch21: 0001-xf86-dri2-Use-va_gl-as-vdpau_driver-for-Intel-i965-G.patch |
112 |
|
113 |
#Patch6044: xserver-1.6.99-hush-prerelease-warning.patch |
114 |
|
115 |
Patch7025: 0001-Always-install-vbe-and-int10-sdk-headers.patch |
116 |
|
117 |
# Submitted upstream, but not going anywhere |
118 |
Patch7027: xserver-autobind-hotplug.patch |
119 |
|
120 |
# because the display-managers are not ready yet, do not upstream |
121 |
Patch10000: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch |
122 |
|
123 |
# Upstream commit a309323328d9d6e0bf |
124 |
Patch10002: 0001-config-fix-NULL-value-detection-for-ID_INPUT-being-u.patch |
125 |
|
126 |
# Mageia patches |
127 |
# git format-patch --start-number 900 mdv-1.6.4-redhat..mdv-1.6.4-patches |
128 |
Patch900: 0900-Use-a-X-wrapper-that-uses-pam-and-consolehelper-to-g.patch |
129 |
Patch901: 0901-Don-t-print-information-about-X-Server-being-a-pre-r.patch |
130 |
Patch902: 0902-Take-width-into-account-when-choosing-default-mode.patch |
131 |
Patch903: 0903-LED-behavior-fixes.patch |
132 |
Patch906: 0906-xfree86-need-to-press-Ctrl-Alt-Bksp-twice-to-termina.patch |
133 |
|
134 |
# Candidates for dropping: |
135 |
# 902: by pixel, so that X11 choose the best resolution with a better algorithm |
136 |
# 903: Input subsystem has changed *a lot* since this patch was written... I |
137 |
# fear it might break things now |
138 |
# 906: All this patch does is force users to hit ctrl+alt+bksp twice (with |
139 |
# an annoying sound) IF the hotkey is enabled. If the user chooses to |
140 |
# enable ctrk+alt+bksp, why force him to hit twice? OTOH, the sound is |
141 |
# annoying, and it should teach users to not use ctrl+alt+bksp =D |
142 |
|
143 |
# Do not crash if Xv is not initialized (patch from xorg-devel ML) |
144 |
# The crash happened when v4l was loaded and xv was not registered, |
145 |
# for example on RV610 with radeon driver |
146 |
Patch4001: 1001-do-not-crash-if-xv-not-initialized.patch |
147 |
|
148 |
# (cg) Point the user at the journal rather than a logfile at /dev/null |
149 |
Patch5001: point-user-at-journal-rather-than-dev-null.patch |
150 |
|
151 |
# from Suse |
152 |
Patch5009: N_Disable-HW-Cursor-for-cirrus-and-mgag200-kernel-modules.patch |
153 |
Source5010: u_os-connections-Check-for-stale-FDs.patch |
154 |
|
155 |
# Security fixes |
156 |
|
157 |
%global moduledir %{_libdir}/xorg/modules |
158 |
%global sdkdir %{_includedir}/xorg |
159 |
|
160 |
%global enable_xorg --enable-xorg |
161 |
|
162 |
%ifnarch %{ix86} x86_64 |
163 |
%global no_int10 --disable-vbe --disable-int10-module |
164 |
%endif |
165 |
|
166 |
%global kdrive --enable-kdrive --enable-xephyr --disable-xfake --enable-xfbdev |
167 |
%global xservers --enable-xvfb --enable-xnest %{kdrive} %{enable_xorg} |
168 |
|
169 |
Requires: %{name}-xorg |
170 |
Requires: %{name}-xdmx |
171 |
Requires: %{name}-xnest |
172 |
Requires: %{name}-xvfb |
173 |
|
174 |
# This should be removed when any of the vnc packages provide x11-server-xvnc: |
175 |
Obsoletes: %{name}-xvnc < %{version}-%{release} |
176 |
|
177 |
%if !%{with xfake} |
178 |
Obsoletes: %{name}-xfake < %{version}-%{release} |
179 |
%endif |
180 |
|
181 |
# temp force new gcc |
182 |
BuildRequires: gcc >= 5.4.0-2 |
183 |
|
184 |
BuildRequires: git |
185 |
BuildRequires: libpam-devel |
186 |
BuildRequires: pkgconfig(egl) |
187 |
BuildRequires: pkgconfig(fontutil) >= 1.1 |
188 |
BuildRequires: pkgconfig(gbm) |
189 |
BuildRequires: pkgconfig(gl) >= 7.1 |
190 |
BuildRequires: pkgconfig(libudev) |
191 |
BuildRequires: pkgconfig(pciaccess) |
192 |
BuildRequires: pkgconfig(pixman-1) >= 0.9.5 |
193 |
BuildRequires: pkgconfig(systemd) |
194 |
BuildRequires: pkgconfig(xau) >= 1.0.0 |
195 |
BuildRequires: pkgconfig(xaw7) >= 1.0.1 |
196 |
BuildRequires: pkgconfig(xdmcp) >= 1.0.0 |
197 |
BuildRequires: pkgconfig(xext) >= 1.1 |
198 |
BuildRequires: pkgconfig(xfixes) |
199 |
BuildRequires: pkgconfig(xfont2) |
200 |
BuildRequires: pkgconfig(xi) >= 1.1.3 |
201 |
BuildRequires: pkgconfig(xkbfile) >= 1.0.4 |
202 |
BuildRequires: pkgconfig(xmu) >= 1.0.0 |
203 |
BuildRequires: pkgconfig(xorg-macros) >= 1.10 |
204 |
BuildRequires: pkgconfig(xpm) >= 3.5.4.2 |
205 |
BuildRequires: pkgconfig(xrender) >= 0.9.4 |
206 |
BuildRequires: pkgconfig(xres) >= 1.0.0 |
207 |
BuildRequires: pkgconfig(xtrans) >= 1.3.5 |
208 |
BuildRequires: pkgconfig(xv) |
209 |
BuildRequires: x11-proto-devel >= 7.7-11 |
210 |
|
211 |
# for ./hw/xwin/glx/gen_gl_wrappers.py: |
212 |
%define _python_bytecompile_errors_terminate_build 0 |
213 |
|
214 |
# Probably only needed if we change .l or .y files, but let's have them anyway: |
215 |
BuildRequires: byacc |
216 |
BuildRequires: flex |
217 |
|
218 |
# for xkbcomp patch |
219 |
BuildRequires: pkgconfig(libcrypto) |
220 |
|
221 |
|
222 |
BuildRequires: pkgconfig(dbus-1) |
223 |
|
224 |
BuildRequires: pkgconfig(dmx) |
225 |
BuildRequires: pkgconfig(xtst) >= 1.1 |
226 |
|
227 |
BuildRequires: pkgconfig(wayland-client) >= 1.3.0 |
228 |
BuildRequires: pkgconfig(wayland-protocols) |
229 |
BuildRequires: pkgconfig(epoxy) |
230 |
BuildRequires: pkgconfig(xshmfence) >= 1.1 |
231 |
|
232 |
BuildRequires: pkgconfig(libunwind) |
233 |
|
234 |
BuildRequires: pkgconfig(xcb-aux) pkgconfig(xcb-image) pkgconfig(xcb-icccm) |
235 |
BuildRequires: pkgconfig(xcb-keysyms) pkgconfig(xcb-renderutil) |
236 |
|
237 |
%if %{enable_builddocs} |
238 |
BuildRequires: doxygen |
239 |
BuildRequires: fop |
240 |
BuildRequires: xmlto |
241 |
BuildRequires: pkgconfig(xorg-sgml-doctools) |
242 |
%endif |
243 |
|
244 |
%description |
245 |
X.Org X11 X server |
246 |
|
247 |
|
248 |
%package common |
249 |
Summary: Xorg server common files |
250 |
Group: System/X11 |
251 |
License: MIT |
252 |
Provides: XFree86 = 7.0.0 |
253 |
Requires: rgb |
254 |
# for 'fixed' and 'cursor' fonts |
255 |
Requires: x11-font-misc-misc |
256 |
Requires: x11-font-cursor-misc |
257 |
Requires: x11-font-alias |
258 |
Requires: x11-data-xkbdata |
259 |
Requires: xkbcomp |
260 |
Requires: udev |
261 |
# else modesetting fails on minimal install: |
262 |
Requires: %{mklibname mesaegl 1} |
263 |
Requires(post): update-alternatives |
264 |
Requires(postun): update-alternatives |
265 |
# nvidia-71xx does not support X.org server >= 1.5 |
266 |
Conflicts: x11-driver-video-nvidia71xx < 71.86.09-2 |
267 |
# old fglrx does not support X.org server >= 1.7 |
268 |
Conflicts: x11-driver-video-fglrx < 8.720 |
269 |
# Fix: missing conflicts to allow upgrade from 2008.0 to cooker |
270 |
# http://qa.mandriva.com/show_bug.cgi?id=36651 |
271 |
Conflicts: x11-driver-video-nvidia-current <= 100.14.19 |
272 |
|
273 |
|
274 |
Provides: xserver-abi(ansic-%{ansic_major}) = %{ansic_minor} |
275 |
Provides: xserver-abi(videodrv-%{videodrv_major}) = %{videodrv_minor} |
276 |
Provides: xserver-abi(xinput-%{xinput_major}) = %{xinput_minor} |
277 |
Provides: xserver-abi(extension-%{extension_major}) = %{extension_minor} |
278 |
# For proprietary drivers that can support multiple videodrv versions: |
279 |
Provides: xserver-abi(videodrv) = %{videodrv_major}.%{videodrv_minor} |
280 |
|
281 |
%description common |
282 |
X server common files |
283 |
|
284 |
%package xorg |
285 |
Summary: Xorg X server |
286 |
Group: System/X11 |
287 |
License: MIT |
288 |
Requires: x11-server-common = %{version}-%{release} |
289 |
Requires: x11-data-xkbdata > 1.3-5 |
290 |
Requires: x11-font-alias |
291 |
Requires: libx11-common |
292 |
Recommends: x11-driver-input-libinput |
293 |
|
294 |
# minimum libxfont needed for xserver-1.9: |
295 |
Requires: libxfont >= 1.4.2 |
296 |
|
297 |
%rename glamor |
298 |
%rename x11-driver-video-modesetting |
299 |
|
300 |
%description xorg |
301 |
X.org X11 is an open source implementation of the X Window System. It |
302 |
provides the basic low level functionality which full fledged |
303 |
graphical user interfaces (GUIs) such as GNOME and KDE are designed |
304 |
upon. |
305 |
|
306 |
|
307 |
%package xnest |
308 |
Summary: A nested server |
309 |
Group: System/X11 |
310 |
License: MIT |
311 |
Requires: x11-server-common = %{version}-%{release} |
312 |
|
313 |
%description xnest |
314 |
Xnest is an X server which has been implemented as an ordinary |
315 |
X application. It runs in a window just like other X applications, |
316 |
but it is an X server itself in which you can run other software. It |
317 |
is a very useful tool for developers who wish to test their |
318 |
applications without running them on their real X server. |
319 |
|
320 |
|
321 |
%package xdmx |
322 |
Summary: Distributed Multihead X Server and utilities |
323 |
Group: System/X11 |
324 |
License: MIT |
325 |
Requires: x11-server-common = %{version}-%{release} |
326 |
|
327 |
%description xdmx |
328 |
Xdmx is a proxy X server that provides multi-head support for multiple displays |
329 |
attached to different machines (each of which is running a typical X server). |
330 |
When Xinerama is used with Xdmx, the multiple displays on multiple machines |
331 |
are presented to the user as a single unified screen. A simple application |
332 |
for Xdmx would be to provide multi-head support using two desktop machines, |
333 |
each of which has a single display device attached to it. A complex |
334 |
application for Xdmx would be to unify a 4 by 4 grid of 1280x1024 displays |
335 |
(each attached to one of 16 computers) into a unified 5120x4096 display. |
336 |
|
337 |
|
338 |
%package xvfb |
339 |
Summary: A X Windows System virtual framebuffer X server |
340 |
Group: System/X11 |
341 |
# xvfb-run is GPLv2, rest is MIT |
342 |
License: MIT and GPLv2 |
343 |
Requires: x11-server-common = %{version}-%{release} |
344 |
Requires: xauth |
345 |
|
346 |
|
347 |
%description xvfb |
348 |
Xvfb (X Virtual Frame Buffer) is an X server that is able to run on |
349 |
machines with no display hardware and no physical input devices. |
350 |
Xvfb simulates a dumb framebuffer using virtual memory. Xvfb does |
351 |
not open any devices, but behaves otherwise as an X display. Xvfb |
352 |
is normally used for testing servers. |
353 |
|
354 |
|
355 |
%package xephyr |
356 |
Summary: A nested server |
357 |
Group: System/X11 |
358 |
License: MIT |
359 |
Requires: x11-server-common = %{version}-%{release} |
360 |
|
361 |
%description xephyr |
362 |
Xephyr is an X server which has been implemented as an ordinary |
363 |
X application. It runs in a window just like other X applications, |
364 |
but it is an X server itself in which you can run other software. It |
365 |
is a very useful tool for developers who wish to test their |
366 |
applications without running them on their real X server. Unlike |
367 |
Xnest, Xephyr renders to an X image rather than relaying the |
368 |
X protocol, and therefore supports the newer X extensions like |
369 |
Render and Composite. |
370 |
|
371 |
|
372 |
%if %with xfake |
373 |
%package xfake |
374 |
Summary: KDrive fake X server |
375 |
Group: System/X11 |
376 |
License: MIT |
377 |
Requires: x11-server-common = %{version}-%{release} |
378 |
|
379 |
%description xfake |
380 |
KDrive (formerly known as TinyX) is a light-weight X server targetting specific |
381 |
chipsets. It is recommended to be used on thin-clients and embedded systems. |
382 |
If you are on a standard desktop system you might want to use x11-server-xorg |
383 |
and the video driver corresponding to your video card. |
384 |
|
385 |
This KDrive server is targetted for testing purposes. |
386 |
%endif |
387 |
|
388 |
%package xfbdev |
389 |
Summary: KDrive fbdev X server |
390 |
Group: System/X11 |
391 |
License: MIT |
392 |
Requires: x11-server-common = %{version}-%{release} |
393 |
|
394 |
%description xfbdev |
395 |
KDrive (formerly known as TinyX) is a light-weight X server targetting specific |
396 |
chipsets. It is recommended to be used on thin-clients and embedded systems. |
397 |
If you are on a standard desktop system you might want to use x11-server-xorg |
398 |
and the video driver corresponding to your video card. |
399 |
|
400 |
This KDrive server is targetted for being used on top of linux framebuffer. |
401 |
|
402 |
%package xwayland |
403 |
Summary: Wayland X Server |
404 |
Group: System/X11 |
405 |
License: MIT |
406 |
Requires: x11-server-common = %{version}-%{release} |
407 |
|
408 |
%description xwayland |
409 |
Xwayland is an X server for running X clients under Wayland. |
410 |
|
411 |
%package devel |
412 |
Summary: SDK for X server driver module development |
413 |
Group: Development/X11 |
414 |
License: MIT |
415 |
|
416 |
%define oldxorgnamedevel %mklibname xorg-x11 |
417 |
Requires: libpixman-1-devel |
418 |
Requires: libpciaccess-devel |
419 |
Requires: libxkbfile-devel |
420 |
Requires: libxext-devel >= 1.1 |
421 |
Requires: pkgconfig(xfont2) |
422 |
# pkgconfig file needs dri.pc: |
423 |
Requires: GL-devel |
424 |
|
425 |
%description devel |
426 |
The SDK package provides the development files which are necessary for |
427 |
developing X server driver modules, and for compiling driver modules |
428 |
outside of the standard X11 source code tree. Developers writing video |
429 |
drivers, input drivers, or other X modules should install this package. |
430 |
|
431 |
|
432 |
%package source |
433 |
Summary: Xserver source code required to build VNC server (Xvnc) |
434 |
Group: Development/X11 |
435 |
License: MIT |
436 |
BuildArch: noarch |
437 |
|
438 |
%description source |
439 |
Xserver source code needed to build VNC server (Xvnc) |
440 |
|
441 |
|
442 |
%prep |
443 |
%autosetup -N -n %{pkgname}-%{?gitdate:%{gitdate}}%{!?gitdate:%{version}} |
444 |
rm -rf .git |
445 |
cp %{SOURCE1} .gitignore |
446 |
# ick |
447 |
%global __scm git |
448 |
%{expand:%__scm_setup_git -q} |
449 |
%autopatch |
450 |
|
451 |
# check the ABI in the source against what we expect. |
452 |
getmajor() { |
453 |
grep -i ^#define.ABI.$1_VERSION hw/xfree86/common/xf86Module.h | |
454 |
tr '(),' ' ' | awk '{ print $4 }' |
455 |
} |
456 |
|
457 |
getminor() { |
458 |
grep -i ^#define.ABI.$1_VERSION hw/xfree86/common/xf86Module.h | |
459 |
tr '(),' ' ' | awk '{ print $5 }' |
460 |
} |
461 |
|
462 |
test `getmajor ansic` == %{ansic_major} |
463 |
test `getminor ansic` == %{ansic_minor} |
464 |
test `getmajor videodrv` == %{videodrv_major} |
465 |
test `getminor videodrv` == %{videodrv_minor} |
466 |
test `getmajor xinput` == %{xinput_major} |
467 |
test `getminor xinput` == %{xinput_minor} |
468 |
test `getmajor extension` == %{extension_major} |
469 |
test `getminor extension` == %{extension_minor} |
470 |
|
471 |
|
472 |
%build |
473 |
|
474 |
%global default_font_path "catalogue:/etc/X11/fontpath.d,built-ins" |
475 |
|
476 |
%global dri_flags --enable-dri2 --enable-dri3 --enable-suid-wrapper --enable-glamor |
477 |
|
478 |
%global bodhi_flags --with-vendor-name="%_vendor" |
479 |
|
480 |
%global wayland --enable-xwayland |
481 |
|
482 |
%if %with debug |
483 |
CFLAGS='-DBUILDDEBUG -O0 -g3' \ |
484 |
%endif |
485 |
autoreconf -f -v --install || exit 1 |
486 |
%configure2_5x %{xservers} \ |
487 |
--with-log-dir=%{_logdir} \ |
488 |
--enable-dependency-tracking \ |
489 |
%{?no_int10} --with-int10=x86emu \ |
490 |
--with-default-font-path=%{default_font_path} \ |
491 |
--with-module-dir=%{moduledir} \ |
492 |
--with-vendor-web="https://bugs.mageia.org" \ |
493 |
%if %{with debug} |
494 |
--enable-debug \ |
495 |
%else |
496 |
--disable-debug \ |
497 |
%endif |
498 |
--with-builderstring="Build ID: %{name} %{version}-%{release}" \ |
499 |
--with-os-name="$(hostname -s) $(uname -r)" \ |
500 |
--without-dtrace \ |
501 |
--disable-xselinux --enable-record --enable-present \ |
502 |
--enable-config-udev \ |
503 |
--disable-strict-compilation \ |
504 |
--enable-dpms \ |
505 |
--disable-tslib \ |
506 |
%if %{with xfake} |
507 |
--enable-xfake \ |
508 |
%else |
509 |
--disable-xfake \ |
510 |
%endif |
511 |
--disable-install-setuid \ |
512 |
--enable-secure-rpc \ |
513 |
--enable-pam \ |
514 |
--enable-dmx \ |
515 |
%{?wayland} \ |
516 |
%{dri_flags} %{?bodhi_flags} \ |
517 |
--with-sha1=libcrypto \ |
518 |
|
519 |
pushd include && make xorg-server.h dix-config.h xorg-config.h && popd |
520 |
%make |
521 |
|
522 |
%install |
523 |
%make_install moduledir=%{moduledir} |
524 |
|
525 |
mkdir -p $RPM_BUILD_ROOT%{_libdir}/xorg/modules/{drivers,input} |
526 |
|
527 |
mkdir -p %{buildroot}%{_sysconfdir}/X11/ |
528 |
ln -s %{_bindir}/Xorg %{buildroot}%{_sysconfdir}/X11/X |
529 |
ln -sf %{_libexecdir}/Xorg.wrap %{buildroot}%{_bindir}/X |
530 |
|
531 |
mkdir -p %{buildroot}%{_sysconfdir}/pam.d |
532 |
install -m 644 %{SOURCE10} $RPM_BUILD_ROOT%{_sysconfdir}/pam.d/xserver |
533 |
mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps |
534 |
touch %{buildroot}%{_sysconfdir}/security/console.apps/xserver |
535 |
|
536 |
mkdir -p $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d |
537 |
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/X11/xorg.conf.d |
538 |
|
539 |
# make sure the (empty) /etc/X11/xorg.conf.d is there, system-setup-keyboard |
540 |
# relies on it more or less. |
541 |
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/X11/xorg.conf.d |
542 |
|
543 |
mkdir -p %{buildroot}%{_sysconfdir}/X11/app-defaults |
544 |
mkdir -p %{buildroot}%{_sysconfdir}/X11/fontpath.d |
545 |
|
546 |
# move README.compiled outside compiled/ dir, so there won't be any problem with x11-data-xkbdata |
547 |
mv -f %{buildroot}%{_datadir}/X11/xkb/compiled/README.compiled %{buildroot}%{_datadir}/X11/xkb/ |
548 |
|
549 |
# (anssi) manage proprietary drivers |
550 |
install -d -m755 %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL |
551 |
cat > %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL/standard.conf << EOF |
552 |
# This file is knowingly empty since the libraries are in standard search |
553 |
# path. Please do not remove this file. |
554 |
EOF |
555 |
touch %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL.conf |
556 |
|
557 |
mkdir -p %{buildroot}/sbin |
558 |
mkdir -p %{buildroot}/lib/udev/rules.d/ |
559 |
install -m 0755 %{SOURCE5} %{buildroot}/sbin/mageia-setup-keyboard |
560 |
install -m 0644 %{SOURCE6} %{buildroot}/lib/udev/rules.d |
561 |
|
562 |
install -m 755 %{SOURCE30} $RPM_BUILD_ROOT%{_bindir}/xserver-sdk-abi-requires |
563 |
|
564 |
# Make the source package |
565 |
%global xserver_source_dir %{_datadir}/x11-server-source |
566 |
%global inst_srcdir %{buildroot}/%{xserver_source_dir} |
567 |
mkdir -p %{inst_srcdir}/{Xext,xkb,GL,hw/{xquartz/bundle,xfree86/common}} |
568 |
mkdir -p %{inst_srcdir}/{hw/dmx/doc,man,doc,hw/dmx/doxygen} |
569 |
cp {,%{inst_srcdir}/}hw/xquartz/bundle/cpprules.in |
570 |
cp {,%{inst_srcdir}/}man/Xserver.man |
571 |
cp {,%{inst_srcdir}/}doc/smartsched |
572 |
cp {,%{inst_srcdir}/}hw/dmx/doxygen/doxygen.conf.in |
573 |
cp {,%{inst_srcdir}/}xserver.ent.in |
574 |
cp {,%{inst_srcdir}/}hw/xfree86/Xorg.sh.in |
575 |
cp xkb/README.compiled %{inst_srcdir}/xkb |
576 |
cp hw/xfree86/xorgconf.cpp %{inst_srcdir}/hw/xfree86 |
577 |
|
578 |
find . -type f | egrep '.*\.(c|h|am|ac|inc|m4|h.in|pc.in|man.pre|pl|txt)$' | |
579 |
xargs tar cf - | (cd %{inst_srcdir} && tar xf -) |
580 |
# SLEDGEHAMMER |
581 |
find %{inst_srcdir}/hw/xfree86 -name \*.c -delete |
582 |
|
583 |
# Remove unwanted files/dirs |
584 |
{ |
585 |
rm -f $RPM_BUILD_ROOT%{_libdir}/X11/Options |
586 |
rm -f $RPM_BUILD_ROOT%{_bindir}/in? |
587 |
rm -f $RPM_BUILD_ROOT%{_bindir}/ioport |
588 |
rm -f $RPM_BUILD_ROOT%{_bindir}/out? |
589 |
rm -f $RPM_BUILD_ROOT%{_bindir}/pcitweak |
590 |
rm -f $RPM_BUILD_ROOT%{_mandir}/man1/pcitweak.1* |
591 |
find $RPM_BUILD_ROOT -type f -name '*.la' | xargs rm -f -- || : |
592 |
# wtf |
593 |
%ifnarch %{ix86} x86_64 |
594 |
rm -f $RPM_BUILD_ROOT%{_libdir}/xorg/modules/lib{int10,vbe}.so |
595 |
%endif |
596 |
} |
597 |
|
598 |
install -m 0755 %{SOURCE20} $RPM_BUILD_ROOT%{_bindir}/xvfb-run |
599 |
install -m 0755 %{SOURCE21} $RPM_BUILD_ROOT%{_mandir}/man1/xvfb-run.1 |
600 |
install -m 0644 %{SOURCE90} $RPM_BUILD_ROOT/usr/share/X11/xorg.conf.d/ |
601 |
|
602 |
%post common |
603 |
%{_sbindir}/update-alternatives \ |
604 |
--install %{_sysconfdir}/ld.so.conf.d/GL.conf gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf %{priority} |
605 |
|
606 |
# (anssi) |
607 |
%triggerun common -- %{name}-common < 1.3.0.0-17 |
608 |
[ $1 -eq 2 ] || exit 0 # do not run if downgrading |
609 |
current_glconf="$(readlink -e %{_sysconfdir}/ld.so.conf.d/GL.conf)" |
610 |
if [ "${current_glconf#*mesa}" == "gl1.conf" ]; then |
611 |
# This an upgrade of a system with no proprietary drivers enabled, update |
612 |
# the link to point to the new standard.conf instead of libmesagl1.conf (2008.0 change). |
613 |
%{_sbindir}/update-alternatives --set gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf |
614 |
else |
615 |
# XFdrake did not set symlink to manual mode before 2008.0, so we ensure it here. |
616 |
%{_sbindir}/update-alternatives --set gl_conf "${current_glconf}" |
617 |
fi |
618 |
true |
619 |
|
620 |
%postun common |
621 |
if [ ! -f %{_sysconfdir}/ld.so.conf.d/GL/standard.conf ]; then |
622 |
/usr/sbin/update-alternatives --remove gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf |
623 |
fi |
624 |
|
625 |
%files |
626 |
|
627 |
%files common |
628 |
%dir %{_libdir}/xorg/modules |
629 |
%dir %{_sysconfdir}/X11 |
630 |
%dir %{_sysconfdir}/X11/app-defaults |
631 |
%dir %{_sysconfdir}/X11/fontpath.d |
632 |
%dir %{_sysconfdir}/ld.so.conf.d/GL |
633 |
%dir %{_sysconfdir}/X11/xorg.conf.d |
634 |
%ghost %{_sysconfdir}/ld.so.conf.d/GL.conf |
635 |
%{_sysconfdir}/ld.so.conf.d/GL/standard.conf |
636 |
%{_bindir}/gtf |
637 |
%{_bindir}/cvt |
638 |
/sbin/mageia-setup-keyboard |
639 |
/lib/udev/rules.d/61-x11-input.rules |
640 |
%{_bindir}/vdltodmx |
641 |
%{_libdir}/xorg/modules/* |
642 |
%{_libdir}/xorg/protocol.txt |
643 |
%{_datadir}/X11/xkb/README.compiled |
644 |
%{_mandir}/man1/gtf.* |
645 |
%{_mandir}/man1/cvt.* |
646 |
%{_mandir}/man1/vdltodmx.* |
647 |
%{_mandir}/man4/* |
648 |
|
649 |
%global Xorgperms %attr(4755, root, root) |
650 |
|
651 |
%files xorg |
652 |
%{_bindir}/X |
653 |
%{_bindir}/Xorg |
654 |
%{_libexecdir}/Xorg |
655 |
%{Xorgperms} %{_libexecdir}/Xorg.wrap |
656 |
%attr(4755,root,root)%{_bindir}/Xwrapper |
657 |
%{_sysconfdir}/X11/X |
658 |
%{_sysconfdir}/pam.d/xserver |
659 |
%{_sysconfdir}/security/console.apps/xserver |
660 |
%{_mandir}/man1/Xorg.1* |
661 |
%{_mandir}/man1/Xorg.wrap.1* |
662 |
%{_mandir}/man1/Xserver.1* |
663 |
%{_mandir}/man5/Xwrapper.config.5* |
664 |
%{_mandir}/man5/xorg.conf.5* |
665 |
%{_mandir}/man5/xorg.conf.d.5* |
666 |
%{_datadir}/X11/xorg.conf.d/00-modules.conf |
667 |
%{_datadir}/X11/xorg.conf.d/10-quirks.conf |
668 |
|
669 |
%files xnest |
670 |
%{_bindir}/Xnest |
671 |
%{_mandir}/man1/Xnest.1* |
672 |
|
673 |
%files xdmx |
674 |
%{_bindir}/Xdmx |
675 |
%{_bindir}/dmx* |
676 |
%{_bindir}/xdmx* |
677 |
%{_mandir}/man1/Xdmx.1* |
678 |
%{_mandir}/man1/dmxtodmx.1* |
679 |
%{_mandir}/man1/xdmxconfig.1* |
680 |
|
681 |
%files xvfb |
682 |
%{_bindir}/Xvfb |
683 |
%{_bindir}/xvfb-run |
684 |
%{_mandir}/man1/Xvfb.1* |
685 |
%{_mandir}/man1/xvfb-run.1* |
686 |
|
687 |
%files xephyr |
688 |
%{_bindir}/Xephyr |
689 |
%{_mandir}/man1/Xephyr.1* |
690 |
|
691 |
%if %with xfake |
692 |
%files xfake |
693 |
%{_bindir}/Xfake |
694 |
%endif |
695 |
|
696 |
%files xfbdev |
697 |
%{_bindir}/Xfbdev |
698 |
|
699 |
%files xwayland |
700 |
%{_bindir}/Xwayland |
701 |
|
702 |
%files devel |
703 |
%{_bindir}/xserver-sdk-abi-requires |
704 |
%{_libdir}/pkgconfig/xorg-server.pc |
705 |
%dir %{_includedir}/xorg |
706 |
%{sdkdir}/*.h |
707 |
%{_datadir}/aclocal/xorg-server.m4 |
708 |
|
709 |
%files source |
710 |
%{xserver_source_dir} |