Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-updates-src > by-pkgid > 054cef8d7f016ac9fb831856b7968669 > files > 16

x11-server-1.16.4-2.1.mga5.src.rpm

%define git 0

%define with_debug		0
%define enable_dmx		1
%define enable_xfake		1
%define enable_dbus		1
%define enable_builddocs	0
# Do magic with .rpmsave named links
%define pre_post_trans		1

# Need this for shared objects that reference X Server, or other modules symbols
%define _disable_ld_no_undefined 1

# Alternatives priority for standard libglx.so and mesa libs
%define priority 500

# Search for modules in extra_module_dir before the default path.
# This will allow fglrx to install its modified modules in more cleaner way.
%define extra_module_dir        %{_libdir}/xorg/extra-modules
%define xorg1_6_extra_modules	%{_libdir}/xorg/xorg-1.6-extra-modules

%define subrel 1
%define rel 2

%global __provides_exclude_from %{_datadir}/%{name}-source
%global __requires_exclude_from %{_datadir}/%{name}-source

# ABI versions.  Have to keep these manually in sync with the source
# because rpm is a terrible language.  HTFU.
%define ansic_major 0
%define ansic_minor 4
%define videodrv_major 18
%define videodrv_minor 0
%define xinput_major 21
%define xinput_minor 0
%define extension_major 8
%define extension_minor 0

Name: x11-server
Version: 1.16.4
%if %{git}
Release: %mkrel 0.%{git}.%{rel}
%else
Release: %mkrel %{rel}
%endif
Summary:  X11 servers
Group: System/X11
URL: http://xorg.freedesktop.org
%if %{git}
Source0:	xorg-server-%{git}.tar.bz2
%else
Source0: http://xorg.freedesktop.org/releases/individual/xserver/xorg-server-%{version}.tar.bz2
%endif
Source1: xserver.pamd
Source2: xvfb-run.sh
Source5: mageia-setup-keyboard-udev
Source6: 61-x11-input.rules
# from RH/FC:
# for requires generation in drivers
Source30:  xserver-sdk-abi-requires
License: GPLv2+ and MIT

Requires: %{name}-xorg
%if %{enable_dmx}
Requires: %{name}-xdmx
%else
Obsoletes: %{name}-xdmx < %{version}-%{release}
%endif
Requires: %{name}-xnest
Requires: %{name}-xvfb

# This should be removed when any of the vnc packages provide x11-server-xvnc:
Obsoletes: %{name}-xvnc < %{version}-%{release}

%if !%{enable_xfake}
Obsoletes: %{name}-xfake < %{version}-%{release}
%endif

# FIXME: build with systemtap installed is broken
BuildConflicts: systemtap
BuildRequires: gcc
BuildRequires: libpam-devel
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(epoxy)
BuildRequires: pkgconfig(fontutil) >= 1.1
BuildRequires: pkgconfig(gbm)
BuildRequires: pkgconfig(gl) >= 7.1
BuildRequires: pkgconfig(libudev)
BuildRequires: pkgconfig(pciaccess)
BuildRequires: pkgconfig(pixman-1) >= 0.9.5
BuildRequires: pkgconfig(systemd)
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(xau) >= 1.0.0
BuildRequires: pkgconfig(xaw7) >= 1.0.1
BuildRequires: pkgconfig(xcb-atom)
BuildRequires: pkgconfig(xcb-icccm)
BuildRequires: pkgconfig(xcb-image)
BuildRequires: pkgconfig(xcb-keysyms)
BuildRequires: pkgconfig(xdmcp) >= 1.0.0
BuildRequires: pkgconfig(xext) >= 1.1
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xfont) >= 1.2.8-2
BuildRequires: pkgconfig(xi) >= 1.1.3
BuildRequires: pkgconfig(xkbfile) >= 1.0.4
BuildRequires: pkgconfig(xmu) >= 1.0.0
BuildRequires: pkgconfig(xorg-macros) >= 1.10
BuildRequires: pkgconfig(xpm) >= 3.5.4.2
BuildRequires: pkgconfig(xrender) >= 0.9.4
BuildRequires: pkgconfig(xres) >= 1.0.0
BuildRequires: pkgconfig(xshmfence)
BuildRequires: pkgconfig(xtrans) >= 1.0.3
BuildRequires: pkgconfig(xv)
BuildRequires: x11-proto-devel >= 7.7-11

# for ./hw/xwin/glx/gen_gl_wrappers.py:
%define _python_bytecompile_errors_terminate_build 0

# Probably only needed if we change .l or .y files, but let's have them anyway:
BuildRequires: byacc
BuildRequires: flex

# for xkbcomp patch
BuildRequires: pkgconfig(libcrypto)


%if %{enable_dbus}
BuildRequires: pkgconfig(dbus-1)
%endif

%if %{enable_dmx}
BuildRequires: pkgconfig(dmx)
BuildRequires: pkgconfig(xtst) >= 1.1
%endif

%if %{enable_builddocs}
BuildRequires: doxygen
BuildRequires: fop
BuildRequires: xmlto
BuildRequires: pkgconfig(xorg-sgml-doctools)
%endif

# Instructions to setup your repository clone
# git://anongit.freedesktop.org/git/xorg/xserver
# git checkout origin/server-1.7-branch
# git checkout -b mdv-1.7-cherry-picks
# git am ../03??-*.patch
# git checkout -b mdv-1.7-redhat
# git am ../04??-*.patch
# git checkout -b mdv-1.7-patches
# git am ../09??-*.patch

# Sync with server-1.16-branch
# git format-patch --start-number 100 xorg-server-1.16.3..server-1.16-branch

# Fedora Patches

