SPECS: kernel-net-e1000.spec - fixed build on ppc and sparc (copy-...

paszczus paszczus at pld-linux.org
Sun Nov 13 14:34:03 CET 2005


Author: paszczus                     Date: Sun Nov 13 13:34:03 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- fixed build on ppc and sparc (copy->paste arekm`s and sparky`s changes from shfs.spec)
- release 1

---- Files affected:
SPECS:
   kernel-net-e1000.spec (1.40 -> 1.41) 

---- Diffs:

================================================================
Index: SPECS/kernel-net-e1000.spec
diff -u SPECS/kernel-net-e1000.spec:1.40 SPECS/kernel-net-e1000.spec:1.41
--- SPECS/kernel-net-e1000.spec:1.40	Sun Nov 13 14:12:52 2005
+++ SPECS/kernel-net-e1000.spec	Sun Nov 13 14:33:58 2005
@@ -9,7 +9,7 @@
 Summary(pl):	Sterownik do karty Intel(R) PRO/1000
 Name:		kernel-net-e1000
 Version:	6.2.15
-%define		_rel	0.1
+%define		_rel	1
 Release:	%{_rel}@%{_kernel_ver_str}
 License:	GPL v2
 Vendor:		Intel Corporation
@@ -19,6 +19,9 @@
 URL:		http://support.intel.com/support/network/adapter/index.htm#PRO/1000
 %{?with_dist_kernel:BuildRequires:	kernel-module-build >= 2.6.7}
 BuildRequires:	rpmbuild(macros) >= 1.211
+%ifarch sparc
+BuildRequires:	crosssparc64-gcc
+%endif
 Requires(post,postun):	/sbin/depmod
 %if %{with dist_kernel}
 %requires_releq_kernel_up
@@ -29,6 +32,11 @@
 Obsoletes:	linux-net-e1000
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%ifarch sparc
+%define         _target_base_arch       sparc64
+%define         _target_cpu             sparc64
+%endif
+
 %description
 This package contains the Linux driver for the Intel(R) PRO/1000
 family of 10/100/1000 Ethernet network adapters.
@@ -72,7 +80,17 @@
 	install -d include/{linux,config}
 	ln -sf %{_kernelsrcdir}/config-$cfg .config
 	ln -sf %{_kernelsrcdir}/include/linux/autoconf-$cfg.h include/linux/autoconf.h
+%ifarch ppc
+	if [ -d "%{_kernelsrcdir}/include/asm-powerpc" ]; then
+		install -d include/asm
+		cp -a %{_kernelsrcdir}/include/asm-%{_target_base_arch}/* include/asm
+		cp -a %{_kernelsrcdir}/include/asm-powerpc/* include/asm
+	else
+		ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
+	fi
+%else
 	ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm
+%endif
 	ln -sf %{_kernelsrcdir}/Module.symvers-$cfg Module.symvers
 	touch include/config/MARKER
 
@@ -86,6 +104,11 @@
 		M=$PWD O=$PWD \
 		%{?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}" \
 		EXTRA_CFLAGS='-DE1000_NAPI' \
 		CC="%{__cc}" CPP="%{__cpp}" \
 		M=$PWD O=$PWD \
@@ -140,6 +163,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.41  2005/11/13 13:33:58  paszczus
+- fixed build on ppc and sparc (copy->paste arekm`s and sparky`s changes from shfs.spec)
+- release 1
+
 Revision 1.40  2005/11/13 13:12:52  paszczus
 - updated to 6.2.15 ; rel 0.1 (need test-build on builders @ 2.6.14.2)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/kernel-net-e1000.spec?r1=1.40&r2=1.41&f=u




More information about the pld-cvs-commit mailing list