SPECS: acx100.spec - sparc ready but doesn't build

arekm arekm at pld-linux.org
Sat Nov 12 12:12:26 CET 2005


Author: arekm                        Date: Sat Nov 12 11:12:26 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- sparc ready but doesn't build

---- Files affected:
SPECS:
   acx100.spec (1.43 -> 1.44) 

---- Diffs:

================================================================
Index: SPECS/acx100.spec
diff -u SPECS/acx100.spec:1.43 SPECS/acx100.spec:1.44
--- SPECS/acx100.spec:1.43	Thu Sep 15 20:25:04 2005
+++ SPECS/acx100.spec	Sat Nov 12 12:12:21 2005
@@ -21,8 +21,16 @@
 %{?with_dist_kernel:BuildRequires:	kernel-module-build >= 2.6.3}
 BuildRequires:	%{kgcc_package}
 BuildRequires:	rpmbuild(macros) >= 1.118
+%ifarch sparc
+BuildRequires:	crosssparc64-gcc
+%endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%ifarch sparc
+%define		_target_base_arch	sparc64
+%define		_target_base_cpu	sparc64
+%endif
+
 %description
 This is driver for WLAN card based on ACX100 for Linux.
 
@@ -80,10 +88,25 @@
 	chmod 700 modules
 	ln -sf %{_kernelsrcdir}/config-$cfg .config
 	ln -sf %{_kernelsrcdir}/include/linux/autoconf-${cfg}.h include/linux/autoconf.h
-	ln -sf %{_kernelsrcdir}/include/asm-%{_target_base_arch} include/asm #FIXME
+%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-powerpc 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
 	%{__make} -C %{_kernelsrcdir} modules \
+%if "%{_target_base_arch}" != "%{_arch}"
+                ARCH=%{_target_base_arch} \
+                CROSS_COMPILE=%{_target_base_cpu}-pld-linux- \
+%endif
+                HOSTCC="%{__cc}" \
 		SUBDIRS=$PWD/src \
 		O=$PWD \
 		%{?with_verbose:V=1}
@@ -144,6 +167,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.44  2005/11/12 11:12:21  arekm
+- sparc ready but doesn't build
+
 Revision 1.43  2005/09/15 18:25:04  sparky
 - prepared for kernel >= 2.6.13: link Module.symvers
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/acx100.spec?r1=1.43&r2=1.44&f=u




More information about the pld-cvs-commit mailing list