# - kernel-drm is required on never kernels. driver for kernel-longterm not requires drm
#
# Conditional build:
-%bcond_without dist_kernel # without distribution kernel
%bcond_without kernel # without kernel packages
%bcond_without userspace # don't build userspace programs
%bcond_with settings # package nvidia-settings here (GPL version of same packaged from nvidia-settings.spec)
%bcond_with verbose # verbose build (V=1)
-%if %{without kernel}
-%undefine with_dist_kernel
-%endif
-
# The goal here is to have main, userspace, package built once with
# simple release number, and only rebuild kernel packages with kernel
# version as part of release number, without the need to bump release
exit 1
%endif
-%if "%{_alt_kernel}" != "%{nil}"
-%if 0%{?build_kernels:1}
-%{error:alt_kernel and build_kernels are mutually exclusive}
-exit 1
-%endif
-%undefine with_userspace
-%global _build_kernels %{alt_kernel}
-%else
-%global _build_kernels %{?build_kernels:,%{?build_kernels}}
-%endif
-
%if %{without userspace}
# nothing to be placed to debuginfo package
%define _enable_debug_packages 0
%define no_install_post_check_so 1
-%define kbrs %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo "BuildRequires:kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2" ; done)
-%define kpkg %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%kernel_pkg ; done)
-%define bkpkg %(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%build_kernel_pkg ; done)
-
-%define rel 1
+%define rel 1
%define pname xorg-driver-video-nvidia
Summary: Linux Drivers for nVidia GeForce/Quadro Chips
Summary(hu.UTF-8): Linux meghajtók nVidia GeForce/Quadro chipekhez
Summary(pl.UTF-8): Sterowniki do kart graficznych nVidia GeForce/Quadro
Name: %{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
# when updating version here, keep nvidia-settings.spec in sync as well
-Version: 331.38
+Version: 381.22
Release: %{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
Epoch: 1
License: nVidia Binary
Group: X11
Source0: http://us.download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-Linux-x86-%{version}.run
-# Source0-md5: 16aa229f7f118c8cafad6fb3f4ac082e
+# Source0-md5: 8825cec1640739521689bd80121d1425
Source1: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}-no-compat32.run
-# Source1-md5: f2059ae373665cb6c8fb826e1173b04d
+# Source1-md5: 0e9590d48703c8baa034b6f0f8bbf1e5
Source2: %{pname}-xinitrc.sh
Source3: gl.pc.in
Source4: 10-nvidia.conf
Source5: 10-nvidia-modules.conf
Patch0: X11-driver-nvidia-GL.patch
Patch1: X11-driver-nvidia-desktop.patch
+Patch2: linux-4.1-and-older.patch
URL: http://www.nvidia.com/object/unix.html
-BuildRequires: rpmbuild(macros) >= 1.679
-%{?with_dist_kernel:%{expand:%kbrs}}
+BuildRequires: rpmbuild(macros) >= 1.701
+%{?with_kernel:%{expand:%buildrequires_kernel kernel%%{_alt_kernel}-module-build >= 3:2.6.20.2}}
BuildRequires: sed >= 4.0
BuildConflicts: XFree86-nvidia
Requires: %{pname}-libs = %{epoch}:%{version}-%{rel}
Requires: xorg-xserver-server
-Requires: xorg-xserver-server(videodrv-abi) <= 15.0
+Requires: xorg-xserver-server(videodrv-abi) <= 23.0
Requires: xorg-xserver-server(videodrv-abi) >= 2.0
+Provides: ocl-icd(nvidia)
+Provides: ocl-icd-driver
+Provides: vulkan(icd) = 1.0.42
Provides: xorg-driver-video
Provides: xorg-xserver-module(glx)
Obsoletes: XFree86-driver-nvidia
Group: X11/Development/Libraries
Requires(post,postun): /sbin/ldconfig
Requires: libvdpau >= 0.3
-Provides: OpenGL = 2.1
+Provides: OpenGL = 3.3
Provides: OpenGL-GLX = 1.4
Obsoletes: X11-OpenGL-core < 1:7.0.0
Obsoletes: X11-OpenGL-libGL < 1:7.0.0
%package doc
Summary: Documentation for NVIDIA Graphics Driver
Group: Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description doc
NVIDIA Accelerated Linux Graphics Driver README and Installation
Group: Base/Kernel\
Requires(post,postun): /sbin/depmod\
Requires: dev >= 2.7.7-10\
-%if %{with dist_kernel}\
%requires_releq_kernel\
%if %{_kernel_version_code} >= %{_kernel_version_magic 3 10 0}\
Requires: %{releq_kernel -n drm}\
%endif\
Requires(postun): %releq_kernel\
-%endif\
Requires: %{pname} = %{epoch}:%{version}\
Provides: X11-driver-nvidia(kernel)\
Obsoletes: XFree86-nvidia-kernel\
#mv nv-kernel.o{,.bin}\
#build_kernel_modules -m nvidia\
%{__make} SYSSRC=%{_kernelsrcdir} clean\
-%{__make} SYSSRC=%{_kernelsrcdir} module\
+%{__make} SYSSRC=%{_kernelsrcdir} IGNORE_CC_MISMATCH=1 NV_VERBOSE=1 CC=%{__cc} module\
cd ..\
-%install_kernel_modules -D installed -m kernel/nvidia -d misc\
+%install_kernel_modules -D installed -m kernel/nvidia,kernel/nvidia-drm,kernel/nvidia-modeset -d misc\
+%ifarch %{x8664}\
+%install_kernel_modules -D installed -m kernel/nvidia-uvm -d misc\
+%endif\
%{nil}
-%{?with_kernel:%{expand:%kpkg}}
+%{?with_kernel:%{expand:%create_kernel_packages}}
%prep
cd %{_builddir}
%endif
%patch0 -p1
%patch1 -p1
+%patch2 -p1
echo 'EXTRA_CFLAGS += -Wno-pointer-arith -Wno-sign-compare -Wno-unused' >> kernel/Makefile.kbuild
%build
-%{?with_kernel:%{expand:%bkpkg}}
+%{?with_kernel:%{expand:%build_kernel_packages}}
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_libdir}/{nvidia,xorg/modules/{drivers,extensions/nvidia}} \
$RPM_BUILD_ROOT{%{_includedir}/GL,%{_libdir}/vdpau,%{_bindir},%{_mandir}/man1} \
$RPM_BUILD_ROOT{%{_desktopdir},%{_pixmapsdir},/etc/X11/xinit/xinitrc.d} \
- $RPM_BUILD_ROOT%{_sysconfdir}/{OpenCL/vendors,ld.so.conf.d,X11/xorg.conf.d}
+ $RPM_BUILD_ROOT%{_sysconfdir}/{OpenCL/vendors,ld.so.conf.d,X11/xorg.conf.d} \
+ $RPM_BUILD_ROOT%{_datadir}/vulkan/icd.d
%if %{with settings}
install -p nvidia-settings $RPM_BUILD_ROOT%{_bindir}
for f in \
libGL.so.%{version} \
- libOpenCL.so.1.0.0 \
+ libGLX.so.0 \
+ libGLX_nvidia.so.%{version} \
+ libGLdispatch.so.0 \
+ libEGL.so.1 \
+ libEGL_nvidia.so.%{version} \
+ libGLESv1_CM.so.1 \
+ libGLESv1_CM_nvidia.so.%{version} \
+ libGLESv2.so.2 \
+ libGLESv2_nvidia.so.%{version} \
+ libOpenGL.so.0 \
libcuda.so.%{version} \
libnvcuvid.so.%{version} \
libnvidia-cfg.so.%{version} \
libnvidia-compiler.so.%{version} \
- libnvidia-encode.so.%{version} \
+ libnvidia-egl-wayland.so.1.0.1 \
+ libnvidia-eglcore.so.%{version} \
+ libnvidia-encode.so.%{version} \
+ libnvidia-fatbinaryloader.so.%{version} \
+ libnvidia-fbc.so.%{version} \
libnvidia-glcore.so.%{version} \
+ libnvidia-glsi.so.%{version} \
+ libnvidia-ifr.so.%{version} \
libnvidia-ml.so.%{version} \
libnvidia-opencl.so.%{version} \
+ libnvidia-ptxjitcompiler.so.%{version} \
tls/libnvidia-tls.so.%{version} \
; do
install -p $f $RPM_BUILD_ROOT%{_libdir}/nvidia
# OpenGL ABI for Linux compatibility
ln -sf libGL.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so.1
ln -sf libGL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGL.so
-ln -sf libOpenCL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libOpenCL.so
+ln -sf libGLX.so.0 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX.so
+ln -sf libGLX_nvidia.so.%{version} $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLX_indirect.so.0
+ln -sf libEGL.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libEGL.so
+ln -sf libGLESv1_CM.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv1_CM.so
+ln -sf libGLESv2.so.2 $RPM_BUILD_ROOT%{_libdir}/nvidia/libGLESv2.so
ln -sf libcuda.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libcuda.so
ln -sf libnvcuvid.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libnvcuvid.so
+
+install nvidia_icd.json $RPM_BUILD_ROOT%{_datadir}/vulkan/icd.d
%endif
%if %{with kernel}
%post
cat << 'EOF'
NOTE: You must also install kernel module for this driver to work
- kernel-video-nvidia-%{version}
+ kernel%{_alt_kernel}-video-nvidia-%{version}
EOF
-%post libs -p /sbin/ldconfig
+%post libs -p /sbin/ldconfig
%postun libs -p /sbin/ldconfig
%if %{with userspace}
%attr(755,root,root) %{_libdir}/xorg/modules/drivers/nvidia_drv.so
%{_sysconfdir}/X11/xorg.conf.d/10-nvidia.conf
%{_sysconfdir}/X11/xorg.conf.d/10-nvidia-modules.conf
+%{_datadir}/vulkan/icd.d/nvidia_icd.json
%files libs
%defattr(644,root,root,755)
%{_sysconfdir}/OpenCL/vendors/nvidia.icd
%config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/ld.so.conf.d/nvidia*.conf
%dir %{_libdir}/nvidia
+%attr(755,root,root) %{_libdir}/nvidia/libEGL.so.1
+%attr(755,root,root) %ghost %{_libdir}/nvidia/libEGL_nvidia.so.0
+%attr(755,root,root) %{_libdir}/nvidia/libEGL_nvidia.so.*.*
%attr(755,root,root) %{_libdir}/nvidia/libGL.so.*.*
%attr(755,root,root) %ghost %{_libdir}/nvidia/libGL.so.1
-%attr(755,root,root) %{_libdir}/nvidia/libOpenCL.so.*.*
-%attr(755,root,root) %ghost %{_libdir}/nvidia/libOpenCL.so.1
-%attr(755,root,root) %{_libdir}/nvidia/libOpenCL.so
+%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM.so.1
+%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv1_CM_nvidia.so.1
+%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM_nvidia.so.*.*
+%attr(755,root,root) %{_libdir}/nvidia/libGLESv2.so.2
+%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLESv2_nvidia.so.2
+%attr(755,root,root) %{_libdir}/nvidia/libGLESv2_nvidia.so.*.*
+%attr(755,root,root) %{_libdir}/nvidia/libGLX.so.0
+%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLX_indirect.so.0
+%attr(755,root,root) %ghost %{_libdir}/nvidia/libGLX_nvidia.so.0
+%attr(755,root,root) %{_libdir}/nvidia/libGLX_nvidia.so.*.*
+%attr(755,root,root) %{_libdir}/nvidia/libGLdispatch.so.0
+%attr(755,root,root) %{_libdir}/nvidia/libOpenGL.so.0
%attr(755,root,root) %{_libdir}/nvidia/libcuda.so.*.*
%attr(755,root,root) %ghost %{_libdir}/nvidia/libcuda.so.1
%attr(755,root,root) %{_libdir}/nvidia/libcuda.so
%attr(755,root,root) %{_libdir}/nvidia/libnvidia-cfg.so.*.*
%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-cfg.so.1
%attr(755,root,root) %{_libdir}/nvidia/libnvidia-compiler.so.*.*
+%attr(755,root,root) %{_libdir}/nvidia/libnvidia-egl-wayland.so.*.*.*
+%attr(755,root,root) %{_libdir}/nvidia/libnvidia-eglcore.so.*.*
%attr(755,root,root) %{_libdir}/nvidia/libnvidia-encode.so.*.*
%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-encode.so.1
+%attr(755,root,root) %{_libdir}/nvidia/libnvidia-fatbinaryloader.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-fbc.so.1
+%attr(755,root,root) %{_libdir}/nvidia/libnvidia-fbc.so.*.*
%attr(755,root,root) %{_libdir}/nvidia/libnvidia-glcore.so.*.*
+%attr(755,root,root) %{_libdir}/nvidia/libnvidia-glsi.so.*.*
+%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-ifr.so.1
+%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ifr.so.*.*
%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ml.so.*.*
%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-ml.so.1
%attr(755,root,root) %{_libdir}/nvidia/libnvidia-opencl.so.*.*
%attr(755,root,root) %ghost %{_libdir}/nvidia/libnvidia-opencl.so.1
+%attr(755,root,root) %{_libdir}/nvidia/libnvidia-ptxjitcompiler.so.*.*
%attr(755,root,root) %{_libdir}/nvidia/libnvidia-tls.so.*.*
%attr(755,root,root) %{_libdir}/vdpau/libvdpau_nvidia.so.*.*
%attr(755,root,root) %ghost %{_libdir}/vdpau/libvdpau_nvidia.so.1
%{_includedir}/GL/glx.h
%{_includedir}/GL/glxext.h
%attr(755,root,root) %{_libdir}/nvidia/libGL.so
+%attr(755,root,root) %{_libdir}/nvidia/libGLX.so
+%attr(755,root,root) %{_libdir}/nvidia/libEGL.so
+%attr(755,root,root) %{_libdir}/nvidia/libGLESv1_CM.so
+%attr(755,root,root) %{_libdir}/nvidia/libGLESv2.so
%{_pkgconfigdir}/gl.pc
%files doc