SPECS: kernel-net-zd1211.spec - use %build-kernel-modules

wolvverine wolvverine at pld-linux.org
Sat Mar 3 12:59:57 CET 2007


Author: wolvverine                   Date: Sat Mar  3 11:59:57 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use %build-kernel-modules

---- Files affected:
SPECS:
   kernel-net-zd1211.spec (1.19 -> 1.20) 

---- Diffs:

================================================================
Index: SPECS/kernel-net-zd1211.spec
diff -u SPECS/kernel-net-zd1211.spec:1.19 SPECS/kernel-net-zd1211.spec:1.20
--- SPECS/kernel-net-zd1211.spec:1.19	Tue Feb 13 09:06:37 2007
+++ SPECS/kernel-net-zd1211.spec	Sat Mar  3 12:59:51 2007
@@ -6,134 +6,117 @@
 # Conditional build:
 %bcond_without	dist_kernel	# allow non-distribution kernel
 %bcond_without	kernel		# don't build kernel modules
+%bcond_without	up		# don't build UP module
 %bcond_without	smp		# don't build SMP module
 %bcond_with	verbose		# verbose build (V=1)
 #
 %define		_zd1211_ver	0.0.2
 %define		_zd1211_name	zd1211-driver-r83
 %define		_rel		2
-Summary:	Linux driver for WLAN cards based on zd1211
-Summary(pl.UTF-8):	Sterownik dla Linuksa do kart bezprzewodowych opartych na układzie zd1211
-Name:		kernel-net-zd1211
+Summary:	Linux driver for USB WLAN cards based on zd1211
+Summary(pl.UTF-8):	Sterownik dla Linuksa do kart bezprzewodowych USB opartych na układzie zd1211
+Name:		zd1211
 Version:	%{_zd1211_ver}
 Release:	%{_rel}@%{_kernel_ver_str}
 License:	GPL v2
 Group:		Base/Kernel
 Source0:	http://zd1211.ath.cx/download/%{_zd1211_name}.tgz
 # Source0-md5:	a5751f0e6f1f368689077fa7758a4932
-Patch0:		%{name}-build.patch
+Patch0:		kernel-net-%{name}-build.patch
 URL:		http://zd1211.ath.cx/
-%if %{with kernel}
-%{?with_dist_kernel:BuildRequires:	kernel-module-build >= 3:2.6.7}
-%{?with_dist_kernel:%requires_releq_kernel_up}
-BuildRequires:	rpmbuild(macros) >= 1.153
+%{?with_dist_kernel:BuildRequires:	kernel%{_alt_kernel}-module-build >= 3:2.6.7}
+BuildRequires:	rpmbuild(macros) >= 1.330
 Requires(post,postun):	/sbin/depmod
-%{?with_dist_kernel:Requires(postun):	kernel}
-%endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
 This is a Linux driver for WLAN cards based on zd1211.
 
-This package contains Linux UP module.
-
 %description -l pl.UTF-8
 Sterownik dla Linuksa do kart bezprzewodowych opartych na układzie
 zd1211.
 
-Ten pakiet zawiera moduł jądra Linuksa UP.
+%description -l de.UTF-8
+Linux Kernel Treiber für WLAN Netzwerkkarten zd1211.
 
-%package -n kernel-smp-net-zd1211
-Summary:	Linux SMP driver for WLAN cards based on zd1211
-Summary(pl.UTF-8):	Sterownik dla Linuksa SMP do kart bezprzewodowych opartych na układzie zd1211
+%package -n kernel%{_alt_kernel}-net-%{name}
+Summary:	Linux kernel module for WLAN cards based on zd1211 
+Summary(de.UTF-8):	Linux Kernel Modul für WLAN Netzwerkkarten zd1211
+Summary(pl.UTF-8):	ModuÅ~B jÄ~Edra Linuksa dla kart WLAN na zd1211
 Release:	%{_rel}@%{_kernel_ver_str}
 Group:		Base/Kernel
-%{?with_dist_kernel:%requires_releq_kernel_smp}
+%{?with_dist_kernel:%requires_releq_kernel_up}
 Requires(post,postun):	/sbin/depmod
-%{?with_dist_kernel:Requires(postun):	kernel-smp}
+Requires:	module-init-tools >= 3.2.2-2
+Provides:	%{name}
 
-%description -n kernel-smp-net-zd1211
-This is a Linux driver for WLAN cards based on zd1211.
+%description -n kernel%{_alt_kernel}-net-%{name}
+This package contains Linux kernel drivers for the WLAN cards based on zd1211.
 
-This package contains Linux SMP module.
+%description -n kernel%{_alt_kernel}-net-%{name} -l de.UTF-8
+Dieses Paket enthält Linux Kernel Treiber für WLAN Netzwerkkarten zd1211.
 
