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
27 M=DEL27 M=DEL
28fi28fi
29 29
30__KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
31
32# We can label the here-doc lines for conditional output to the spec file30# We can label the here-doc lines for conditional output to the spec file
33#31#
34# Labels:32# Labels:
@@ -43,7 +41,7 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF · 8 unmodified lines
43 41
44 Name: kernel42 Name: kernel
45 Summary: The Linux Kernel43 Summary: The Linux Kernel
46 Version: $__KERNELRELEASE44 Version: %(echo %{KERNELRELEASE} | sed -e 's/-/_/g')
47 Release: $(cat .version 2>/dev/null || echo 1)45 Release: $(cat .version 2>/dev/null || echo 1)
48 License: GPL46 License: GPL
49 Group: System Environment/Kernel47 Group: System Environment/Kernel