SPECS: kernel-vanilla.spec - build outside sourcedir

glen glen at pld-linux.org
Wed Jan 30 00:01:07 CET 2008


Author: glen                         Date: Tue Jan 29 23:01:07 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- build outside sourcedir

---- Files affected:
SPECS:
   kernel-vanilla.spec (1.82 -> 1.83) 

---- Diffs:

================================================================
Index: SPECS/kernel-vanilla.spec
diff -u SPECS/kernel-vanilla.spec:1.82 SPECS/kernel-vanilla.spec:1.83
--- SPECS/kernel-vanilla.spec:1.82	Tue Jan 29 22:34:33 2008
+++ SPECS/kernel-vanilla.spec	Wed Jan 30 00:01:02 2008
@@ -27,7 +27,7 @@
 
 %define		_basever	2.6.24
 %define		_postver	%{nil}
-%define		_rel		0.2
+%define		_rel		0.3
 
 # for rc kernels basever is the version patch (source1) should be applied to
 #%define		_ver		2.6.20
@@ -120,7 +120,10 @@
 %define		kernel_release %{version}_%{alt_kernel}-%{_localversion}
 %define		_kernelsrcdir	/usr/src/linux-%{version}_%{alt_kernel}
 
-%define	CommonOpts	HOSTCC="%{__cc}" HOSTCFLAGS="-Wall -Wstrict-prototypes %{rpmcflags} -fomit-frame-pointer"
+# where compiled objects go
+%define	objdir	%{_builddir}/%{name}-%{version}/o
+
+%define	CommonOpts	HOSTCC="%{__cc}" HOSTCFLAGS="-Wall -Wstrict-prototypes %{rpmcflags} -fomit-frame-pointer" O=%{objdir}
 %if "%{_target_base_arch}" != "%{_arch}"
 	%define	MakeOpts %{CommonOpts} ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-pld-linux-
 	%define	DepMod /bin/true
@@ -350,7 +353,8 @@
 Documentation.
 
 %prep
-%setup -q -n linux-%{_basever}
+%setup -qc
+cd linux-%{_basever}
 
 %if "%{_postver}" != "%{nil}"
 %{__bzip2} -dc %{SOURCE1} | %{__patch} -p1 -s
@@ -377,9 +381,8 @@
 ln -s %{SOURCE2} scripts/kernel-module-build.pl
 
 %build
-TuneUpConfigForIX86 () {
-	set -x
-}
+cd linux-%{_basever}
+install -d %{objdir}
 
 # produce kernel-config.py format config for arch/ARCH/defconfig.conf
 pykconfig() {
@@ -451,6 +454,7 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
+cd linux-%{_basever}
 
 # /lib/modules
 %{__make} %{MakeOpts} %{!?with_verbose:-s} modules_install \
@@ -759,6 +763,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.83  2008-01-29 23:01:02  glen
+- build outside sourcedir
+
 Revision 1.82  2008-01-29 21:34:33  glen
 - build and source symlinks packaged
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/kernel-vanilla.spec?r1=1.82&r2=1.83&f=u



More information about the pld-cvs-commit mailing list