File tree Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Expand file tree Collapse file tree 4 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ modules.order
78
78
# RPM spec file (make rpm-pkg)
79
79
#
80
80
/* .spec
81
+ /rpmbuild /
81
82
82
83
#
83
84
# Debian directory (make deb-pkg)
Original file line number Diff line number Diff line change @@ -1605,7 +1605,7 @@ MRPROPER_FILES += include/config include/generated \
1605
1605
certs/signing_key.pem \
1606
1606
certs/x509.genkey \
1607
1607
vmlinux-gdb.py \
1608
- *.spec \
1608
+ *.spec rpmbuild \
1609
1609
rust/libmacros.so
1610
1610
1611
1611
# clean - Delete most, but leave enough to build external modules
Original file line number Diff line number Diff line change @@ -89,7 +89,7 @@ PHONY += srcrpm-pkg
89
89
srcrpm-pkg: linux.tar.gz
90
90
$(CONFIG_SHELL) $(MKSPEC) >$(objtree)/kernel.spec
91
91
+rpmbuild $(RPMOPTS) --target $(UTS_MACHINE)-linux -bs kernel.spec \
92
- --define='_smp_mflags %{nil}' --define='_sourcedir . ' --define='_srcrpmdir .'
92
+ --define='_smp_mflags %{nil}' --define='_sourcedir rpmbuild/SOURCES ' --define='_srcrpmdir .'
93
93
94
94
# binrpm-pkg
95
95
# ---------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -15,15 +15,19 @@ if [ "$1" = prebuilt ]; then
15
15
MAKE=" $MAKE -f $srctree /Makefile"
16
16
else
17
17
S=
18
+
19
+ mkdir -p rpmbuild/SOURCES
20
+ cp linux.tar.gz rpmbuild/SOURCES
21
+ cp " ${KCONFIG_CONFIG} " rpmbuild/SOURCES/config
18
22
fi
19
23
20
- if grep -q CONFIG_MODULES=y . config; then
24
+ if grep -q CONFIG_MODULES=y include/ config/auto.conf ; then
21
25
M=
22
26
else
23
27
M=DEL
24
28
fi
25
29
26
- if grep -q CONFIG_DRM=y . config; then
30
+ if grep -q CONFIG_DRM=y include/ config/auto.conf ; then
27
31
PROVIDES=kernel-drm
28
32
fi
29
33
@@ -48,7 +52,7 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
48
52
Vendor: The Linux Community
49
53
URL: https://www.kernel.org
50
54
$S Source0: linux.tar.gz
51
- $S Source1: . config
55
+ $S Source1: config
52
56
Provides: $PROVIDES
53
57
$S BuildRequires: bc binutils bison dwarves
54
58
$S BuildRequires: (elfutils-libelf-devel or libelf-devel) flex
@@ -85,7 +89,7 @@ $S$M against the $__KERNELRELEASE kernel package.
85
89
$S$M
86
90
$S %prep
87
91
$S %setup -q -n linux
88
- $S cp %{SOURCE1} .
92
+ $S cp %{SOURCE1} .config
89
93
$S
90
94
$S %build
91
95
$S $MAKE %{?_smp_mflags} KERNELRELEASE=$KERNELRELEASE KBUILD_BUILD_VERSION=%{release}
You can’t perform that action at this time.
0 commit comments