SPECS: btsco.spec - use new %build_kernel_modules macros

shadzik shadzik at pld-linux.org
Sun Dec 3 16:27:44 CET 2006


Author: shadzik                      Date: Sun Dec  3 15:27:44 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use new %build_kernel_modules macros

---- Files affected:
SPECS:
   btsco.spec (1.13 -> 1.14) 

---- Diffs:

================================================================
Index: SPECS/btsco.spec
diff -u SPECS/btsco.spec:1.13 SPECS/btsco.spec:1.14
--- SPECS/btsco.spec:1.13	Sun Dec  3 16:18:03 2006
+++ SPECS/btsco.spec	Sun Dec  3 16:27:36 2006
@@ -30,6 +30,7 @@
 BuildRequires:	bluez-libs-devel >= 2.21-1
 BuildRequires:	libao-devel >= 0.8.6-1
 BuildRequires:	libtool
+BuildRequires:	rpmbuild(macros) >= 1.330
 %endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -97,43 +98,7 @@
 %endif
 
 %if %{with kernel}
-cd kernel
-# 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
-%if %{with dist_kernel}
-	%{__make} -j1 -C %{_kernelsrcdir} O=$PWD/o prepare scripts
-%else
-	install -d o/include/config
-	touch o/include/config/MARKER
-	ln -sf %{_kernelsrcdir}/scripts o/scripts
-%endif
-
-	# patching/creating makefile(s) (optional)
-	%{__make} -C %{_kernelsrcdir} clean \
-		RCS_FIND_IGNORE="-name '*.ko' -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}
-
-	for mod in *.ko; do
-		mod=$(echo "$mod" | sed -e 's#\.ko##g')
-		mv $mod.ko ../$mod-$cfg.ko
-	done
-done
+%build_kernel_modules -m snd-bt-sco -C kernel
 %endif
 
 %install
@@ -148,28 +113,7 @@
 %endif
 
 %if %{with kernel}
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
-	%if %{without dist_kernel}
-	for mod in *-nondist.ko; do
-		nmod=$(echo "$mod" | sed -e 's#-nondist##g')
-		pwd
-		install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/$nmod
-	done
-	%else
-	for mod in *-up.ko; do
-		nmod=$(echo "$mod" | sed -e 's#-up##g')
-		pwd
-		install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/$nmod
-	done
-	%endif
-
-	%if %{with smp}
-	for mod in *-smp.ko; do
-		nmod=$(echo "$mod" | sed -e 's#-smp##g')
-		pwd
-		install $mod $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/$nmod
-	done
-	%endif
+%install_kernel_modules -m kernel/snd-bt-sco -d misc
 %endif
 
 %clean
@@ -220,6 +164,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.14  2006/12/03 15:27:36  shadzik
+- use new %build_kernel_modules macros
+
 Revision 1.13  2006/12/03 15:18:03  shadzik
 - 0.5
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/btsco.spec?r1=1.13&r2=1.14&f=u



More information about the pld-cvs-commit mailing list