diff options
author | Ivan Vecera <ivecera@redhat.com> | 2022-11-21 09:48:45 -0500 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2022-11-24 00:23:44 +0900 |
commit | 8818039f959b2efc0d6f2cb101f8061332f0c77e (patch) | |
tree | 95e72b716300841ea1980fc0825932459b6c1f36 /scripts/Makefile.package | |
parent | 598afa050403ddbb015ad4d9f8e6b911c3c93d33 (diff) |
kbuild: add ability to make source rpm buildable using koji
Changes:
- added new target 'srcrpm-pkg' to generate source rpm
- added required build tools to spec file
- removed locally compiled host tools to force their re-compile
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Jonathan Toppins <jtoppins@redhat.com>
Acked-by: Íñigo Huguet <ihuguet@redhat.com>
Tested-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/Makefile.package')
-rw-r--r-- | scripts/Makefile.package | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/Makefile.package b/scripts/Makefile.package index 8bbcced67c22..1290f1c631fb 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -62,6 +62,16 @@ rpm-pkg: +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -ta $(KERNELPATH).tar.gz \ --define='_smp_mflags %{nil}' +# srcrpm-pkg +# --------------------------------------------------------------------------- +PHONY += srcrpm-pkg +srcrpm-pkg: + $(MAKE) clean + $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec + $(call cmd,src_tar,$(KERNELPATH),kernel.spec) + +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -ts $(KERNELPATH).tar.gz \ + --define='_smp_mflags %{nil}' --define='_srcrpmdir $(srctree)' + # binrpm-pkg # --------------------------------------------------------------------------- PHONY += binrpm-pkg |