summaryrefslogtreecommitdiff
path: root/scripts/package/mkspec
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/package/mkspec')
-rwxr-xr-xscripts/package/mkspec17
1 files changed, 8 insertions, 9 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index dda00a948a01..3c550960dd39 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -1,7 +1,7 @@
#!/bin/sh
#
# Output a simple RPM spec file.
-# This version assumes a minimum of RPM 4.0.3.
+# This version assumes a minimum of RPM 4.13
#
# The only gothic bit here is redefining install_post to avoid
# stripping the symbols from files in the kernel which we want
@@ -33,8 +33,6 @@ EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \
--exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \
--exclude=.config.old --exclude=.missing-syscalls.d --exclude=*.s"
-test -n "$LOCALVERSION" && MAKE="$MAKE LOCALVERSION=$LOCALVERSION"
-
# We can label the here-doc lines for conditional output to the spec file
#
# Labels:
@@ -49,9 +47,11 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
Group: System Environment/Kernel
Vendor: The Linux Community
URL: https://www.kernel.org
-$S Source: kernel-$__KERNELRELEASE.tar.gz
+$S Source0: linux.tar.gz
+$S Source1: .config
Provides: $PROVIDES
-$S BuildRequires: bc binutils bison dwarves elfutils-libelf-devel flex
+$S BuildRequires: bc binutils bison dwarves
+$S BuildRequires: (elfutils-libelf-devel or libelf-devel) flex
$S BuildRequires: gcc make openssl openssl-devel perl python3 rsync
# $UTS_MACHINE as a fallback of _arch in case
@@ -84,12 +84,11 @@ $S$M This package provides kernel headers and makefiles sufficient to build modu
$S$M against the $__KERNELRELEASE kernel package.
$S$M
$S %prep
-$S %setup -q
-$S rm -f scripts/basic/fixdep scripts/kconfig/conf
-$S rm -f tools/objtool/{fixdep,objtool}
+$S %setup -q -n linux
+$S cp %{SOURCE1} .
$S
$S %build
-$S $MAKE %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}
+$S $MAKE %{?_smp_mflags} KERNELRELEASE=$KERNELRELEASE KBUILD_BUILD_VERSION=%{release}
$S
%install
mkdir -p %{buildroot}/boot