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

Unified · Split

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