xorg-x11-server/xorg-x11-server.spec

517 lines
18 KiB
RPMSpec

#
# spec file for package xorg-x11-server
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: xorg-x11-server
%define dirsuffix 1.14.2
%define vnc 0
Summary: X
License: GPL-2.0+ and MIT
Group: System/X11/Servers/XF86_4
Source0: http://xorg.freedesktop.org/archive/individual/xserver/xorg-server-%{dirsuffix}.tar.bz2
Source1: sysconfig.displaymanager.template
Source3: README.updates
Source4: xorgcfg.tar.bz2
Source5: modprobe.nvidia
Source8: xorg-backtrace
# RPM Macros to be installed. The ABI Versions will be injected by configure.
Source96: xorg-x11-server.macros.in
# Source98 and Source99 are used to ensure proper ABI provides.
Source98: xorg-server-provides
Source99: pre_checkin.sh
# PATCH-FEATURE-OPENSUSE n_xorg-x11-server-rpmmacros.patch dimstar@opensuse.org -- Provide RPM macros to require correct ABI Versions.
Patch0: n_xorg-x11-server-rpmmacros.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch2: N_p_default-module-path.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch16: N_p_xnest-ignore-getimage-errors.diff
BuildRequires: Mesa-devel
BuildRequires: bison
BuildRequires: flex
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: pkgconfig(bigreqsproto) >= 1.1.0
BuildRequires: pkgconfig(damageproto) >= 1.1
BuildRequires: pkgconfig(dmx) >= 1.0.99.1
BuildRequires: pkgconfig(fixesproto) >= 4.1
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(fontenc)
BuildRequires: pkgconfig(fontsproto)
BuildRequires: pkgconfig(fontutil)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(inputproto) >= 1.9.99.902
BuildRequires: pkgconfig(kbproto) >= 1.0.3
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(pciaccess) >= 0.8.0
BuildRequires: pkgconfig(pixman-1) >= 0.24
BuildRequires: pkgconfig(randrproto) >= 1.2.99.3
BuildRequires: pkgconfig(renderproto) >= 0.11
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xau)
BuildRequires: pkgconfig(xau)
BuildRequires: pkgconfig(xaw7)
BuildRequires: pkgconfig(xcmiscproto) >= 1.2.0
BuildRequires: pkgconfig(xdmcp)
BuildRequires: pkgconfig(xext) >= 1.0.99.4
BuildRequires: pkgconfig(xextproto) >= 7.1.99
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xfont) >= 1.4.2
BuildRequires: pkgconfig(xi) >= 1.2.99.1
BuildRequires: pkgconfig(xkbfile)
BuildRequires: pkgconfig(xmu)
BuildRequires: pkgconfig(xp)
BuildRequires: pkgconfig(xpm)
BuildRequires: pkgconfig(xprintutil)
BuildRequires: pkgconfig(xproto) >= 7.0.17
BuildRequires: pkgconfig(xrender)
BuildRequires: pkgconfig(xres)
BuildRequires: pkgconfig(xt)
BuildRequires: pkgconfig(xtrans) >= 1.2.2
BuildRequires: pkgconfig(xtst) >= 1.0.99.2
BuildRequires: pkgconfig(xv)
### udev support (broken on openSUSE 11.2, see also bnc #589997)
%if 0%{?suse_version} >= 1130
BuildRequires: pkgconfig(libudev) >= 143
%endif
%if %vnc
BuildRequires: libjpeg-devel
BuildRequires: pkgconfig(vncproto)
%endif
Version: 7.6_%{dirsuffix}
Release: 0
Url: http://xorg.freedesktop.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%ifnarch s390 s390x
Requires(pre): %fillup_prereq
%endif
Requires: pkgconfig
Requires: xkbcomp
Requires: xorg-x11-fonts-core
%ifnarch s390 s390x
Requires: libpixman-1-0 >= 0.24
%(cat %{SOURCE98})
%endif
Requires: Mesa
Provides: xorg-x11-Xvfb
Provides: xorg-x11-server-glx
Obsoletes: xorg-x11-Xvfb
Obsoletes: xorg-x11-server-glx
# Xvfb requires keyboard files as well (bnc#797124)
Requires: xkeyboard-config
%if %vnc
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch17: n_VNC-Add-support-for-VNC.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch18: n_VNC-Readd-timeout-when-vnc-viewer-connection-breaks.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch19: n_VNC-Fix-crash-when-no-depth-translation-is-required.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch20: n_VNC-Don-t-let-VNC-access-the-framebuffer-directly-an.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch21: n_VNC-Enable-use-of-all-keyboard-layouts-independent-o.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch22: n_VNC-Fix-crash-due-to-unset-input-device-names.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch23: n_Xvnc-pthread.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch24: n_VNC-Add-proto.diff
%endif
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch45: N_bug-197858_dpms.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch77: N_fbdevhw.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch79: N_edid_data_sanity_check.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch101: N_zap_warning_xserver.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch103: N_confine_to_shape.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch106: N_randr1_1-sig11.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch112: N_fix-dpi-values.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch125: N_0001-Xinput-Catch-missing-configlayout-when-deleting-dev.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch127: N_dpms_screensaver.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch143: N_autoconfig_fallback_fbdev_first.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch145: N_driver-autoconfig.diff
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch162: N_cache-xkbcomp-output-for-fast-start-up.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch200: N_bug534768-prefer_local_symbols.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch202: N_0001-Check-harder-for-primary-PCI-device.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch203: N_0001-Fix-segfault-when-killing-X-with-ctrl-alt-backspace.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch206: N_fix_fglrx_screendepth_issue.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch211: N_0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch213: N_xorg-server-xdmcp.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch220: N_Use-external-tool-for-creating-backtraces-on-crashes.patch
# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines
Patch222: N_sync-fix.patch
Patch226: u_vgaHW-no-legacy.patch
Patch227: u_init_framebuffer_base.patch
Patch228: u_aarch64-support.patch
Patch229: u_disable-acpi-code.patch
Patch230: u_xserver_xvfb-randr.patch
Patch240: U_revert_dri2_realloc_dri2_drawable_if-pixmap_serial_changes.patch
%description
This package contains the X.Org Server.
%package extra
Summary: Additional Xservers (Xdmx, Xephyr, Xnest)
Group: System/X11/Servers/XF86_4
Requires: Mesa
Requires: xkbcomp
Requires: xkeyboard-config
Requires: xorg-x11-fonts-core
Provides: xorg-x11-Xnest
Obsoletes: xorg-x11-Xnest
%description extra
This package contains additional Xservers (Xdmx, Xephyr, Xnest).
%package sdk
Summary: X
Group: System/Libraries
Requires: xorg-x11-proto-devel
Requires: xorg-x11-server
Requires: pkgconfig(fontconfig)
Requires: pkgconfig(fontenc)
Requires: pkgconfig(freetype2)
Requires: pkgconfig(ice)
Requires: pkgconfig(libdrm)
Requires: pkgconfig(sm)
Requires: pkgconfig(x11)
Requires: pkgconfig(xau)
Requires: pkgconfig(xdmcp)
Requires: pkgconfig(xext)
Requires: pkgconfig(xfixes)
Requires: pkgconfig(xkbfile)
Requires: pkgconfig(xmu)
Requires: pkgconfig(xp)
Requires: pkgconfig(xpm)
Requires: pkgconfig(xprintutil)
Requires: pkgconfig(xrender)
Requires: pkgconfig(xt)
Requires: pkgconfig(xtrans)
Requires: pkgconfig(xv)
Provides: xorg-x11-sdk
Obsoletes: xorg-x11-sdk
%description sdk
This package contains the X.Org Server SDK.
%if %vnc
%package -n xorg-x11-Xvnc
Summary: VNC Server for the X Window System
Group: System/X11/Servers/XF86_4
Requires: xkbcomp
Requires: xkeyboard-config
Requires: xorg-x11-fonts-core
Provides: XFree86-Xvnc
Provides: vnc:/usr/X11R6/bin/Xvnc
Obsoletes: XFree86-Xvnc
%ifarch ia64
Provides: vnc-x86
Obsoletes: vnc-x86
%endif
%description -n xorg-x11-Xvnc
An X Window System server for Virtual Network Computing (VNC).
%endif
%prep
%setup -q -n xorg-server-%{dirsuffix} -a4
# Early verification if the ABI Defines are correct. Let's not waste build cycles if the Provides are wrong at the end.
sh %{SOURCE99} --verify . %{SOURCE98}
cp %{SOURCE96} .
%patch0 -p1
%patch2
%patch16 -p1
%if %vnc
### Needs to be rebased
#%patch17 -p1
#%patch18 -p1
#%patch19 -p1
#%patch20 -p1
#%patch21 -p1
#%patch22 -p1
#%patch23 -p1
#%patch24 -p1
%endif
### Needs to be rebased
#%patch45 -p0
%patch77
%patch79 -p1
%patch101 -p1
%patch103
%patch106 -p1
%patch112 -p0
### disabled for now
#%patch125 -p1
%patch127 -p1
%patch143 -p0
%patch145 -p0
### disabled for now
#%patch162 -p1
%patch200 -p1
%patch202 -p1
%patch203 -p1
%patch206 -p0
### disabled for now
#%patch211 -p1
%patch213 -p1
### Disable backtrace generation patch for now
#%patch220 -p1
### patch222 might not be applicable anymore
#%patch222 -p1
%patch226 -p0
%patch227 -p1
%patch228 -p1
%patch229 -p1
%patch230 -p1
%patch240 -p1
%build
autoreconf -fi
%configure CFLAGS="%{optflags} -fno-strict-aliasing" \
--sysconfdir=/etc \
--enable-install-libxf86config \
--enable-xdmcp \
--enable-xdm-auth-1 \
--enable-dri \
--enable-dri2 \
--enable-dmx \
--enable-xnest \
--enable-kdrive \
--enable-kdrive-evdev \
--enable-xephyr \
--disable-xfake \
--disable-xfbdev \
--enable-record \
--enable-xcsecurity \
--with-sha1=libcrypto \
%ifarch s390 s390x
--disable-xorg \
--disable-aiglx \
%else
--enable-xorg \
%if 0%{?suse_version} > 1120
--enable-config-udev \
%endif
%endif
%if %vnc
--disable-xcliplist \
%endif
--with-log-dir="/var/log" \
--with-os-name="openSUSE" \
--with-os-vendor="SUSE LINUX" \
--with-fontrootdir="/usr/share/fonts" \
--with-xkb-path="/usr/share/X11/xkb" \
--with-xkb-output="/var/lib/xkb/compiled" \
--with-default-font-path="/usr/share/fonts/misc:unscaled,\
/usr/share/fonts/Type1/,/usr/share/fonts/100dpi:unscaled,\
%if 0%{?suse_version} > 1210
/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/ghostscript/,\
%else
/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/URW/,\
%endif
/usr/share/fonts/cyrillic:unscaled,\
/usr/share/fonts/misc/sgi:unscaled,\
/usr/share/fonts/truetype/,built-ins"
make %{?_smp_mflags}
make -C hw/kdrive %{?_smp_mflags}
%install
%make_install
make -C hw/kdrive install DESTDIR=%{buildroot}
%ifnarch s390 s390x
# remove .la files
find %{buildroot}%{_libdir}/xorg/modules/ -name "*.la" | \
xargs rm
install -m 644 hw/xfree86/parser/{xf86Parser.h,xf86Optrec.h} \
%{buildroot}%{_includedir}/xorg
# bnc #632737
chmod u-s %{buildroot}%{_bindir}/Xorg
mkdir -p %{buildroot}%{_localstatedir}/lib/X11
ln -snf ../../../usr/bin/Xorg %{buildroot}%{_localstatedir}/lib/X11/X
ln -snf ../../var/lib/X11/X %{buildroot}%{_bindir}/X
%if 0%{?suse_version} > 1120
%ifnarch s390 s390x
mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
cp %{buildroot}/%{_datadir}/X11/xorg.conf.d/10-evdev.conf %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/
%endif
%endif
mkdir -p %{buildroot}%{_libdir}/xorg/modules/updates/{fonts,input,linux,drivers,multimedia,extensions}
install -m 644 $RPM_SOURCE_DIR/README.updates %{buildroot}%{_libdir}/xorg/modules/updates
mkdir -p %{buildroot}%{_sysconfdir}/modprobe.d
install -m 644 $RPM_SOURCE_DIR/modprobe.nvidia %{buildroot}%{_sysconfdir}/modprobe.d/50-nvidia.conf
%else
rm -f %{buildroot}%{_datadir}/aclocal/*.m4
%endif
%if %vnc
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services
cat > %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name} << EOF
## Name: VNC Server
## Description: Opens ports for VNC Server
TCP="5801 5901"
EOF
%endif
%ifarch s390 s390x
rm -f %{buildroot}%{_sysconfdir}/X11/10-evdev.conf
make -C hw/xfree86/parser
mkdir -p %{buildroot}%{_includedir}/xorg \
%{buildroot}%{_libdir}
install -m 644 hw/xfree86/parser/{xf86Parser.h,xf86Optrec.h} \
%{buildroot}%{_includedir}/xorg
install -m 644 include/list.h \
%{buildroot}%{_includedir}/xorg
if [ -f hw/xfree86/parser/.libs/libxf86config.a ] ; then
install -m 644 hw/xfree86/parser/.libs/libxf86config.a \
%{buildroot}//usr/%{_lib}
else
install -m 644 hw/xfree86/parser/libxf86config.a \
%{buildroot}//usr/%{_lib}
fi
%endif
%ifnarch s390 s390x
mkdir -p %{buildroot}%{_localstatedir}/adm/fillup-templates
install -m 644 %_sourcedir/sysconfig.displaymanager.template \
%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.displaymanager-%{name}
%endif
install -m 755 $RPM_SOURCE_DIR/xorg-backtrace %{buildroot}%{_bindir}/xorg-backtrace
install -D xorg-x11-server.macros %{buildroot}%{_sysconfdir}/rpm/macros.xorg-server
%post
%ifnarch s390 s390x
%{fillup_only -an displaymanager}
if [ -f etc/X11/xorg.conf ]; then
# Document how to restore previous input driver behaviour in xorg.conf files created
# on openSUSE <= 11.1
if ! grep -q "will be disabled unless 'Option \"AutoAddDevices\" \"off\"'" etc/X11/xorg.conf; then
if ! grep -q "\"AutoAddDevices\" \"off\"" etc/X11/xorg.conf; then
sed -i '
/Section "ServerFlags"/{
h
g
a\
# Uncomment the following option to reenable kbd/mouse driver input sections. \
# Otherwise evdev driver is used. \
#Option "AutoAddDevices" "off"
}
' etc/X11/xorg.conf
fi
fi
fi
%endif
exit 0
%files
%defattr(-,root,root)
%ifnarch s390 s390x
%if 0%{?suse_version} > 1120
%dir %{_sysconfdir}/X11/xorg.conf.d
%config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/10-evdev.conf
%dir %{_datadir}/X11/xorg.conf.d
%{_datadir}/X11/xorg.conf.d/10-evdev.conf
%endif
%dir %{_sysconfdir}/modprobe.d
%dir %{_localstatedir}/lib/X11
%endif
%dir %{_localstatedir}/lib/xkb
%dir %{_localstatedir}/lib/xkb/compiled
%dir %{_libdir}/xorg
%{_libdir}/xorg/protocol.txt
%{_mandir}/man1/*
%exclude %{_mandir}/man1/Xdmx.1*
%exclude %{_mandir}/man1/Xephyr.1*
%exclude %{_mandir}/man1/Xnest.1*
%{_localstatedir}/lib/xkb/compiled/README.compiled
%ifnarch s390 s390x
%{_sysconfdir}/modprobe.d/50-nvidia.conf
%{_bindir}/Xorg
%{_bindir}/X
%{_bindir}/cvt
%{_bindir}/gtf
%{_libdir}/xorg/modules/
%{_mandir}/man4/*
%{_mandir}/man5/*
%{_localstatedir}/adm/fillup-templates/sysconfig.displaymanager-%{name}
%{_localstatedir}/lib/X11/X
%endif
%{_bindir}/Xvfb
%{_bindir}/xorg-backtrace
%files extra
%defattr(-,root,root)
%{_bindir}/Xephyr
%{_bindir}/Xnest
%{_bindir}/Xdmx
%{_bindir}/dmxaddinput
%{_bindir}/dmxaddscreen
%{_bindir}/dmxinfo
%{_bindir}/dmxreconfig
%{_bindir}/dmxresize
%{_bindir}/dmxrminput
%{_bindir}/dmxrmscreen
%{_bindir}/dmxtodmx
%{_bindir}/dmxwininfo
%{_bindir}/vdltodmx
%{_bindir}/xdmxconfig
%{_mandir}/man1/Xdmx.1*
%{_mandir}/man1/Xephyr.1*
%{_mandir}/man1/Xnest.1*
%files sdk
%defattr(-,root,root)
%{_includedir}/xorg/
%{_libdir}/*.a
%ifnarch s390 s390x
%exclude %{_libdir}/libxf86config.la
%{_libdir}/pkgconfig/*.pc
%{_datadir}/aclocal/*.m4
%endif
%{_sysconfdir}/rpm/macros.xorg-server
%if %vnc
%files -n xorg-x11-Xvnc
%defattr(-, root, root)
%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}
#%{_bindir}/Xvnc
%endif
%changelog