Avoid hard-coding the Version field in the generated spec file.
Showing the changes to scripts/package (1 of 1 file). Show all
Unified · Split
| @@ -27,8 +27,6 @@ else · 26 unmodified lines | ||
| 27 | 27 | M=DEL |
| 28 | 28 | fi |
| 29 | 29 | |
| 30 | −__KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g") | |
| 31 | − | |
| 32 | 30 | # We can label the here-doc lines for conditional output to the spec file |
| 33 | 31 | # |
| 34 | 32 | # Labels: |
| @@ -43,7 +41,7 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF · 8 unmodified lines | ||
| 43 | 41 | |
| 44 | 42 | Name: kernel |
| 45 | 43 | Summary: The Linux Kernel |
| 46 | − Version: $__KERNELRELEASE | |
| 44 | + Version: %(echo %{KERNELRELEASE} | sed -e 's/-/_/g') | |
| 47 | 45 | Release: $(cat .version 2>/dev/null || echo 1) |
| 48 | 46 | License: GPL |
| 49 | 47 | Group: System Environment/Kernel |