History

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

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

Masahiro Yamada committed 3 years ago

Commit d5d2d4c1 parent fe66b5d1 file · +1 −3Browse files

Showing the changes to scripts/package (1 of 1 file). Show all

Unified · Split

scripts/package/mkspec+1−3
@@ -27,8 +27,6 @@ else · 26 unmodified lines
2727 M=DEL
2828 fi
2929
30−__KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
31−
3230 # We can label the here-doc lines for conditional output to the spec file
3331 #
3432 # Labels:
@@ -43,7 +41,7 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF · 8 unmodified lines
4341
4442 Name: kernel
4543 Summary: The Linux Kernel
46− Version: $__KERNELRELEASE
44+ Version: %(echo %{KERNELRELEASE} | sed -e 's/-/_/g')
4745 Release: $(cat .version 2>/dev/null || echo 1)
4846 License: GPL
4947 Group: System Environment/Kernel