diff --git a/kernel.spec b/kernel.spec index 58f3224..6f0ae12 100644 --- a/kernel.spec +++ b/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