forked from pool/kernel-source
GIT Revision: 607101db1bcd777530c610daa81bbc716c183f20
OBS-URL: https://build.opensuse.org/package/show/Kernel:HEAD/kernel-source?expand=0&rev=7203
This commit is contained in:
committed by
Git OBS Bridge
parent
608c17b472
commit
04edbc6532
@@ -25,6 +25,7 @@
|
||||
%include %_sourcedir/kernel-spec-macros
|
||||
|
||||
%define build_flavor @FLAVOR@
|
||||
%define build_default (%build_flavor == "default")
|
||||
%define build_kdump (%build_flavor == "kdump")
|
||||
%define build_xen (%build_flavor == "xen" || %build_flavor == "ec2")
|
||||
%define build_vanilla (%build_flavor == "vanilla")
|
||||
@@ -134,6 +135,17 @@ Provides: kernel = %version-%source_rel
|
||||
@SOURCES@
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
ExclusiveArch: @ARCHS@
|
||||
%define kmp_target_cpu %_target_cpu
|
||||
%ifarch %ix86
|
||||
# Only i386/default supports i586, mark other flavors' packages as i686
|
||||
%if ! %build_default
|
||||
BuildArch: i686
|
||||
# KMPs are always built as i586, because rpm does not allow to build
|
||||
# subpackages for different architectures. Therefore, we change the
|
||||
# /usr/src/linux-obj/<arch> symlink to i586.
|
||||
%define kmp_target_cpu i586
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# These files are found in the kernel-source package:
|
||||
@NOSOURCE@
|
||||
@@ -548,9 +560,9 @@ if [ %CONFIG_MODULES = y ]; then
|
||||
# Some architecture's $(uname -m) output is different from the ARCH
|
||||
# parameter that needs to be passed to kbuild. Create symlinks from
|
||||
# $(uname -m) to the ARCH directory.
|
||||
if [ ! -e %rpm_install_dir/%_target_cpu ]; then
|
||||
ln -sf %cpu_arch %rpm_install_dir/%_target_cpu
|
||||
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%_target_cpu
|
||||
if [ ! -e %rpm_install_dir/%kmp_target_cpu ]; then
|
||||
ln -sf %cpu_arch %rpm_install_dir/%kmp_target_cpu
|
||||
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%kmp_target_cpu
|
||||
fi
|
||||
|
||||
# We were building in %my_builddir/linux-%srcversion, but the sources will
|
||||
@@ -825,9 +837,9 @@ kernel module packages) against the %build_flavor flavor of the kernel.
|
||||
%dir /usr/src/linux-obj/%cpu_arch
|
||||
%ghost /usr/src/linux-obj/%cpu_arch_flavor
|
||||
%obj_install_dir/%cpu_arch_flavor
|
||||
%if %_target_cpu != %cpu_arch
|
||||
%obj_install_dir/%_target_cpu
|
||||
/usr/src/linux-obj/%_target_cpu
|
||||
%if %kmp_target_cpu != %cpu_arch
|
||||
%obj_install_dir/%kmp_target_cpu
|
||||
/usr/src/linux-obj/%kmp_target_cpu
|
||||
%endif
|
||||
%endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user