History

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.

Masahiro Yamada committed 3 years ago

Commit 1ec9bb71 parent 7bf45821 file · +3 −5Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/Makefile.package+3−5
@@ -87,11 +87,9 @@ linux.tar.gz: .tmp_filelist · 86 unmodified lines
87# rpm-pkg87# rpm-pkg
88# ---------------------------------------------------------------------------88# ---------------------------------------------------------------------------
89PHONY += rpm-pkg89PHONY += rpm-pkg
90rpm-pkg:90rpm-pkg: srpm = $(shell rpmspec --srpm --query --queryformat='%{name}-%{VERSION}-%{RELEASE}.src.rpm' kernel.spec)
91 $(MAKE) clean91rpm-pkg: srcrpm-pkg
92 $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec92 +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -rb $(srpm) \
93 $(call cmd,src_tar,$(KERNELPATH),kernel.spec)
94 +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -ta $(KERNELPATH).tar.gz \
95 --define='_smp_mflags %{nil}'93 --define='_smp_mflags %{nil}'
96 94
97# srcrpm-pkg95# srcrpm-pkg