SPECS (AC-branch): X11-driver-nvidia-legacy2.spec - use new kernel...

hawk hawk at pld-linux.org
Sat Oct 20 14:07:24 CEST 2007


Author: hawk                         Date: Sat Oct 20 12:07:24 2007 GMT
Module: SPECS                         Tag: AC-branch
---- Log message:
- use new kernel module build macros

---- Files affected:
SPECS:
   X11-driver-nvidia-legacy2.spec (1.1.2.16 -> 1.1.2.17) 

---- Diffs:

================================================================
Index: SPECS/X11-driver-nvidia-legacy2.spec
diff -u SPECS/X11-driver-nvidia-legacy2.spec:1.1.2.16 SPECS/X11-driver-nvidia-legacy2.spec:1.1.2.17
--- SPECS/X11-driver-nvidia-legacy2.spec:1.1.2.16	Sat Oct 20 13:59:09 2007
+++ SPECS/X11-driver-nvidia-legacy2.spec	Sat Oct 20 14:07:19 2007
@@ -1,4 +1,5 @@
 # $Revision$, $Date$
+#
 # Conditional build:
 %bcond_without	dist_kernel	# without distribution kernel
 %bcond_without	up		# without up packages
@@ -36,7 +37,7 @@
 %{?with_dist_kernel:BuildRequires:	kernel%{_alt_kernel}-module-build >= 3:2.6.7}
 %endif
 BuildRequires:	%{kgcc_package}
-BuildRequires:	rpmbuild(macros) >= 1.308
+BuildRequires:	rpmbuild(macros) >= 1.330
 BuildRequires:	sed >= 4.0
 BuildConflicts:	XFree86-nvidia
 Requires:	X11-Xserver
@@ -180,35 +181,13 @@
 %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
@@ -246,14 +225,7 @@
 %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
@@ -340,6 +312,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.1.2.17  2007/10/20 12:07:19  hawk
+- use new kernel module build macros
+
 Revision 1.1.2.16  2007/10/20 11:59:09  hawk
 - src.rpm contents shouldn't be arch or bcond dependent
 - updated URL, removed obsolete conftest.patch, cleanup
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/X11-driver-nvidia-legacy2.spec?r1=1.1.2.16&r2=1.1.2.17&f=u



More information about the pld-cvs-commit mailing list