summaryrefslogtreecommitdiff
path: root/scripts/package/mkspec
diff options
context:
space:
mode:
authorIvan Vecera <ivecera@redhat.com>2022-11-21 17:48:45 +0300
committerMasahiro Yamada <masahiroy@kernel.org>2022-11-23 18:23:44 +0300
commit8818039f959b2efc0d6f2cb101f8061332f0c77e (patch)
tree95e72b716300841ea1980fc0825932459b6c1f36 /scripts/package/mkspec
parent598afa050403ddbb015ad4d9f8e6b911c3c93d33 (diff)
downloadlinux-8818039f959b2efc0d6f2cb101f8061332f0c77e.tar.xz
kbuild: add ability to make source rpm buildable using koji
Changes: - added new target 'srcrpm-pkg' to generate source rpm - added required build tools to spec file - removed locally compiled host tools to force their re-compile Signed-off-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: Jonathan Toppins <jtoppins@redhat.com> Acked-by: Íñigo Huguet <ihuguet@redhat.com> Tested-by: Ivan Vecera <ivecera@redhat.com> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/package/mkspec')
-rwxr-xr-xscripts/package/mkspec7
1 files changed, 7 insertions, 0 deletions
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 70392fd2fd29..dda00a948a01 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -33,6 +33,8 @@ 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,6 +51,9 @@ sed -e '/^DEL/d' -e 's/^\t*//' <<EOF
URL: https://www.kernel.org
$S Source: kernel-$__KERNELRELEASE.tar.gz
Provides: $PROVIDES
+$S BuildRequires: bc binutils bison dwarves elfutils-libelf-devel flex
+$S BuildRequires: gcc make openssl openssl-devel perl python3 rsync
+
# $UTS_MACHINE as a fallback of _arch in case
# /usr/lib/rpm/platform/*/macros was not included.
%define _arch %{?_arch:$UTS_MACHINE}
@@ -80,6 +85,8 @@ $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
$S %build
$S $MAKE %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}