Commit d5d2d4cc authored by Masahiro Yamada's avatar Masahiro Yamada

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

Avoid hard-coding the Version field in the generated spec file.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent fe66b5d2
...@@ -27,8 +27,6 @@ else ...@@ -27,8 +27,6 @@ else
M=DEL M=DEL
fi fi
__KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
# We can label the here-doc lines for conditional output to the spec file # We can label the here-doc lines for conditional output to the spec file
# #
# Labels: # Labels:
...@@ -43,7 +41,7 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF ...@@ -43,7 +41,7 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
Name: kernel Name: kernel
Summary: The Linux Kernel Summary: The Linux Kernel
Version: $__KERNELRELEASE Version: %(echo %{KERNELRELEASE} | sed -e 's/-/_/g')
Release: $(cat .version 2>/dev/null || echo 1) Release: $(cat .version 2>/dev/null || echo 1)
License: GPL License: GPL
Group: System Environment/Kernel Group: System Environment/Kernel
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment