SPECS: kernel-net-r1000.spec - use %build_kernel_modules, %install...
vip
vip at pld-linux.org
Fri Nov 17 16:22:32 CET 2006
Author: vip Date: Fri Nov 17 15:22:32 2006 GMT
Module: SPECS Tag: HEAD
---- Log message:
- use %build_kernel_modules, %install_kernel_modules
- request for comments: what with "ifarch ppc" and "_target_base_arch != _arch" in %build section?
---- Files affected:
SPECS:
kernel-net-r1000.spec (1.2 -> 1.3)
---- Diffs:
================================================================
Index: SPECS/kernel-net-r1000.spec
diff -u SPECS/kernel-net-r1000.spec:1.2 SPECS/kernel-net-r1000.spec:1.3
--- SPECS/kernel-net-r1000.spec:1.2 Sun Nov 5 02:39:25 2006
+++ SPECS/kernel-net-r1000.spec Fri Nov 17 16:22:26 2006
@@ -18,7 +18,7 @@
Patch0: %{name}-module_parm.patch
URL: http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=5&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#RTL8111B/RTL8168B/RTL8111/RTL8168
%{?with_dist_kernel:BuildRequires: kernel-module-build >= 3:2.6.7}
-BuildRequires: rpmbuild(macros) >= 1.211
+BuildRequires: rpmbuild(macros) >= 1.330
Requires(post,postun): /sbin/depmod
%if %{with dist_kernel}
%requires_releq_kernel_up
@@ -62,56 +62,12 @@
%build
cd src
mv Makefile{_linux26x,}
-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,config}
- 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
-%ifarch ppc
- if [ -d "%{_kernelsrcdir}/include/asm-powerpc" ]; then
- install -d o/include/asm
- cp -a %{_kernelsrcdir}/include/asm-%{_target_base_arch}/* o/include/asm
- cp -a %{_kernelsrcdir}/include/asm-powerpc/* o/include/asm
- else
- ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} o/include/asm
- fi
-%else
- ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} o/include/asm
-%endif
-
- %{__make} -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 \
-%if "%{_target_base_arch}" != "%{_arch}"
- ARCH=%{_target_base_arch} \
- CROSS_COMPILE=%{_target_cpu}-pld-linux- \
-%endif
- HOSTCC="%{__cc}" \
- M=$PWD O=$PWD/o \
- %{?with_verbose:V=1}
-
- mv r1000{,-$cfg}.ko
-done
+%build_kernel_modules -m r1000
%install
rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}{,smp}/kernel/drivers/net
-cd src
-install r1000-%{?with_dist_kernel:up}%{!?with_dist_kernel:nondist}.ko \
- $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}/kernel/drivers/net/r1000.ko
-%if %{with smp} && %{with dist_kernel}
-install r1000-smp.ko \
- $RPM_BUILD_ROOT/lib/modules/%{_kernel_ver}smp/kernel/drivers/net/r1000.ko
-%endif
-cd ..
+%install_kernel_modules -m src/r1000 -d kernel/drivers/net
%clean
rm -rf $RPM_BUILD_ROOT
@@ -146,6 +102,10 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.3 2006/11/17 15:22:26 vip
+- use %build_kernel_modules, %install_kernel_modules
+- request for comments: what with "ifarch ppc" and "_target_base_arch != _arch" in %build section?
+
Revision 1.2 2006/11/05 01:39:25 qboosh
- cosmetics
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/kernel-net-r1000.spec?r1=1.2&r2=1.3&f=u
More information about the pld-cvs-commit
mailing list