# # spec file for package nvidia kernel driver # # Copyright (c) 2006-2008 LISA GmbH, Bingen, Germany. # # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # build either for i586 or x86_64 (e.g. not for i686) # # might be necessary to disable symbol dependency generation for 2.6.25 and later kernels: # chmod 644 /usr/lib/rpm/find-requires.ksyms # but don't forget to reenable it later # # --define 'kver ...' (uname -r without flavour) # # rpmbuild -ba --target i586-suse-linux --define 'kver 2.6.25.4-8' SPECS/nvidia-kmp.spec # # defining a kver is necessary due a bug in the suse_kernel_module_package infrastructure: # if more than one kernel versions are installed, the resulting kernel module package name # has them all concatenated: e.g. 2.6.18.8_0.1 and 2.6.18.8_0.3, this results in: # nvidia-kmp-bigsmp-1.0.9755_2.6.18.8_0.12.6.18.8_0.3-1.i586.rpm # to workaround this problem, we define a HOPEFULLY MATCHING KVER SYMBOL, and replaced # the default subpkg template with one, that doesn't fiddle with expansion of %%{-r*} in # the Version tag. Specify the kflavor for similar reasons. %{?!kver: %{expand: %%define kver %(uname -r | sed -e 's/\(.*\)-.*$/\1/')}} %define kpkg %(echo %{kver} | tr '-' '_') %define majmin 173 %define relver 14.05 Name: nvidia Summary: kernel module for proprietary NVIDIA display driver Version: %{majmin}.%{relver} Release: 1 License: Proprietary Group: System/Kernel URL: http://www.nvidia.com/object/unix.html # i386 Source0: http://download.nvidia.com/XFree86/Linux-x86/%{majmin}-%{relver}/NVIDIA-Linux-x86-%{majmin}.%{relver}-pkg1.run # x86_64 Source1: http://download.nvidia.com/XFree86/Linux-x86_64/%{majmin}-%{relver}/NVIDIA-Linux-x86_64-%{majmin}.%{relver}-pkg2.run Source10: my-kernel-module-subpackage # http://www.nvnews.net/vbulletin/showthread.php?t=113919 Patch: NVIDIA_kernel-173.14.05-2419292.diff.txt BuildRequires: kernel-source kernel-syms ExclusiveArch: i586 x86_64 Obsoletes: nvidia-gfx-kmp Packager: Hans-Peter Jansen Vendor: LISA GmbH, Bingen, Germany Distribution: %( head -n1 /etc/SuSE-release ) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root %suse_kernel_module_package -s %{SOURCE10} -v %{version}_%{kpkg} -x default pae %description Kernel module for proprietary NVIDIA hardwareaccelerated OpenGL support. INSTALLING THIS PACKAGE WILL TAINT YOUR KERNEL, SO PLEASE DO NOT REPORT *ANY* BUGS BEFORE YOU UNINSTALL THE PACKAGE AND REBOOT THE SYSTEM. %package KMP Summary: kernel module for proprietary NVIDIA display driver Group: System/Kernel %description KMP Kernel module for proprietary NVIDIA hardwareaccelerated OpenGL support. INSTALLING THIS PACKAGE WILL TAINT YOUR KERNEL, SO PLEASE DO NOT REPORT *ANY* BUGS BEFORE YOU UNINSTALL THE PACKAGE AND REBOOT THE SYSTEM. %prep %setup -T -c # Extract the proper "sources" for the current architecture # We need to extract to a "not yet existing" directory first, so no "." %ifarch i386 i586 i686 sh %{SOURCE0} --extract-only --target tmp/ %endif %ifarch x86_64 sh %{SOURCE1} --extract-only --target tmp/ %endif # Move all the files back from tmp/ to the main directory %{__mv} tmp/* . %{__rm} -rf tmp/ # apply patch %patch -p0 # create dest dir, where the kernel flavors are build %{__mkdir_p} usr/src/obj # we build for 2.6, select the right Makefile %{__ln_s} usr/src/nv/Makefile.kbuild usr/src/nv/Makefile %build cd usr/src for flavor in %flavors_to_build; do rm -rf obj/$flavor cp -a nv obj/$flavor pushd obj/$flavor make IGNORE_CC_MISMATCH=1 QUIET=1 \ SYSSRC=/lib/modules/%{kver}-$flavor/source \ SYSOUT=/lib/modules/%{kver}-$flavor/build \ module popd done %install export INSTALL_MOD_PATH=%{buildroot} export INSTALL_MOD_DIR=updates cd usr/src for flavor in %flavors_to_build; do make -C /usr/src/linux-obj/%_target_cpu/$flavor modules_install M=$PWD/obj/$flavor done %clean %{__rm} -rf %{buildroot} #%files #%defattr(-,root,root) ##/lib/modules #%config %{_sysconfdir}/modprobe.d/nvidia %changelog * Wed Jun 04 2008 Hans-Peter Jansen - update to 173.14.05 * Sat Feb 16 2008 Hans-Peter Jansen - update to 169.07 * Fri May 04 2007 Hans-Peter Jansen - fixed the kmp build issues with multiple kernels installed * Fri Mar 23 2007 Hans-Peter Jansen - adapted to SUSE CODE 10 kernel module package (>= 10.1) * Thu Mar 22 2007 Hans-Peter Jansen - inital version 1.0-9755