Skip to content

Commit

Permalink
kbuild: rpm-pkg: build binary packages from source rpm
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
masahir0y committed Feb 26, 2023
1 parent 7bf4582 commit 1ec9bb7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/Makefile.package
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1ec9bb7

Please sign in to comment.