# Mageia patches
# git format-patch --start-number 900 mdv-1.6.4-redhat..mdv-1.6.4-patches
Patch900: 0900-Use-a-X-wrapper-that-uses-pam-and-consolehelper-to-g.patch
Patch901: 0901-Don-t-print-information-about-X-Server-being-a-pre-r.patch
Patch902: 0902-Take-width-into-account-when-choosing-default-mode.patch
Patch903: 0903-LED-behavior-fixes.patch
Patch904: 0904-Add-noAutoDevices-command-line-option.patch
Patch905: 0905-Xorg-add-an-extra-module-path.patch
Patch906: 0906-xfree86-need-to-press-Ctrl-Alt-Bksp-twice-to-termina.patch
Patch907: 0907-Add-nr-argument-for-backwards-compatibility.patch
Patch908: 0908-XKB-cache-xkbcomp-output-for-fast-start-up-v.1-for-1.patch

# (tv) fix issues with new cairo (fdo#47266):
Patch3000: exa-glyphs-fallback.diff

# CVE-2013-6424
Patch3002: exa-only-draw-valid-trapezoids.patch

# CVE-2015-3164
Patch3003: xorg-server-1.16.4-CVE-2015-3164-1.patch
Patch3004: xorg-server-1.16.4-CVE-2015-3164-2.patch
Patch3005: xorg-server-1.16.4-CVE-2015-3164-3.patch

# Candidates for dropping:
# 902: by pixel, so that X11 choose the best resolution with a better algorithm
# 903: Input subsystem has changed *a lot* since this patch was written... I
#      fear it might break things now
# 904: Who uses this option? GDM? KDM?
# 906: All this patch does is force users to hit ctrl+alt+bksp twice (with
#      an annoying sound) IF the hotkey is enabled. If the user chooses to
#      enable ctrk+alt+bksp, why force him to hit twice? OTOH, the sound is
#      annoying, and it should teach users to not use ctrl+alt+bksp =D
# 907: we should make whoever-uses-this-option go for "-background none", which
#      is the upstream-supported option. Then we kill the patch.
# 908: This gives us at most 0.6s in boot, but upstream will never accept it.
#      When we change to libxkbcommon we'll have to drop this anyway.

# Do not crash if Xv is not initialized (patch from xorg-devel ML)
# The crash happened when v4l was loaded and xv was not registered,
# for example on RV610 with radeon driver
Patch1001: 1001-do-not-crash-if-xv-not-initialized.patch

# (cg) Point the user at the journal rather than a logfile at /dev/null
Patch5001: point-user-at-journal-rather-than-dev-null.patch

%description
X11 servers

#------------------------------------------------------------------------------

%package devel
Summary: Development files for %{name}
Group: Development/X11
License: MIT

%define oldxorgnamedevel  %mklibname xorg-x11
Requires: libpixman-1-devel
Requires: libpciaccess-devel
Requires: libxkbfile-devel
Requires: libxext-devel >= 1.1
# pkgconfig file needs dri.pc:
Requires: GL-devel

%description devel
Development files for %{name}

