X-Git-Url: https://git.pld-linux.org/?p=packages%2Fxorg-driver-video-nvidia.git;a=blobdiff_plain;f=xorg-driver-video-nvidia.spec;h=f4227b8288b068a6677a195a73b774f3789f3da8;hp=9c2a48ac1cff1958f579040fcc7f1121a37248f3;hb=d4127c3b4c0a5f57d888a7708f4985f893a29ded;hpb=e4947020f536c9619993d4a38ec583aa2e4e4ef4 diff --git a/xorg-driver-video-nvidia.spec b/xorg-driver-video-nvidia.spec index 9c2a48a..f4227b8 100644 --- a/xorg-driver-video-nvidia.spec +++ b/xorg-driver-video-nvidia.spec @@ -4,16 +4,11 @@ # - 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 @@ -23,17 +18,6 @@ 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 @@ -41,41 +25,41 @@ exit 1 %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 8 +%define rel 4 %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: 319.49 +Version: 346.35 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: df9eb270f7c6ac79edcd5831e946c4ad +# Source0-md5: d2b8f7f90ef5037f03f94519f9809511 Source1: http://us.download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}-no-compat32.run -# Source1-md5: d9d7ead9c472e2b1b18679700feeaadf +# Source1-md5: 9ca9f07f91361362f304ca8317ddd453 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: nvidia-kernel-3.18.patch +Patch3: linux-4.0.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) <= 14.1 +Requires: xorg-xserver-server(videodrv-abi) <= 19.0 Requires: xorg-xserver-server(videodrv-abi) >= 2.0 +Provides: ocl-icd(nvidia) +Provides: ocl-icd-driver Provides: xorg-driver-video Provides: xorg-xserver-module(glx) Obsoletes: XFree86-driver-nvidia @@ -129,7 +113,7 @@ Summary(pl.UTF-8): Biblioteki OpenGL (GL i GLX) 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 @@ -202,13 +186,11 @@ Release: %{rel}@%{_kernel_ver_str}\ 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\ @@ -240,7 +222,6 @@ sterownik nVidii dla Xorg/XFree86.\ %{nil} %define build_kernel_pkg()\ -ln -sf kernel/Makefile.kbuild kernel/Makefile\ cd kernel\ #cat >> Makefile <<'EOF'\ #\ @@ -255,7 +236,7 @@ cd ..\ %install_kernel_modules -D installed -m kernel/nvidia -d misc\ %{nil} -%{?with_kernel:%{expand:%kpkg}} +%{?with_kernel:%{expand:%create_kernel_packages}} %prep cd %{_builddir} @@ -269,10 +250,12 @@ rm -rf NVIDIA-Linux-x86*-%{version}* %endif %patch0 -p1 %patch1 -p1 +%patch2 -p0 +%patch3 -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 @@ -302,7 +285,6 @@ sed -i -e 's|@@LIBDIR@@|%{_libdir}|g' $RPM_BUILD_ROOT/etc/X11/xorg.conf.d/10-nvi for f in \ libGL.so.%{version} \ - libOpenCL.so.1.0.0 \ libcuda.so.%{version} \ libnvcuvid.so.%{version} \ libnvidia-cfg.so.%{version} \ @@ -343,7 +325,6 @@ echo %{_libdir}/vdpau >>$RPM_BUILD_ROOT%{_sysconfdir}/ld.so.conf.d/nvidia.conf # 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 libcuda.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libcuda.so ln -sf libnvcuvid.so.1 $RPM_BUILD_ROOT%{_libdir}/nvidia/libnvcuvid.so %endif @@ -367,11 +348,11 @@ rm -rf $RPM_BUILD_ROOT %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} @@ -398,9 +379,6 @@ EOF %dir %{_libdir}/nvidia %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/libcuda.so.*.* %attr(755,root,root) %ghost %{_libdir}/nvidia/libcuda.so.1 %attr(755,root,root) %{_libdir}/nvidia/libcuda.so