kbuild: rpm-pkg: invoke the kernel build from rpmbuild for binrpm-pkg

To reduce the preprocess of the spec file, invoke the kernel build
from rpmbuild.

Run init/build-version to increment the release number not only for
binrpm-pkg but also for srcrpm-pkg and rpm-pkg.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
Masahiro Yamada
2023-07-22 13:47:59 +09:00
parent d4f651277e
commit 1789fc9125
2 changed files with 17 additions and 16 deletions
+1 -1
View File
@@ -86,10 +86,10 @@ srcrpm-pkg: linux.tar.gz
# ---------------------------------------------------------------------------
PHONY += binrpm-pkg
binrpm-pkg:
$(MAKE) -f $(srctree)/Makefile
$(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}' \
--define='make $(MAKE)'
# deb-pkg srcdeb-pkg bindeb-pkg