lkml.org 
[lkml]   [2023]   [Jan]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 3/5] kbuild: rpm-pkg: build binary packages from source rpm
Date
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.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

(no changes since v1)

scripts/Makefile.package | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/scripts/Makefile.package b/scripts/Makefile.package
index 5ac0a2dec01d..97e146885e53 100644
--- a/scripts/Makefile.package
+++ b/scripts/Makefile.package
@@ -72,11 +72,9 @@ quiet_cmd_tar = TAR $@
# 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
--
2.34.1
\
 
 \ /
  Last update: 2023-03-27 00:01    [W:0.064 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site