File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,16 @@ rpm-pkg:
6262 +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -ta $(KERNELPATH).tar.gz \
6363 --define='_smp_mflags %{nil}'
6464
65+ # srcrpm-pkg
66+ # ---------------------------------------------------------------------------
67+ PHONY += srcrpm-pkg
68+ srcrpm-pkg:
69+ $(MAKE) clean
70+ $(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
71+ $(call cmd,src_tar,$(KERNELPATH),kernel.spec)
72+ +rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -ts $(KERNELPATH).tar.gz \
73+ --define='_smp_mflags %{nil}' --define='_srcrpmdir $(srctree)'
74+
6575# binrpm-pkg
6676# ---------------------------------------------------------------------------
6777PHONY += binrpm-pkg
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \
3333--exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \
3434--exclude=.config.old --exclude=.missing-syscalls.d --exclude=*.s"
3535
36+ test -n " $LOCALVERSION " && MAKE=" $MAKE LOCALVERSION=$LOCALVERSION "
37+
3638# We can label the here-doc lines for conditional output to the spec file
3739#
3840# Labels:
@@ -49,6 +51,9 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
4951 URL: https://www.kernel.org
5052$S Source: kernel-$__KERNELRELEASE .tar.gz
5153 Provides: $PROVIDES
54+ $S BuildRequires: bc binutils bison dwarves elfutils-libelf-devel flex
55+ $S BuildRequires: gcc make openssl openssl-devel perl python3 rsync
56+
5257 # $UTS_MACHINE as a fallback of _arch in case
5358 # /usr/lib/rpm/platform/*/macros was not included.
5459 %define _arch %{?_arch:$UTS_MACHINE }
@@ -80,6 +85,8 @@ $S$M against the $__KERNELRELEASE kernel package.
8085$S$M
8186$S %prep
8287$S %setup -q
88+ $S rm -f scripts/basic/fixdep scripts/kconfig/conf
89+ $S rm -f tools/objtool/{fixdep,objtool}
8390$S
8491$S %build
8592$S $MAKE %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}
You can’t perform that action at this time.
0 commit comments