SPECS (AC-branch): ndiswrapper.spec - update to kernel build macros

glen glen at pld-linux.org
Fri Apr 4 21:32:26 CEST 2008


Author: glen                         Date: Fri Apr  4 19:32:26 2008 GMT
Module: SPECS                         Tag: AC-branch
---- Log message:
- update to kernel build macros

---- Files affected:
SPECS:
   ndiswrapper.spec (1.37.2.31 -> 1.37.2.32) 

---- Diffs:

================================================================
Index: SPECS/ndiswrapper.spec
diff -u SPECS/ndiswrapper.spec:1.37.2.31 SPECS/ndiswrapper.spec:1.37.2.32
--- SPECS/ndiswrapper.spec:1.37.2.31	Fri Apr  4 21:20:45 2008
+++ SPECS/ndiswrapper.spec	Fri Apr  4 21:32:21 2008
@@ -1,8 +1,4 @@
 # $Revision$, $Date$
-# TOOD
-# - build time errors that are ignored:
-#   grep: /lib/modules/$(uname -r)/build/include/linux/usb.h: No such file or directory
-#
 # Conditional build:
 %bcond_without	dist_kernel	# without distribution kernel
 %bcond_without	kernel		# don't build kernel modules
@@ -32,8 +28,9 @@
 URL:		http://ndiswrapper.sourceforge.net/
 %if %{with kernel}
 %{?with_dist_kernel:BuildRequires:	kernel%{_alt_kernel}-module-build >= 2.6.8}
-BuildRequires:	rpmbuild(macros) >= 1.217
+BuildRequires:	rpmbuild(macros) >= 1.379
 %endif
+BuildRequires:	sed >= 4.0
 ExclusiveArch:	%{ix86} %{x8664}
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -115,41 +112,32 @@
 
 %prep
 %setup -q -n %{pname}-%{version}
+%{__sed} -i -e 's,CFLAGS = -g,CFLAGS = $(OPTFLAGS),' utils/Makefile
 
 %build
 %if %{with userspace}
 %{__make} -C utils \
 	CC="%{__cc}" \
-	CFLAGS="%{rpmcflags} -Wall -DUTILS_VERSION=\\\"\$(UTILS_VERSION)\\\""
+	OPTFLAGS="%{rpmcflags}"
 %endif
 
 %if %{with kernel}
 cd driver
-# kernel module(s)
-for cfg in %{?with_dist_kernel:%{?with_smp:smp} up}%{!?with_dist_kernel:nondist}; do
-    if [ ! -r "%{_kernelsrcdir}/config-$cfg" ]; then
-	exit 1
-    fi
-    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
-    %{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
-
-    %{__make} x86_64_stubs gen_exports \
-	KSRC=. \
-	KVERS="%{_kernel_ver}" \
-	%{?x8664:CONFIG_X86_64=y}
-    %{__make} -C %{_kernelsrcdir} clean \
-        RCS_FIND_IGNORE="-name '*.ko' -o" \
-        M=$PWD O=$PWD/o \
-        %{?with_verbose:V=1}
-    %{__make} -C %{_kernelsrcdir} modules \
-        RCS_FIND_IGNORE="-name '*.ko' -o" \
-        M=$PWD O=$PWD/o \
-        %{?with_verbose:V=1}
-     mv ndiswrapper{,-$cfg}.ko
-done
+
+%{__make} gen_exports \
+%ifarch %{x8664}
+	x86_64_stubs \
+	CONFIG_X86_64=y \
+%endif
+	KBUILD="%{_kernelsrcdir}"
+
+%build_kernel_modules -m ndiswrapper \
+	KBUILD="%{_kernelsrcdir}" \
+%ifarch %{x8664}
+	CONFIG_X86_64=y \
+%endif
+	KVERS="%{_kernel_ver}"
+
 %endif
 
 %install
@@ -218,6 +206,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.37.2.32  2008-04-04 19:32:21  glen
+- update to kernel build macros
+
 Revision 1.37.2.31  2008-04-04 19:20:45  glen
 - convert to utf8
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/ndiswrapper.spec?r1=1.37.2.31&r2=1.37.2.32&f=u



More information about the pld-cvs-commit mailing list