-%description -n kernel-smp-net-zd1211 -l pl.UTF-8
-Sterownik dla Linuksa do kart bezprzewodowych opartych na układzie
-zd1211.
+%description -n kernel%{_alt_kernel}-net-%{name} -l pl.UTF-8
+Ten pakiet zawiera sterowniki jÄ~Edra Linuksa dla kart WLAN na zd1211.
+
+%package -n kernel%{_alt_kernel}-smp-net-%{name}
+Summary:	Linux SMP kernel module for the WLAN cards based on zd1211.
+Summary(de.UTF-8):	Linux SMP Kernel Modul für WLAN Netzwerkkarten zd1211
+Summary(pl.UTF-8):	ModuÅ~B jÄ~Edra Linuksa SMP dla kart WLAN na zd1211
+Release:	%{_rel}@%{_kernel_ver_str}
+Group:		Base/Kernel
+%{?with_dist_kernel:%requires_releq_kernel_smp}
+Requires(post,postun):	/sbin/depmod
+Requires:	module-init-tools >= 3.2.2-2
+Provides:	%{name}
+
+%description -n kernel%{_alt_kernel}-smp-net-%{name}
+This package contains Linux SMP kernel drivers for the WLAN cards based on zd1211.
 
-Ten pakiet zawiera moduł jądra Linuksa SMP.
+%description -n kernel%{_alt_kernel}-smp-net-%{name} -l de.UTF-8
+Dieses Paket enthält Linux SMP Kernel Treiber für WLAN Netzwerkkarten zd1211.
+
+%description -n kernel%{_alt_kernel}-smp-net-%{name} -l pl.UTF-8
+Ten pakiet zawiera sterowniki jÄ~Edra Linuksa SMP dla kart WLAN opartych na ukÅ~Badzie zd1211.
 
 %prep
 %setup -q -n %{_zd1211_name}
-#%patch0 -p1
+%patch0 -p1
 
 %build
-# 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
-    for t in zd1211 zd1211b; do
-	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} -C %{_kernelsrcdir} clean \
-		RCS_FIND_IGNORE="-name '*.ko' -o" \
-		M=$PWD O=$PWD/o \
-		%{?with_verbose:V=1}
-	%{__make} -C %{_kernelsrcdir} modules \
-		`[ "$t" = "zd1211" ] && echo ZD1211REV_B=0 || echo ZD1211REV_B=1` \
-		CC="%{__cc}" CPP="%{__cpp}" \
-		M=$PWD O=$PWD/o \
-		%{?with_verbose:V=1}
-
-		for i in $t; do
-			mv $i{,-$cfg}.ko
-		done
-    done
-done
+%build_kernel_modules -m zd1211
 
 %install
 rm -rf $RPM_BUILD_ROOT
-
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/usb/net
-for i in zd1211 zd1211b; do
-	install $i-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
-		$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/usb/net/$i.ko
-done
-%if %{with smp} && %{with dist_kernel}
-for i in zd1211 zd1211b; do
-	install $i-smp.ko \
-		$RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/usb/net/$i.ko
-done
-%endif
+%install_kernel_modules -m zd1211 -d /kernel/drivers/usb/net
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-%depmod %{_kernel_ver}
+%post	-n kernel%{_alt_kernel}-net-%{name}
+%depmod	%{_kernel_ver}
 
-%postun
-%depmod %{_kernel_ver}
+%postun	-n kernel%{_alt_kernel}-net-%{name}
+%depmod	%{_kernel_ver}
 
-%post -n kernel-smp-net-zd1211
-%depmod %{_kernel_ver}smp
+%post	-n kernel%{_alt_kernel}-smp-net-%{name}
+%depmod	%{_kernel_ver}smp
 
-%postun -n kernel-smp-net-zd1211
-%depmod %{_kernel_ver}smp
+%postun	-n kernel%{_alt_kernel}-smp-net-%{name}
+%depmod	%{_kernel_ver}smp
 
-%files
+%if %{with up} || %{without dist_kernel}
+%files -n kernel%{_alt_kernel}-net-%{name}
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}/kernel/drivers/usb/net/*.ko*
+#%{_sysconfdir}/modprobe.d/%{_kernel_ver}/%{name}.conf
+%endif
 
 %if %{with smp} && %{with dist_kernel}
-%files -n kernel-smp-net-zd1211
+%files -n kernel%{_alt_kernel}-smp-net-%{name}
 %defattr(644,root,root,755)
 /lib/modules/%{_kernel_ver}smp/kernel/drivers/usb/net/*.ko*
+#%{_sysconfdir}/modprobe.d/%{_kernel_ver}smp/%{name}.conf
 %endif
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -142,6 +125,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.20  2007/03/03 11:59:51  wolvverine
+- use %build-kernel-modules
+
 Revision 1.19  2007/02/13 08:06:37  glen
 - tabs in preamble
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/kernel-net-zd1211.spec?r1=1.19&r2=1.20&f=u



More information about the pld-cvs-commit mailing list