nowa nvidia

Shining Path shiningpath w o2.pl
Pon, 15 Gru 2003, 14:10:27 CET


Dla zachowania zgodności z kernelami < 2.6 poprawiłem swojego diffa.
Zapomnialem o tym wczesniej.

-- 
Robert Halabowski - http://www.ghnet.pl/~halab
Open Source - Gale from Fan ;)
z /dev/dsp wydobywa się: White Zombie-La Sexorcisto- Devil Music Vol. 
1-Thrust
-------------- następna część ---------
--- kernel-video-nvidia.spec.old	2003-12-15 12:22:31.601267368 +0100
+++ kernel-video-nvidia.spec	2003-12-15 13:56:28.764288328 +0100
@@ -7,8 +7,8 @@
 #
 %define		_nv_name NVIDIA_kernel
 %define		_nv_ver	1.0
-%define		_nv_rel	4496
-%define		_nv_pkg	pkg2
+%define		_nv_rel	4620
+%define		_nv_pkg	pkg1
 
 Summary:	nVidia kernel module for nVidia Architecture support
 Summary(de):	Das nVidia-Kern-Modul für die nVidia-Architektur-Unterstützung
@@ -20,11 +20,11 @@
 License:	nVidia
 Vendor:		nVidia Corp.
 Group:		Base/Kernel
-Source0:	http://download.nvidia.com/XFree86/Linux-x86/%{_nv_ver}-%{_nv_rel}/NVIDIA-Linux-x86-%{_nv_ver}-%{_nv_rel}-%{_nv_pkg}.run
-# Source0-md5:	34543e7bf271ff90e1a536aacd32efbd
+Source0:	http://public.pny.com/quadro/FX3000g/Linux/NVIDIA-Linux-x86-%{_nv_ver}-%{_nv_rel}-%{_nv_pkg}.run
+# Source0-md5:	b0050e58d5cb94dbfd0a96713bd1bfe9
 Patch0:		%{_nv_name}-Makefile.patch
-# http://www.minion.de/files/%{_nv_name}-%{_nv_ver}-%{_nv_rel}-2.5.diff
-Patch1:		%{_nv_name}-%{_nv_ver}-%{_nv_rel}-2.5.diff
+# http://www.minion.de/files/%{_nv_name}-%{_nv_ver}-%{_nv_rel}-2.6.diff
+Patch1:		%{_nv_name}-%{_nv_ver}-%{_nv_rel}-2.6.diff
 Patch2:		%{_nv_name}-test5.patch
 URL:		http://www.nvidia.com/object/linux.html
 %{!?_without_dist_kernel:BuildRequires:	kernel-headers >= 2.2.0 }
@@ -41,6 +41,7 @@
 ExclusiveArch:	%{ix86}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+
 %description
 nVidia Architecture support for Linux kernel.
 
@@ -74,32 +75,44 @@
 Obsługa architektury nVidia dla jądra Linuksa SMP. Pakiet wymagany
 przez sterownik nVidii dla XFree86 4.
 
-%if %{?_with_kernel_2_6:1}0
+#%if %{?_with_kernel_2_6:1}0
 %define _modext ko
-%else
-%define _modext o
-%endif
+#%else
+#%define _modext o
+#%endif
 
 %prep
+
+echo "###################################################################"
+echo "
+              That source rpm is provided only for 2.6 series kernels!
+	      For older ones use: builder -bb kernel-video-nvidia.spec
+	      or rebuild distro source rpm.
+	      "
+echo "###################################################################" 
 cd %{_topdir}/BUILD
 rm -rf NVIDIA-Linux-x86-%{_nv_ver}-%{_nv_rel}-%{_nv_pkg}
 /bin/sh %{SOURCE0} --extract-only
 %setup -q -DT -n NVIDIA-Linux-x86-%{_nv_ver}-%{_nv_rel}-%{_nv_pkg}
 %patch0 -p1
-%{?_with_kernel_2_6:%patch1 -p1}
+%if %{?_with_kernel_2_6:1}0
+cd usr/src/nv/
+patch1 -p1
+%endif
 %{?_with_kernel_2_6:%patch2 -p0}
 
 %build
 IGNORE_CC_MISMATCH=ignore; export IGNORE_CC_MISMATCH
 cd usr/src/nv/
+ln -s Makefile.kbuild Makefile
 %if %{?_without_smp:0}%{!?_without_smp:1}
-%{__make} nvidia.o \
-	CC=%{kgcc} \
+%{__make} module \
+	    CC=%{kgcc} \
 	INCLUDES="%{rpmcflags} -I. -D__KERNEL_SMP=1 -D__SMP__ -I%{_kernelsrcdir}/include"
 mv -f nvidia.%{_modext} nvidia-smp.%{_modext}
 %{__make} clean
 %endif
-%{__make} nvidia.o \
+%{__make} module \
         CC=%{kgcc} \
 	INCLUDES="%{rpmcflags} -I.  -I%{_kernelsrcdir}/include"
 
@@ -109,7 +122,7 @@
 %if %{?_without_smp:0}%{!?_without_smp:1}
 install -D nvidia-smp.%{_modext} $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/nvidia.%{_modext}
 %endif
-install -D nvidia.%{_modext} $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/nvidia.%{_modext}
+install -D nvidia.%{_modext} $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/nvidia.ko
 
 %clean
 rm -rf $RPM_BUILD_ROOT


Więcej informacji o liście pld-users-pl