kbuild: rpm-pkg: derive the Version from %{KERNELRELEASE}

Avoid hard-coding the Version field in the generated spec file.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
Masahiro Yamada 2023-07-22 13:47:57 +09:00
parent fe66b5d2ae
commit d5d2d4cc60
1 changed files with 1 additions and 3 deletions

View File

@ -27,8 +27,6 @@ else
M=DEL
fi
__KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
# We can label the here-doc lines for conditional output to the spec file
#
# Labels:
@ -43,7 +41,7 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
Name: kernel
Summary: The Linux Kernel
Version: $__KERNELRELEASE
Version: %(echo %{KERNELRELEASE} | sed -e 's/-/_/g')
Release: $(cat .version 2>/dev/null || echo 1)
License: GPL
Group: System Environment/Kernel