%files devel
%dir %{_includedir}/xorg
%{_bindir}/xserver-sdk-abi-requires
%{_includedir}/xorg/*.h
%{_libdir}/pkgconfig/xorg-server.pc
%{_datadir}/aclocal/xorg-server.m4


#------------------------------------------------------------------------------

%package common
Summary: X server common files
Group: System/X11
License: MIT
Provides: XFree86 = 7.0.0
Requires: rgb
# for 'fixed' and 'cursor' fonts
Requires: x11-font-misc-misc
Requires: x11-font-cursor-misc
Requires: x11-font-alias
Requires: x11-data-xkbdata
Requires: xkbcomp
Requires: udev
Requires(post): update-alternatives >= 1.9.0
Requires(postun): update-alternatives
# nvidia-71xx does not support X.org server >= 1.5
Conflicts: x11-driver-video-nvidia71xx < 71.86.09-2
# old fglrx does not support X.org server >= 1.7
Conflicts: x11-driver-video-fglrx < 8.720
# Fix: missing conflicts to allow upgrade from 2008.0 to cooker
# http://qa.mandriva.com/show_bug.cgi?id=36651
Conflicts: x11-driver-video-nvidia-current <= 100.14.19


Provides: xserver-abi(ansic-%{ansic_major}) = %{ansic_minor}
Provides: xserver-abi(videodrv-%{videodrv_major}) = %{videodrv_minor}
Provides: xserver-abi(xinput-%{xinput_major}) = %{xinput_minor}
Provides: xserver-abi(extension-%{extension_major}) = %{extension_minor}
# For proprietary drivers that can support multiple videodrv versions:
Provides: xserver-abi(videodrv) = %{videodrv_major}.%{videodrv_minor}

%description common
X server common files

%post common
%{_sbindir}/update-alternatives \
	--install %{_sysconfdir}/ld.so.conf.d/GL.conf gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf %{priority} \
	--slave %{extra_module_dir} xorg_extra_modules %{xorg1_6_extra_modules}

# (anssi)
%triggerun common -- %{name}-common < 1.3.0.0-17
[ $1 -eq 2 ] || exit 0 # do not run if downgrading
current_glconf="$(readlink -e %{_sysconfdir}/ld.so.conf.d/GL.conf)"
if [ "${current_glconf#*mesa}" == "gl1.conf" ]; then
	# This an upgrade of a system with no proprietary drivers enabled, update
	# the link to point to the new standard.conf instead of libmesagl1.conf (2008.0 change).
	%{_sbindir}/update-alternatives --set gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf
else
	# XFdrake did not set symlink to manual mode before 2008.0, so we ensure it here.
	%{_sbindir}/update-alternatives --set gl_conf "${current_glconf}"
fi
true

%postun common
if [ ! -f %{_sysconfdir}/ld.so.conf.d/GL/standard.conf ]; then
	/usr/sbin/update-alternatives --remove gl_conf %{_sysconfdir}/ld.so.conf.d/GL/standard.conf
fi

%files common
%dir %{_libdir}/xorg/modules
%dir %{xorg1_6_extra_modules}
%dir %{_sysconfdir}/X11
%dir %{_sysconfdir}/X11/app-defaults
%dir %{_sysconfdir}/X11/fontpath.d
%dir %{_sysconfdir}/ld.so.conf.d/GL
%dir %{_sysconfdir}/X11/xorg.conf.d
%ghost %{_sysconfdir}/ld.so.conf.d/GL.conf
%{_sysconfdir}/ld.so.conf.d/GL/standard.conf
%{_bindir}/gtf
%{_bindir}/cvt
/sbin/mageia-setup-keyboard
/lib/udev/rules.d/61-x11-input.rules
%if %enable_dmx
%{_bindir}/vdltodmx
%endif
%{_libdir}/xorg/modules/*
%{_libdir}/xorg/protocol.txt
%{_datadir}/X11/xkb/README.compiled
%{_mandir}/man1/gtf.*
%{_mandir}/man1/cvt.*
%if %enable_dmx
%{_mandir}/man1/vdltodmx.*
%endif
%{_mandir}/man4/fbdevhw.*
%{_mandir}/man4/exa.*
%dir %{_prefix}/X11R6
%dir %{_prefix}/X11R6/lib
%{_prefix}/X11R6/lib/X11


#------------------------------------------------------------------------------

%package xorg
Summary: X.org X11 server
Group: System/X11
License: MIT
Requires: x11-server-common = %{version}-%{release}
Requires: x11-data-xkbdata > 1.3-5
Requires: x11-font-alias
Requires: libx11-common
Requires: x11-driver-input-evdev

# minimum libxfont needed for xserver-1.9:
Requires: libxfont >= 1.4.2

# This package was used in the transition to modular:
Obsoletes: xorg-x11-server
%rename glamor

%description xorg
x11-server-xorg is the new generation of X server from X.Org.

%files xorg
%{_bindir}/X
%{_bindir}/Xorg
%attr(4755,root,root)%{_bindir}/Xwrapper
%{_sysconfdir}/X11/X
%{_sysconfdir}/pam.d/xserver
%{_sysconfdir}/security/console.apps/xserver
%{_mandir}/man1/Xorg.*
%{_mandir}/man1/Xserver.*
%{_mandir}/man5/xorg.conf.*
%{_datadir}/X11/xorg.conf.d/10-evdev.conf
%{_datadir}/X11/xorg.conf.d/10-quirks.conf

#------------------------------------------------------------------------------

%if %{enable_dmx}
%package xdmx
Summary: Distributed Multi-head X server
Group: System/X11
License: MIT
Requires: x11-server-common = %{version}-%{release}

# This package was used in the transition to modular:
Obsoletes: xorg-x11-Xdmx

%description xdmx
Xdmx is a proxy X server that uses one or more other X servers
as its display devices. It provides multi-head X functionality
for displays that might be located on different machines.
Xdmx functions as a front-end X server that acts as a proxy
to a set of back-end X servers. All of the visible rendering is
passed to the back-end X servers. Clients connect to the Xdmx
front-end, and everything appears as it would in a regular
multi-head configuration. If Xinerama is enabled (e.g.,
with +xinerama on the command line), the clients see a single large screen.

Xdmx communicates to the back-end X servers using the standard X11 protocol,
and standard and/or commonly available X server extensions.

%files xdmx
%{_bindir}/Xdmx
%{_bindir}/xdmx*
%{_bindir}/dmx*
%{_mandir}/man1/Xdmx.*
%{_mandir}/man1/xdmxconfig.*
%{_mandir}/man1/dmxtodmx.*
%endif

#------------------------------------------------------------------------------

%package xwayland
Summary: A X server for Wayland
Group: System/X11
License: MIT
Requires: x11-server-common = %{version}-%{release}

%description xwayland
Wayland is a complete window system in itself, but even so, if we're migrating
away from X, it makes sense to have a good backwards compatibility story. With
a few changes, the Xorg server can be modified to use wayland input devices for
input and forward either the root window or individual top-level windows as
wayland surfaces. The server still runs the same 2D driver with the same
acceleration code as it does when it runs natively. The main difference is that
wayland handles presentation of the windows instead of KMS. 

%files xwayland
%{_bindir}/Xwayland

#------------------------------------------------------------------------------

%package xnest
Summary: A nested X server
Group: System/X11
License: MIT
Requires: x11-server-common = %{version}-%{release}

# This package was used in the transition to modular:
Obsoletes: xorg-x11-Xnest

%description xnest
Xnest is an X Window System server which runs in an X window.
Xnest is a 'nested' window server, actually a client of the
real X server, which manages windows and graphics requests
for Xnest, while Xnest manages the windows and graphics
requests for its own clients.

You will need to install Xnest if you require an X server which
will run as a client of your real X server (perhaps for
testing purposes).

%files xnest
%{_bindir}/Xnest
%{_mandir}/man1/Xnest.*

#------------------------------------------------------------------------------

%package xvfb
Summary: X virtual framebuffer server
Group: System/X11
# xvfb-run is GPLv2, rest is MIT
License: MIT and GPLv2
Requires: x11-server-common = %{version}-%{release}
Requires: xauth

# This package was used in the transition to modular:
Obsoletes: xorg-x11-Xvfb

%description xvfb
Xvfb (X Virtual Frame Buffer) is an X Windows System server
that is capable of running on machines with no display hardware and no
physical input devices.  Xvfb emulates a dumb framebuffer using virtual
memory.  Xvfb doesn't open any devices, but behaves otherwise as an X
display.  Xvfb is normally used for testing servers.  Using Xvfb, the mfb
or cfb code for any depth can be exercised without using real hardware
that supports the desired depths.  Xvfb has also been used to test X
clients against unusual depths and screen configurations, to do batch
processing with Xvfb as a background rendering engine, to do load testing,
to help with porting an X server to a new platform, and to provide an
unobtrusive way of running applications which really don't need an X
server but insist on having one.

If you need to test your X server or your X clients, you may want to
install Xvfb for that purpose.

%files xvfb
%{_bindir}/Xvfb
%{_bindir}/xvfb-run
%{_mandir}/man1/Xvfb.*

#------------------------------------------------------------------------------

%package xephyr
Summary: KDrive Xephyr X server
Group: System/X11
License: MIT
Requires: x11-server-common = %{version}-%{release}

%description xephyr
KDrive (formerly known as TinyX) is a light-weight X server targetting specific
chipsets. It is recommended to be used on thin-clients and embedded systems.
If you are on a standard desktop system you might want to use x11-server-xorg
and the video driver corresponding to your video card.

Xephyr is a X Server which targets a window on a host X Server
as its framebuffer. Unlike Xnest it supports modern X extensions ( even
if host server doesn't ) such as Composite, Damage, randr etc. It uses SHM
Images and shadow framebuffer updates to provide good performance. It also
has a visual debugging mode for observing screen updates.

Possible uses include:
- Xnest replacement - Window manager, Composite 'gadget', etc development tool.
- Toolkit debugging - rendundant toolkit paints can be observered easily via
  the debugging mode.
- X Server internals development - develop without the need for an extra
  machine

%files xephyr
%{_bindir}/Xephyr
%{_mandir}/man1/Xephyr.1*

#------------------------------------------------------------------------------

%if %{enable_xfake}
%package xfake
Summary: KDrive fake X server
Group: System/X11
License: MIT
Requires: x11-server-common = %{version}-%{release}

%description xfake
KDrive (formerly known as TinyX) is a light-weight X server targetting specific
chipsets. It is recommended to be used on thin-clients and embedded systems.
If you are on a standard desktop system you might want to use x11-server-xorg
and the video driver corresponding to your video card.

This KDrive server is targetted for testing purposes.

%files xfake
%{_bindir}/Xfake
%endif

#------------------------------------------------------------------------------

%package xfbdev
Summary: KDrive fbdev X server
Group: System/X11
License: MIT
Requires: x11-server-common = %{version}-%{release}

%description xfbdev
KDrive (formerly known as TinyX) is a light-weight X server targetting specific
chipsets. It is recommended to be used on thin-clients and embedded systems.
If you are on a standard desktop system you might want to use x11-server-xorg
and the video driver corresponding to your video card.

This KDrive server is targetted for being used on top of linux framebuffer.

%files xfbdev
%{_bindir}/Xfbdev

#------------------------------------------------------------------------------

%define xserver_source_dir %{_datadir}/%{name}-source

%package source
Summary: Xserver source code required to build unofficial servers
Group: Development/X11
License: MIT
BuildArch: noarch

%description source
Xserver source code needed to build unofficial servers, like Xvnc

%files source
%{xserver_source_dir}

#------------------------------------------------------------------------------

%prep
%if %{git}
%setup -q -n xorg-server-%{git}
%else
%setup -q -n xorg-server-%{version}
%endif

# dont use apply_patches as the backups end up in x11-server-source
%patch900 -p1
%patch901 -p1
%patch902 -p1
%patch903 -p1
%patch904 -p1
%patch905 -p1
%patch906 -p1
%patch907 -p1
#patch908 -p1
%patch3000 -p1
%patch3002 -p1
%patch3003 -p1
%patch3004 -p1
%patch3005 -p1
%patch1001 -p1
%patch5001 -p1


# check the ABI in the source against what we expect.
getmajor() {
   grep -i ^#define.ABI.$1_VERSION hw/xfree86/common/xf86Module.h |
   tr '(),' '   ' | awk '{ print $4 }'
}

getminor() {
   grep -i ^#define.ABI.$1_VERSION hw/xfree86/common/xf86Module.h |
   tr '(),' '   ' | awk '{ print $5 }'
}

test `getmajor ansic` == %{ansic_major}
test `getminor ansic` == %{ansic_minor}
test `getmajor videodrv` == %{videodrv_major}
test `getminor videodrv` == %{videodrv_minor}
test `getmajor xinput` == %{xinput_major}
test `getminor xinput` == %{xinput_minor}
test `getmajor extension` == %{extension_major}
test `getminor extension` == %{extension_minor}


%build
autoreconf -if

# Copy the clean dir to a 'source' directory that will be used to make the
# x11-server-source subpackage
mkdir source
find . -maxdepth 1 ! -name source ! -name '\.' -exec cp -r '{}' source \;


%if %{with_debug}
CFLAGS='-DBUILDDEBUG -O0 -g3' \
%endif
%configure2_5x	--with-log-dir=%{_logdir} \
		--with-os-vendor="%_vendor" \
		--with-os-name="`echo \`uname -s -r\` | sed -e s'/ /_/g'`" \
		--with-vendor-web="http://bugs.mageia.org" \
		--with-extra-module-dir=%{extra_module_dir} \
		%if %{with_debug}
		--enable-debug \
		%else
		--disable-debug \
		%endif
		--enable-config-udev \
		--disable-strict-compilation \
		--disable-install-libxf86config \
		--enable-composite \
		--enable-xres \
		--enable-record \
		--enable-xv \
		--enable-glamor \
		--enable-xvmc \
		--enable-dga \
		--enable-screensaver \
		--enable-xdmcp \
		--enable-xdm-auth-1 \
		--enable-glx \
		--enable-aiglx \
		--enable-glx-tls \
		--enable-dri \
		--enable-xinerama \
		--enable-xf86vidmode \
		--enable-xace \
		--enable-xcsecurity \
		--enable-xf86bigfont \
		--enable-dpms \
		--disable-tslib \
		--enable-dbe \
		--enable-xfree86-utils \
		--enable-xorg \
		%if %{enable_dmx}
		--enable-dmx \
		%else
		--disable-dmx \
		%endif
		--enable-xvfb \
		--enable-xnest \
		--disable-xwin \
		--enable-kdrive \
		%if %{enable_xfake}
		--enable-xfake \
		%else
		--disable-xfake \
		%endif
		--enable-xephyr \
		--disable-install-setuid \
		--enable-secure-rpc \
		--enable-xwrapper \
		--enable-pam \
		--disable-config-hal \
		--with-sha1=libcrypto \
		--with-default-font-path="catalogue:%{_sysconfdir}/X11/fontpath.d"
pushd include && make xorg-server.h dix-config.h xorg-config.h && popd
%make

%install
%makeinstall_std

mkdir -p %{buildroot}%{_sysconfdir}/X11/
ln -s %{_bindir}/Xorg %{buildroot}%{_sysconfdir}/X11/X
ln -sf %{_bindir}/Xwrapper %{buildroot}%{_bindir}/X

mkdir -p %{buildroot}%{_sysconfdir}/pam.d
install -m 0644 %{_sourcedir}/xserver.pamd %{buildroot}%{_sysconfdir}/pam.d/xserver
mkdir -p %{buildroot}%{_sysconfdir}/security/console.apps
touch %{buildroot}%{_sysconfdir}/security/console.apps/xserver

mkdir -p %{buildroot}%{_sysconfdir}/X11/app-defaults
mkdir -p %{buildroot}%{_sysconfdir}/X11/fontpath.d

# move README.compiled outside compiled/ dir, so there won't be any problem with x11-data-xkbdata
mv -f %{buildroot}%{_datadir}/X11/xkb/compiled/README.compiled %{buildroot}%{_datadir}/X11/xkb/

# for compatibility with legacy applications (see #23423, for example)
mkdir -p %{buildroot}%{_prefix}/X11R6/lib/
ln -s ../../%{_lib}/X11 %{buildroot}%{_prefix}/X11R6/lib/X11

# create more module directories to be owned by x11-server-common
install -d -m755 %{buildroot}%{_libdir}/xorg/modules/{input,drivers}
install -d -m755 %{buildroot}%{xorg1_6_extra_modules}

# (anssi) manage proprietary drivers
install -d -m755 %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL
cat > %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL/standard.conf << EOF
# This file is knowingly empty since the libraries are in standard search
# path. Please do not remove this file.
EOF
touch %{buildroot}%{_sysconfdir}/ld.so.conf.d/GL.conf

install -m 0755 %{_sourcedir}/xvfb-run.sh %{buildroot}%{_bindir}/xvfb-run

mkdir -p %{buildroot}/sbin
mkdir -p %{buildroot}/lib/udev/rules.d/
install -m 0755 %{SOURCE5} %{buildroot}/sbin/mageia-setup-keyboard
install -m 0644 %{SOURCE6} %{buildroot}/lib/udev/rules.d

# Make the source package
cp -r source %{buildroot}/%{xserver_source_dir}

install -m 755 %{SOURCE30} %{buildroot}%{_bindir}

# Create xorg.conf.d
install -d -m 755 %{buildroot}%{_sysconfdir}/X11/xorg.conf.d

%files


%changelog
* Sat Aug 15 2015 sander85 <sander85> 1.16.4-2.1.mga5
+ Revision: 864905
- Fix CVE-2015-3164

* Sat Feb 21 2015 tv <tv> 1.16.4-2.mga5
+ Revision: 816219
- enable glamor (mga#14509)

* Thu Feb 12 2015 tmb <tmb> 1.16.4-1.mga5
+ Revision: 814764
- update to 1.16.4
  * drop merged patches

* Thu Feb 12 2015 tv <tv> 1.16.3-4.mga5
+ Revision: 814747
- use mktemp and use it properly (rhbz#632879 & 499234 which is CVE-2009-1573)

* Wed Feb 11 2015 luigiwalser <luigiwalser> 1.16.3-3.mga5
+ Revision: 814702
- add upstream patches to fix CVE-2015-0255

* Sun Feb 08 2015 tmb <tmb> 1.16.3-2.mga5
+ Revision: 814171
- dix: Allow zero-height PutImage requests
- os: Fix timer race conditions
- randr: attempt to fix primary on slave output (v2)
- config/udev: Respect seat assignments when assigned devices
- dix: make RegionInit legal C++
- dri2: SourceOffloads may be for DRI3 only

* Sat Dec 20 2014 tv <tv> 1.16.3-1.mga5
+ Revision: 804519
- new release

* Sat Dec 13 2014 tv <tv> 1.16.2.901-1.mga5
+ Revision: 802892
- new release

* Wed Nov 19 2014 tv <tv> 1.16.2-1.mga5
+ Revision: 797889
- new release

  + colin <colin>
    - Add a note about checking journal output rather than /dev/null

* Wed Oct 15 2014 umeabot <umeabot> 1.16.1-2.mga5
+ Revision: 748070
- Second Mageia 5 Mass Rebuild

* Tue Sep 23 2014 tmb <tmb> 1.16.1-1.mga5
+ Revision: 721826
- update to 1.16.1

* Tue Sep 16 2014 umeabot <umeabot> 1.16.0-8.mga5
+ Revision: 690523
- Mageia 5 Mass Rebuild

  + tv <tv>
    - auto convert _exclude_files_from_autoreq

* Fri Sep 12 2014 colin <colin> 1.16.0-7.mga5
+ Revision: 674804
- Actually apply patch 1002: fix cogl/clutter crashes

* Fri Sep 12 2014 tv <tv> 1.16.0-6.mga5
+ Revision: 674782
- patch 1002: fix cogl/clutter crashes

* Tue Sep 09 2014 tmb <tmb> 1.16.0-5.mga5
+ Revision: 674223
- rebuild with new glibc

* Thu Sep 04 2014 joequant <joequant> 1.16.0-4.mga5
+ Revision: 671741
- rebuild for new systemd

* Thu Aug 21 2014 blino <blino> 1.16.0-3.mga5
+ Revision: 666123
- rebuild for x11-proto-devel with presentproto fix

* Tue Jul 29 2014 tv <tv> 1.16.0-2.mga5
+ Revision: 657843
- rebuild with fixed gcc (might fix mga#13774)

* Thu Jul 17 2014 tv <tv> 1.16.0-1.mga5
+ Revision: 653468
- new release

* Tue Jul 08 2014 tv <tv> 1.15.99.904-1.mga5
+ Revision: 650610
- new release
- drop merged patch

* Thu Jun 26 2014 tv <tv> 1.15.99.903-4.mga5
+ Revision: 639902
- fix xvfb segfaulting (mga#13598)

* Sat Jun 14 2014 tv <tv> 1.15.99.903-3.mga5
+ Revision: 636090
- BR egl/gbm/systemd
- enable dbus support
- enable systemd support
- drop option for building w/o udev support
- kill unsupported options: (--disable|--enable)-(builddocs|config-dbus)
- convert BR to pkgconfig(*) style

* Mon Jun 09 2014 tv <tv> 1.15.99.903-2.mga5
+ Revision: 634943
- submit to core/release

* Thu Jun 05 2014 tmb <tmb> 1.15.99.903-1.1.mga5
+ Revision: 633591
- videodrv abi is now 18

  + tv <tv>
    - new RC

* Mon Apr 14 2014 tv <tv> 1.15.99.902-1.mga5
+ Revision: 614291
- package xwayland
- fix compiling
- BR pkgconfig(epoxy)
- BR pkgconfig(wayland-client)
- bump xinput_major
- bump videodrv_major
- 1.16 RC
- temporary disable patch 908
- rediff patch 3000

* Mon Apr 14 2014 fwang <fwang> 1.15.1-1.mga5
+ Revision: 613966
- 1.15.1

* Mon Apr 14 2014 tv <tv> 1.15.0.901-1.mga5
+ Revision: 613947
- 1.15 RC1

* Mon Feb 17 2014 tmb <tmb> 1.15.0-7.mga5
+ Revision: 593945
- rebuild with new glibc

* Sat Feb 08 2014 tmb <tmb> 1.15.0-6.mga5
+ Revision: 586765
- test build with new glibc

* Fri Feb 07 2014 fwang <fwang> 1.15.0-5.mga5
+ Revision: 584988
- really use correct macro

* Fri Feb 07 2014 fwang <fwang> 1.15.0-4.mga5
+ Revision: 584984
- filter python abi req

* Wed Feb 05 2014 tv <tv> 1.15.0-3.mga5
+ Revision: 582808
- BR pkgconfig(xshmfence) for DRI3

* Tue Feb 04 2014 tv <tv> 1.15.0-2.mga5
+ Revision: 582133
- adjust file list
- disable _python_bytecompile_errors_terminate_build
- BR python3 for ./hw/xwin/glx/gen_gl_wrappers.py
- add 3 more xcb BR
- BR xcb-util-devel
- new release
- drop merged patch

* Thu Dec 26 2013 luigiwalser <luigiwalser> 1.14.5-2.mga4
+ Revision: 560868
- add patch from debian to fix CVE-2013-6424

* Sun Dec 15 2013 tmb <tmb> 1.14.5-1.mga4
+ Revision: 556845
- 1.14.5 (maintenance release)

* Fri Dec 06 2013 tmb <tmb> 1.14.4-3.mga4
+ Revision: 555552
- push to /release

* Wed Dec 04 2013 tmb <tmb> 1.14.4-2.mga4
+ Revision: 555146
- glx: Add support for the new DRI loader entrypoint

* Fri Nov 08 2013 tmb <tmb> 1.14.4-1.mga4
+ Revision: 550030
- dont use %%apply_patches as the backup files end up in x11-server-source
- drop merged CVE patch

  + tv <tv>
    - new release

* Mon Oct 21 2013 umeabot <umeabot> 1.14.3-4.mga4
+ Revision: 541067
- Mageia 4 Mass Rebuild

* Fri Oct 11 2013 fwang <fwang> 1.14.3-3.mga4
+ Revision: 495038
- add upstream patch to fix CVE-2013-4396

* Mon Sep 16 2013 tv <tv> 1.14.3-2.mga4
+ Revision: 480226
- fix Xephyr segfault with 8 or 16-bit color depth

* Fri Sep 13 2013 fwang <fwang> 1.14.3-1.mga4
+ Revision: 478314
- new version 1.14.3

* Wed Sep 04 2013 luigiwalser <luigiwalser> 1.14.2.902-2.mga4
+ Revision: 474911
- rpm no longer allows listing a symlink to a directory as a dir in files

  + tv <tv>
    - 1.14.3 RC2

* Sun Aug 11 2013 tmb <tmb> 1.14.2-6.mga4
+ Revision: 465403
- rebuild with new gcc

* Thu Aug 08 2013 tmb <tmb> 1.14.2-5.mga4
+ Revision: 464643
- gcc-4.8.2 build

* Thu Aug 08 2013 tmb <tmb> 1.14.2-4.mga4
+ Revision: 464642
- glx: fix uninitialized var in __glXDRIscreenProbe (fdo#59825)

* Thu Aug 01 2013 tmb <tmb> 1.14.2-3.mga4
+ Revision: 462258
- force gcc 4.8.2 build

* Thu Aug 01 2013 tmb <tmb> 1.14.2-2.mga4
+ Revision: 462179
- test gcc-4.8.2 build

* Wed Jun 26 2013 fwang <fwang> 1.14.2-1.mga4
+ Revision: 446715
- new version 1.14.2

* Fri Jun 14 2013 tv <tv> 1.14.1.902-1.mga4
+ Revision: 443012
- 1.14.2 RC2

* Fri May 31 2013 tv <tv> 1.14.1.901-1.mga4
+ Revision: 433651
- 1.14.2 RC1

* Thu May 30 2013 tv <tv> 1.14.1-2.mga4
+ Revision: 433084
- submit to core/release

* Thu May 23 2013 tv <tv> 1.14.1-1.mga4
+ Revision: 424873
- new release

* Mon Apr 22 2013 tmb <tmb> 1.13.4-2.mga3
+ Revision: 410863
- drop P100 as it did not fix sis support and broke vboxvideo (#9716)

* Wed Apr 17 2013 tmb <tmb> 1.13.4-1.mga3
+ Revision: 410251
- 1.13.4 (CVE-2013-1940)

* Wed Apr 10 2013 tmb <tmb> 1.13.3-2.mga3
+ Revision: 409375
- dri1: fix dri1 startup since 459c6da0f907ba33d733c7e62a116184ba2f14e5
  (Move DRI1 from external module to built-in) (P100, upstream)

* Sat Mar 09 2013 fwang <fwang> 1.13.3-1.mga3
+ Revision: 401996
- new version 1.13.3 final

* Sat Mar 02 2013 tmb <tmb> 1.13.2.902-1.mga3
+ Revision: 401062
- randr: cleanup provider properly (fdo #58174)
- update to 1.13.3-to 1.13.3-rc2

* Sat Feb 23 2013 tmb <tmb> 1.13.2.901-1.mga3
+ Revision: 400092
- 1.13.3-rc1 (maintenance release)

* Fri Feb 08 2013 luigiwalser <luigiwalser> 1.13.2-2.mga3
+ Revision: 397217
- remove obsolete pre script

* Fri Jan 25 2013 fwang <fwang> 1.13.2-1.mga3
+ Revision: 392267
- new version 1.13.2

* Mon Jan 14 2013 umeabot <umeabot> 1.13.1.901-2.mga3
+ Revision: 386393
- Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild

* Sat Jan 05 2013 tv <tv> 1.13.1.901-1.mga3
+ Revision: 338950
- 1.13.2 RC1

* Tue Jan 01 2013 tmb <tmb> 1.13.1-2.mga3
+ Revision: 337395
- rebuild for new glibc

* Fri Dec 14 2012 tv <tv> 1.13.1-1.mga3
+ Revision: 330842
- new release

* Fri Dec 07 2012 tv <tv> 1.13.0.902-1.mga3
+ Revision: 327966
- 1.13.1-rc2

* Fri Nov 30 2012 tv <tv> 1.13.0.901-1.mga3
+ Revision: 323333
- bump videodrv minor
- drop merged patches
- 1.13.1-rc1

* Mon Nov 05 2012 tv <tv> 1.13.0-7.mga3
+ Revision: 314428
- fix Cairo corruption (mga#7635, fdo#55723)

* Sun Oct 07 2012 tv <tv> 1.13.0-6.mga3
+ Revision: 303203
- update glyphs cache patch

* Sat Sep 15 2012 tv <tv> 1.13.0-5.mga3
+ Revision: 294095
- use new pixman API for caching glyphs (3.45x firefox speedup)

* Fri Sep 14 2012 blino <blino> 1.13.0-4.mga3
+ Revision: 293723
- dri2: invalidate drawable after sharing pixmap (for PRIME, from Dave Airlie, Fedora)

* Fri Sep 07 2012 tv <tv> 1.13.0-3.mga3
+ Revision: 289348
- bump release

* Fri Sep 07 2012 tv <tv> 1.13.0-2.mga3
+ Revision: 289338
- requires GL-devel for pkgconfig file (fix drivers building)

* Thu Sep 06 2012 tv <tv> 1.13.0-1.mga3
+ Revision: 288744
- new release
- rediff patches 904 & 906

* Mon Aug 27 2012 fwang <fwang> 1.12.4-1.mga3
+ Revision: 284617
- new version 1.12.4

* Sun Aug 26 2012 tv <tv> 1.12.3.902-1.mga3
+ Revision: 284361
- bump videodrv_minor
- 1.12.4 RC2

* Wed Jul 18 2012 tmb <tmb> 1.12.3-2.mga3
+ Revision: 272329
- drop requires on tirpc-devel as glibc provides full rpc support again

  + fwang <fwang>
    - drop xcalibrate switch

* Mon Jul 09 2012 fwang <fwang> 1.12.3-1.mga3
+ Revision: 269005
- new version 1.12.3

* Fri Jun 29 2012 colin <colin> 1.12.2-6.mga3
+ Revision: 264947
- Rebuild against new libudev major

* Fri Jun 29 2012 colin <colin> 1.12.2-5.mga3
+ Revision: 264834
- Do not install udev rules into /etc.
- Remove all HAL support options.
- Use more robust udev script/rules (note this will die soonish)

* Fri Jun 29 2012 colin <colin> 1.12.2-4.mga3
+ Revision: 264817
- Fix mageia-setup-keyboard to work with new udev.

* Tue Jun 19 2012 tv <tv> 1.12.2-3.mga3
+ Revision: 261988
- rebuild for new libudev

* Wed Jun 06 2012 tmb <tmb> 1.12.2-2.mga3
+ Revision: 256304
- rebuild for core/release

* Thu May 31 2012 tv <tv> 1.12.2-1.mga3
+ Revision: 252482
- kill old upgrade bits (/usr/X11R6 -> /usr)
- clean obsolete obsoletes tags
- rediff more patches
- new release
- rediff patches

* Wed May 30 2012 tv <tv> 1.12.0-1.mga3
+ Revision: 249761
- new release
- drop merged patches
- rediff patches
- explain patch 902

* Tue May 29 2012 tv <tv> 1.11.4-4.mga3
+ Revision: 249162
- bump release

* Tue May 29 2012 tv <tv> 1.11.4-3.mga3
+ Revision: 249124
- fix issues with new cairo

* Fri Mar 02 2012 anssi <anssi> 1.11.4-2.mga2
+ Revision: 216884
- add additional 'xserver-abi(videodrv)' versioned provide as the existing
  'xserver-abi(videodrv-MAJOR)' versioned provide can't be used with
  proprietary drivers that support multiple ABIs

  + fwang <fwang>
    - now it like dual arch package

* Sat Jan 28 2012 fwang <fwang> 1.11.4-1.mga2
+ Revision: 202648
- new version 1.11.4

* Sun Jan 22 2012 tv <tv> 1.11.3.902-1.mga2
+ Revision: 199625
- new RC

* Tue Jan 10 2012 colin <colin> 1.11.3.901-1.mga2
+ Revision: 194368
- Update to 1.11.3.901 (fixes compilation problems)
- Add two patches for GTK+/XI2 issue (fdo#44079, bgo#657578)

  + tv <tv>
    - bump release

  + fwang <fwang>
    - disable strict compilatio
    - new version 1.11.3
      drop merged upstream patch

* Tue Dec 06 2011 tmb <tmb> 1.11.2-3.mga2
+ Revision: 177429
- submit to core/release

* Tue Nov 29 2011 colin <colin> 1.11.2-2.mga2
+ Revision: 174094
- Add upstream patch to fix XI2 keygrabs (fixes gnome multimedia key handling)

* Sun Nov 06 2011 tv <tv> 1.11.2-1.mga2
+ Revision: 164205
- new release

* Sun Oct 23 2011 tmb <tmb> 1.11.1-1.mga2
+ Revision: 157533
- add BR: tirpc-devel for rpc support as glibc-2.14 does not provide it anymore
- push to release

* Sat Oct 08 2011 colin <colin> 1.11.1-0.1.mga2
+ Revision: 153021
- New version: 1.11.1

  + fwang <fwang>
    - new version 1.10.4

  + tv <tv>
    - 1.10.4RC2
    - 1.10.4 RC1

* Sat Jul 09 2011 fwang <fwang> 1.10.3-1.mga2
+ Revision: 120835
- new version 1.10.3

* Thu Jun 16 2011 tv <tv> 1.10.2-1.mga2
+ Revision: 108470
- new release

* Sun Apr 17 2011 tv <tv> 1.10.1-1.mga1
+ Revision: 87463
- new release

* Tue Apr 12 2011 tv <tv> 1.10.0.902-1.mga1
+ Revision: 83573
- New version: 1.10.1 RC2

* Fri Apr 01 2011 tv <tv> 1.10.0.901-1.mga1
+ Revision: 79648
- New version: 1.10.1 RC1

  + misc <misc>
    - fix the vendor name ( #595 )

* Thu Mar 03 2011 tv <tv> 1.10.0-1.mga1
+ Revision: 63783
- sync with Mandriva
- New version: 1.10.0
- Dropped patches:
  - 401: partially applied, see patch 907
  - 402: the place where we copied the patch from is not using it anymore
  - 1000: applied upstream
- New patches:
  - 907: implement what's left from old patch 401
- Rediff other patches, fix patch numbering
- Rediff 1001-do-not-crash-if-xv-not-initialized.patch
- Add some comments about patches we might want to remove

* Wed Feb 16 2011 blino <blino> 1.9.4-2.mga1
+ Revision: 52765
- do not crash if Xv is not initialized (patch from xorg-devel ML)

* Tue Feb 15 2011 tmb <tmb> 1.9.4-1.mga1
+ Revision: 51956
- P1000: Fix garbaged screen with latest ati driver 6.14 on open
  openoffice.org startup (color tiling issue, fdo bug #33929)(tv)
- update to 1.9.4 final

* Mon Feb 14 2011 dmorgan <dmorgan> 1.9.3.902-2.mga1
+ Revision: 51709
- Fix kb layout

* Wed Feb 02 2011 dmorgan <dmorgan> 1.9.3.902-1.mga1
+ Revision: 46236
- Fix x11-util-macros version
- New version 1.9.3.902

* Wed Jan 12 2011 dmorgan <dmorgan> 1.9.3-4.mga1
+ Revision: 7552
- Enable back udev support

* Tue Jan 11 2011 dmorgan <dmorgan> 1.9.3-3.mga1
+ Revision: 6194
- Do not enable udev for now
- Do not build the doc
- Change binary name
- Add mageia bugzilla
- imported package x11-server