+#
# Conditional build:
%bcond_without dist_kernel # without distribution kernel
+%bcond_without up # without up packages
%bcond_without smp # without smp packages
%bcond_without kernel # without kernel packages
-%bcond_without incall # include all tarballs
%bcond_without userspace # don't build userspace programs
%bcond_with verbose # verbose build (V=1)
%bcond_with grsec_kernel # build for kernel-grsecurity
%define alt_kernel grsecurity
%endif
#
-%define _nv_ver 1.0
-%define _nv_rel 9639
+%define _nv_ver 96.43.01
%define _min_x11 6.7.0
%define _rel 55
#
-%define need_x86 0
-%define need_x8664 0
-%if %{with incall}
-%define need_x86 1
-%define need_x8664 1
-%else
-%ifarch %{ix86}
-%define need_x86 1
-%endif
-%ifarch %{x8664}
-%define need_x8664 1
-%endif
-%endif
-#
Summary: Linux Drivers for NVIDIA GeForce/Quadro Chips
Summary(pl): Sterowniki do kart graficznych NVIDIA GeForce/Quadro
Name: X11-driver-nvidia-legacy2
-Version: %{_nv_ver}.%{_nv_rel}
+Version: %{_nv_ver}
Release: %{_rel}
License: nVidia Binary
Group: X11
-# why not pkg0!?
-%if %{need_x86}
-Source0: http://download.nvidia.com/XFree86/Linux-x86/%{_nv_ver}-%{_nv_rel}/NVIDIA-Linux-x86-%{_nv_ver}-%{_nv_rel}-pkg1.run
-# Source0-md5: b277a5a05f6e8e4e0cd388ea9203e4f5
-%endif
-%if %{need_x8664}
-Source1: http://download.nvidia.com/XFree86/Linux-x86_64/%{_nv_ver}-%{_nv_rel}/NVIDIA-Linux-x86_64-%{_nv_ver}-%{_nv_rel}-pkg1.run
-# Source1-md5: 60293af0dde33f186257f723bb2da845
-%endif
+Source0: http://download.nvidia.com/XFree86/Linux-x86/%{_nv_ver}/NVIDIA-Linux-x86-%{_nv_ver}-pkg1.run
+# Source0-md5: 66f8b5e243aad22162e40d0f05f0bf1e
+Source1: http://download.nvidia.com/XFree86/Linux-x86_64/%{_nv_ver}/NVIDIA-Linux-x86_64-%{_nv_ver}-pkg1.run
+# Source1-md5: 1cb134675bbdce8e172a0edc78618ed3
Source2: %{name}-settings.desktop
Source3: %{name}-xinitrc.sh
Patch0: %{name}-GL.patch
-Patch1: %{name}-conftest.patch
-# http://www.minion.de/files/1.0-6629/
-URL: http://www.nvidia.com/object/linux.html
+URL: http://www.nvidia.com/object/unix.html
%if %{with kernel}
%{?with_dist_kernel:BuildRequires: kernel%{_alt_kernel}-module-build >= 3:2.6.7}
%endif
BuildRequires: %{kgcc_package}
-#BuildRequires: X11-devel >= %{_min_x11} # disabled for now
-BuildRequires: rpmbuild(macros) >= 1.308
+BuildRequires: rpmbuild(macros) >= 1.330
BuildRequires: sed >= 4.0
BuildConflicts: XFree86-nvidia
Requires: X11-Xserver
Summary: nVidia kernel module for nVidia Architecture support
Summary(de): Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung
Summary(pl): Modu³ j±dra dla obs³ugi kart graficznych nVidia
-Version: %{_nv_ver}.%{_nv_rel}
+Version: %{_nv_ver}
Release: %{_rel}@%{_kernel_ver_str}
Group: Base/Kernel
Requires(post,postun): /sbin/depmod
%prep
cd %{_builddir}
-rm -rf NVIDIA-Linux-x86*-%{_nv_ver}-%{_nv_rel}-pkg*
+rm -rf NVIDIA-Linux-x86*-%{_nv_ver}-pkg*
%ifarch %{ix86}
/bin/sh %{SOURCE0} --extract-only
-%setup -qDT -n NVIDIA-Linux-x86-%{_nv_ver}-%{_nv_rel}-pkg1
+%setup -qDT -n NVIDIA-Linux-x86-%{_nv_ver}-pkg1
%else
/bin/sh %{SOURCE1} --extract-only
-%setup -qDT -n NVIDIA-Linux-x86_64-%{_nv_ver}-%{_nv_rel}-pkg1
+%setup -qDT -n NVIDIA-Linux-x86_64-%{_nv_ver}-pkg1
%endif
%patch0 -p1
-#%patch1 -p1
sed -i 's:-Wpointer-arith::' usr/src/nv/Makefile.kbuild
%build
%if %{with kernel}
cd usr/src/nv/
ln -sf Makefile.kbuild Makefile
-for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
- if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
- exit 1
- fi
- rm -rf o
- install -d o/include/linux
- ln -sf %{_kernelsrcdir}/config-$cfg o/.config
- ln -sf %{_kernelsrcdir}/Module.symvers-$cfg o/Module.symvers
- ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h o/include/linux/autoconf.h
-%if %{with dist_kernel}
- %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
-%else
- touch o/include/config/MARKER
- ln -sf %{_kernelsrcdir}/scripts o/scripts
-%endif
- %{__make} -C %{_kernelsrcdir} clean \
- RCS_FIND_IGNORE="-name '*.ko' -o -name nv-kernel.o -o" \
- SYSSRC=%{_kernelsrcdir} \
- SYSOUT=$PWD/o \
- M=$PWD O=$PWD/o \
- %{?with_verbose:V=1}
- %{__make} -C %{_kernelsrcdir} modules \
- CC="%{__cc}" CPP="%{__cpp}" \
- SYSSRC=%{_kernelsrcdir} \
- SYSOUT=$PWD/o \
- M=$PWD O=$PWD/o \
- %{?with_verbose:V=1}
- mv nvidia.ko nvidia-$cfg.ko
-done
+cat >> Makefile <<'EOF'
+
+$(obj)/nv-kernel.o: $(src)/nv-kernel.o.bin
+ cp $< $@
+EOF
+mv nv-kernel.o{,.bin}
+%build_kernel_modules -m nvidia
%endif
%install
%if %{with userspace}
install -d $RPM_BUILD_ROOT%{_libdir}/modules/{drivers,extensions} \
- $RPM_BUILD_ROOT{/usr/include/GL,/usr/%{_lib}/tls,%{_bindir}} \
+ $RPM_BUILD_ROOT{/usr/include/GL,/usr/%{_lib}/tls,%{_bindir},%{_mandir}/man1} \
$RPM_BUILD_ROOT{%{_pixmapsdir},%{_desktopdir},/etc/X11/xinit/xinitrc.d}
ln -sf $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_prefix}/../lib
install usr/bin/nvidia-settings $RPM_BUILD_ROOT%{_bindir}
+install usr/bin/nvidia-xconfig $RPM_BUILD_ROOT%{_bindir}
install usr/share/pixmaps/nvidia-settings.png $RPM_BUILD_ROOT%{_pixmapsdir}
+install usr/share/man/man1/nvidia-[sx]* $RPM_BUILD_ROOT%{_mandir}/man1
install %{SOURCE2} $RPM_BUILD_ROOT%{_desktopdir}/nvidia-settings.desktop
install %{SOURCE3} $RPM_BUILD_ROOT/etc/X11/xinit/xinitrc.d/nvidia-settings.sh
install usr/lib/libnvidia-tls.so.%{version} $RPM_BUILD_ROOT/usr/%{_lib}
install usr/lib/libGL{,core}.so.%{version} $RPM_BUILD_ROOT%{_libdir}
install usr/X11R6/lib/modules/extensions/libglx.so.%{version} \
$RPM_BUILD_ROOT%{_libdir}/modules/extensions
-%ifarch %{x8664}
-# support for running 32-bit OpenGL applications on 64-bit AMD64 Linux installations
-#install -d $RPM_BUILD_ROOT%{_libdir32}
-#install usr/lib32%{?with_tls:/tls}/libnvidia-tls.so.%{version} $RPM_BUILD_ROOT%{_libdir32}
-#install usr/lib32/libGL{,core}.so.%{version} $RPM_BUILD_ROOT%{_libdir32}
-%endif
install usr/X11R6/lib/modules/drivers/nvidia_drv.so $RPM_BUILD_ROOT%{_libdir}/modules/drivers
install usr/X11R6/lib/libXvMCNVIDIA.so.%{version} $RPM_BUILD_ROOT%{_libdir}
%endif
%if %{with kernel}
-cd usr/src/nv/
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
-install nvidia-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
- $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/nvidia.ko
-%if %{with smp} && %{with dist_kernel}
-install nvidia-smp.ko \
- $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/nvidia.ko
-%endif
+%install_kernel_modules -m usr/src/nv/nvidia -d misc
%endif
%clean
%defattr(644,root,root,755)
%doc LICENSE
%doc usr/share/doc/{README.txt,NVIDIA_Changelog,XF86Config.sample}
-#%%lang(de) %doc usr/share/doc/README.DE
%attr(755,root,root) %{_libdir}/libGL.so.*.*
%attr(755,root,root) %{_libdir}/libGL.so
%attr(755,root,root) %{_libdir}/libGLcore.so.*.*
%dir /usr/%{_lib}/tls
%attr(755,root,root) /usr/%{_lib}/libnvidia-tls.so.*.*.*
%attr(755,root,root) /usr/%{_lib}/tls/libnvidia-tls.so.*.*.*
-%ifarch %{x8664}
-# support for running 32-bit OpenGL applications on 64-bit AMD64 Linux installations
-#dir %{_libdir32}
-#attr(755,root,root) %{_libdir32}/libGL.so.*.*
-#attr(755,root,root) %{_libdir32}/libGLcore.so.*.*
-#attr(755,root,root) %{_libdir32}/libXvMCNVIDIA.so.*.*
-#attr(755,root,root) %{_libdir32}/libnvidia-tls.so.*.*.*
-%endif
%attr(755,root,root) /usr/%{_lib}/libGL.so.1
%attr(755,root,root) /usr/%{_lib}/libGL.so
%attr(755,root,root) %{_libdir}/modules/extensions/libglx.so*
%defattr(644,root,root,755)
%attr(755,root,root) %{_libdir}/libXvMCNVIDIA.so
/usr/include/GL/*.h
-# -static
%{_libdir}/libXvMCNVIDIA.a
%files progs
%defattr(644,root,root,755)
%doc usr/share/doc/nvidia-settings-user-guide.txt
%attr(755,root,root) %{_bindir}/nvidia-settings
+%attr(755,root,root) %{_bindir}/nvidia-xconfig
%attr(755,root,root) /etc/X11/xinit/xinitrc.d/*.sh
-%{_desktopdir}/*
+%{_desktopdir}/*.desktop
+%{_mandir}/man1/*
%{_pixmapsdir}/*
%endif