hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/scripts/package/mkspec
....@@ -12,6 +12,7 @@
1212 # how we were called determines which rpms we build and how we build them
1313 if [ "$1" = prebuilt ]; then
1414 S=DEL
15
+ MAKE="$MAKE -f $srctree/Makefile"
1516 else
1617 S=
1718 fi
....@@ -28,9 +29,9 @@
2829
2930 PROVIDES="$PROVIDES kernel-$KERNELRELEASE"
3031 __KERNELRELEASE=$(echo $KERNELRELEASE | sed -e "s/-/_/g")
31
-EXCLUDES="$RCS_TAR_IGNORE --exclude=.tmp_versions --exclude=*vmlinux* \
32
+EXCLUDES="$RCS_TAR_IGNORE --exclude=*vmlinux* --exclude=*.mod \
3233 --exclude=*.o --exclude=*.ko --exclude=*.cmd --exclude=Documentation \
33
---exclude=.config.old --exclude=.missing-syscalls.d"
34
+--exclude=.config.old --exclude=.missing-syscalls.d --exclude=*.s"
3435
3536 # We can label the here-doc lines for conditional output to the spec file
3637 #
....@@ -45,7 +46,7 @@
4546 License: GPL
4647 Group: System Environment/Kernel
4748 Vendor: The Linux Community
48
- URL: http://www.kernel.org
49
+ URL: https://www.kernel.org
4950 $S Source: kernel-$__KERNELRELEASE.tar.gz
5051 Provides: $PROVIDES
5152 %define __spec_install_post /usr/lib/rpm/brp-compress || :
....@@ -78,19 +79,19 @@
7879 $S %setup -q
7980 $S
8081 $S %build
81
-$S make %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}
82
+$S $MAKE %{?_smp_mflags} KBUILD_BUILD_VERSION=%{release}
8283 $S
8384 %install
8485 mkdir -p %{buildroot}/boot
8586 %ifarch ia64
8687 mkdir -p %{buildroot}/boot/efi
87
- cp \$(make image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE
88
+ cp \$($MAKE -s image_name) %{buildroot}/boot/efi/vmlinuz-$KERNELRELEASE
8889 ln -s efi/vmlinuz-$KERNELRELEASE %{buildroot}/boot/
8990 %else
90
- cp \$(make image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE
91
+ cp \$($MAKE -s image_name) %{buildroot}/boot/vmlinuz-$KERNELRELEASE
9192 %endif
92
-$M make %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} KBUILD_SRC= modules_install
93
- make %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr KBUILD_SRC= headers_install
93
+$M $MAKE %{?_smp_mflags} INSTALL_MOD_PATH=%{buildroot} modules_install
94
+ $MAKE %{?_smp_mflags} INSTALL_HDR_PATH=%{buildroot}/usr headers_install
9495 cp System.map %{buildroot}/boot/System.map-$KERNELRELEASE
9596 cp .config %{buildroot}/boot/config-$KERNELRELEASE
9697 bzip2 -9 --keep vmlinux