kbuild: rpm-pkg: introduce %{with_devel} switch to select devel package

scripts/package/mkspec preprocesses the spec file by sed, but it is
unreadable. This commit removes the last portion of the sed scripting.

Remove the $S$M prefixes from the conditionally generated lines.
Instead, surround the code with %if %{with_devel} ... %endif.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
Masahiro Yamada
2023-07-22 13:48:01 +09:00
parent b537925fdd
commit 2a291fc315
2 changed files with 26 additions and 29 deletions

View File

@@ -89,7 +89,7 @@ binrpm-pkg:
$(CONFIG_SHELL) $(MKSPEC) prebuilt > $(objtree)/binkernel.spec
+rpmbuild $(RPMOPTS) --define "_builddir $(objtree)" --target \
$(UTS_MACHINE)-linux -bb $(objtree)/binkernel.spec \
--build-in-place --noprep --define='_smp_mflags %{nil}' \
--build-in-place --noprep --define='_smp_mflags %{nil}' --without devel \
--define='make $(MAKE)'
# deb-pkg srcdeb-pkg bindeb-pkg