diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2023-02-15 10:20:25 +0900 |
---|---|---|
committer | Masahiro Yamada <masahiroy@kernel.org> | 2023-02-26 15:18:47 +0900 |
commit | 1ec9bb704faf50c48727b5daa33bc42e7334db60 (patch) | |
tree | e96d7f1c5058b83885f485718f877acc004c378d | |
parent | 7bf4582d7aad870ecb4f760743307ecba7a960f4 (diff) | |
download | linux-1ec9bb704faf50c48727b5daa33bc42e7334db60.tar.gz linux-1ec9bb704faf50c48727b5daa33bc42e7334db60.tar.bz2 linux-1ec9bb704faf50c48727b5daa33bc42e7334db60.zip |
kbuild: rpm-pkg: build binary packages from source rpm
The build rules of rpm-pkg and srcrpm-pkg are almost the same.
Remove the code duplication.
Change rpm-pkg to build binary packages from the source package generated
by srcrpm-pkg.
This changes the output directory of the srpm generated by 'make rpm-pkg'
because srcrpm-pkg overrides _srcrpmdir.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
-rw-r--r-- | scripts/Makefile.package | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/Makefile.package b/scripts/Makefile.package index f0002ace4156..55441d776d70 100644 --- a/scripts/Makefile.package +++ b/scripts/Makefile.package @@ -87,11 +87,9 @@ linux.tar.gz: .tmp_filelist # rpm-pkg # --------------------------------------------------------------------------- PHONY += rpm-pkg -rpm-pkg: - $(MAKE) clean - $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec - $(call cmd,src_tar,$(KERNELPATH),kernel.spec) - +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -ta $(KERNELPATH).tar.gz \ +rpm-pkg: srpm = $(shell rpmspec --srpm --query --queryformat='%{name}-%{VERSION}-%{RELEASE}.src.rpm' kernel.spec) +rpm-pkg: srcrpm-pkg + +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -rb $(srpm) \ --define='_smp_mflags %{nil}' # srcrpm-pkg |