SPECS: kernel-misc-toshbt.spec - use new %build_kernel_modules sys...

shadzik shadzik at pld-linux.org
Wed Apr 4 15:01:38 CEST 2007


Author: shadzik                      Date: Wed Apr  4 13:01:38 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use new %build_kernel_modules system
- use new kernel macros
- remove smp stuff
- fix Name
- add modprobe.d/toshbt.conf to %files

---- Files affected:
SPECS:
   kernel-misc-toshbt.spec (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: SPECS/kernel-misc-toshbt.spec
diff -u SPECS/kernel-misc-toshbt.spec:1.6 SPECS/kernel-misc-toshbt.spec:1.7
--- SPECS/kernel-misc-toshbt.spec:1.6	Mon Feb 12 23:09:10 2007
+++ SPECS/kernel-misc-toshbt.spec	Wed Apr  4 15:01:32 2007
@@ -1,13 +1,10 @@
 # $Revision$, $Date$
 #TODO
-#- spec filename vs Name
 #- udev rules
-#- modprobe.d
 #
 # Conditional build:
 %bcond_without	dist_kernel	# allow non-distribution kernel
-%bcond_without	kernel		# don't build kernel modules
-%bcond_without	smp		# don't build SMP module
+%bcond_without	kernel
 %bcond_with	verbose		# verbose build (V=1)
 #
 %if !%{with kernel}
@@ -17,18 +14,18 @@
 %define		_rel	1
 Summary:	Toshiba Laptop Bluetooth module
 Summary(pl.UTF-8):	Moduł Bluetooth dla laptopów Toshiby
-Name:		toshbt
+Name:		kernel%{_alt_kernel}-misc-toshbt
 Version:	1.0
 Release:	%{_rel}
 Epoch:		0
 License:	GPL
 Group:		Base/Kernel
-Source0:	http://0bits.com/toshbt/%{name}-%{version}.tar.gz
+Source0:	http://0bits.com/toshbt/toshbt-%{version}.tar.gz
 # Source0-md5:	8e4764f6c438427b00fb9aa93abb3cd7
 URL:		http://0bits.com/
 %if %{with kernel}
 %{?with_dist_kernel:BuildRequires:	kernel%{_alt_kernel}-module-build >= 3:2.6.14}
-BuildRequires:	rpmbuild(macros) >= 1.308
+BuildRequires:	rpmbuild(macros) >= 1.379
 %endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -45,8 +42,8 @@
 Group:		Base/Kernel
 Requires(post,postun):	/sbin/depmod
 %if %{with dist_kernel}
-%requires_releq_kernel_up
-Requires(postun):	%releq_kernel_up
+%requires_releq_kernel
+Requires(postun):	%releq_kernel
 %endif
 
 %description -n kernel%{_alt_kernel}-misc-%{name}
@@ -59,105 +56,30 @@
 
 Ten pakiet zawiera moduł jądra Linuksa.
 
-%package -n kernel%{_alt_kernel}-smp-misc-%{name}
-Summary:	Linux SMP driver for Toshiba Laptop Bluetooth.
-Summary(pl.UTF-8):	Sterownik dla Linuksa SMP  Bluetooth w Laptopach Toshiba.
-Release:	%{_rel}@%{_kernel_ver_str}
-Group:		Base/Kernel
-Requires(post,postun):	/sbin/depmod
-%if %{with dist_kernel}
-%requires_releq_kernel_smp
-Requires(postun):	%releq_kernel_smp
-%endif
-
-%description -n kernel%{_alt_kernel}-smp-misc-%{name}
-This is driver for Bluetooth in Toshiba Laptops for Linux.
-
-This package contains Linux SMP module.
-
-%description -n kernel%{_alt_kernel}-smp-misc-%{name} -l pl.UTF-8
-Sterownik dla Linuksa dla Bluetooth w Laptopach Toshiba.
-
-Ten pakiet zawiera moduł jądra Linuksa SMP.
-
 %prep
-%setup -q -n %{name}
+%setup -q -n toshbt
 
 %build
-
-%if %{with kernel}
-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
-
-	%{__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}
-
-	mv %{name}{,-$cfg}.ko
-done
-%endif
+%build_kernel_modules -m toshbt
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with kernel}
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/misc
-install %{name}-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
-	$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/misc/%{name}.ko
-%if %{with smp} && %{with dist_kernel}
-install %{name}-smp.ko \
-	$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/misc/%{name}.ko
-%endif
-%endif
+%install_kernel_modules -m toshbt -d misc -n toshbt -s current
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post	-n kernel%{_alt_kernel}-misc-%{name}
+%post	-n kernel%{_alt_kernel}-misc-toshbt
 %depmod %{_kernel_ver}
 
-%postun	-n kernel%{_alt_kernel}-misc-%{name}
+%postun	-n kernel%{_alt_kernel}-misc-toshbt
 %depmod %{_kernel_ver}
 
-%post	-n kernel%{_alt_kernel}-smp-misc-%{name}
-%depmod %{_kernel_ver}smp
-
-%postun	-n kernel%{_alt_kernel}-smp-misc-%{name}
-%depmod %{_kernel_ver}smp
-
-%if %{with kernel}
-%files -n kernel%{_alt_kernel}-misc-%{name}
+%files -n kernel%{_alt_kernel}-misc-toshbt
 %defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}/misc/*.ko*
-
-%if %{with smp} && %{with dist_kernel}
-%files -n kernel%{_alt_kernel}-smp-misc-%{name}
-%defattr(644,root,root,755)
-/lib/modules/%{_kernel_ver}smp/misc/*.ko*
-%endif
-%endif
+/etc/modprobe.d/%{_kernel_ver}/toshbt.conf
+/lib/modules/%{_kernel_ver}/misc/toshbt-current.ko*
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -165,6 +87,13 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.7  2007/04/04 13:01:32  shadzik
+- use new %build_kernel_modules system
+- use new kernel macros
+- remove smp stuff
+- fix Name
+- add modprobe.d/toshbt.conf to %files
+
 Revision 1.6  2007/02/12 22:09:10  glen
 - tabs in preamble
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/kernel-misc-toshbt.spec?r1=1.6&r2=1.7&f=u



More information about the pld-cvs-commit mailing list