mirror of
https://abf.rosa.ru/djam/kernel-5.10.git
synced 2025-02-24 17:22:50 +00:00
Fixed building of the RPM with the sources
It needs a valid .config file for the kernel, so use the config for nrj-desktop for that.
This commit is contained in:
parent
7427d5561d
commit
f30b4e83b7
1 changed files with 8 additions and 19 deletions
27
kernel.spec
27
kernel.spec
|
@ -646,16 +646,15 @@ sed -i 's/# CONFIG_DEBUG_INFO is not set/CONFIG_DEBUG_INFO=y\nCONFIG_DEBUG_INFO_
|
|||
./kernel-%{arch_suffix}.config
|
||||
%endif
|
||||
|
||||
FLAVOURS=""
|
||||
# We may not want to build nrj-desktop flavour in some cases but its config
|
||||
# is nice to have. It is used when preparing the RPM with the sources,
|
||||
# for example.
|
||||
FLAVOURS="nrj-desktop"
|
||||
cp %{SOURCE111} .
|
||||
|
||||
%if %{build_nrj_laptop}
|
||||
cp %{SOURCE112} .
|
||||
FLAVOURS="nrj-laptop ${FLAVOURS}"
|
||||
%endif
|
||||
|
||||
%if %{build_nrj_desktop}
|
||||
cp %{SOURCE111} .
|
||||
FLAVOURS="nrj-desktop ${FLAVOURS}"
|
||||
FLAVOURS="${FLAVOURS} nrj-laptop"
|
||||
%endif
|
||||
|
||||
CONFIG_DIR=arch/x86/configs
|
||||
|
@ -696,29 +695,19 @@ find . -name '.get_maintainer.ignore' | %kxargs rm -f
|
|||
PrepareKernel() {
|
||||
name=$1
|
||||
extension=$2
|
||||
%ifarch %{ix86} x86_64
|
||||
config_dir=arch/x86/configs
|
||||
%endif
|
||||
%ifarch %arm
|
||||
config_dir=arch/arm/configs
|
||||
%endif
|
||||
%ifarch aarc64
|
||||
config_dir=arch/arm64/configs
|
||||
%endif
|
||||
echo "Make config for kernel $extension"
|
||||
|
||||
%smake -s mrproper
|
||||
|
||||
if [ -z "$name" ]; then
|
||||
cp ${config_dir}/%{arch_suffix}_defconfig-desktop .config
|
||||
cp ${config_dir}/%{arch_suffix}_defconfig-nrj-desktop .config
|
||||
else
|
||||
cp ${config_dir}/%{arch_suffix}_defconfig-$name .config
|
||||
fi
|
||||
|
||||
# make sure EXTRAVERSION says what we want it to say
|
||||
LC_ALL=C perl -p -i -e "s/^EXTRAVERSION.*/EXTRAVERSION = -$extension/" Makefile
|
||||
|
||||
%smake oldconfig
|
||||
}
|
||||
|
||||
BuildKernel() {
|
||||
|
@ -1122,7 +1111,7 @@ chmod +x tools/power/cpupower/utils/version-gen.sh
|
|||
|
||||
# We don't make to repeat the depend code at the install phase
|
||||
%if %build_source
|
||||
PrepareKernel "" %{buildrpmrel}custom
|
||||
PrepareKernel "" %{buildrpmrel}-custom
|
||||
%smake -s mrproper
|
||||
%endif
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue