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:
62
62
+rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -ta $(KERNELPATH).tar.gz \
63
63
--define='_smp_mflags %{nil}'
64
64
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
+
65
75
# binrpm-pkg
66
76
# ---------------------------------------------------------------------------
67
77
PHONY += binrpm-pkg
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \
33
33
--exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \
34
34
--exclude=.config.old --exclude=.missing-syscalls.d --exclude=*.s"
35
35
36
+ test -n " $LOCALVERSION " && MAKE=" $MAKE LOCALVERSION=$LOCALVERSION "
37
+
36
38
# We can label the here-doc lines for conditional output to the spec file
37
39
#
38
40
# Labels:
@@ -49,6 +51,9 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
49
51
URL: https://www.kernel.org
50
52
$S Source: kernel-$__KERNELRELEASE .tar.gz
51
53
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
+
52
57
# $UTS_MACHINE as a fallback of _arch in case
53
58
# /usr/lib/rpm/platform/*/macros was not included.
54
59
%define _arch %{?_arch:$UTS_MACHINE }
@@ -80,6 +85,8 @@ $S$M against the $__KERNELRELEASE kernel package.
80
85
$S$M
81
86
$S %prep
82
87
$S %setup -q
88
+ $S rm -f scripts/basic/fixdep scripts/kconfig/conf
89
+ $S rm -f tools/objtool/{fixdep,objtool}
83
90
$S
84
91
$S %build
85
92
$S $MAKE %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}
You can’t perform that action at this time.
0 commit comments