fix rpmbuild error with patches

This commit is contained in:
gouhao 2021-08-03 09:45:16 +08:00
parent 5c2f234c8a
commit 6a5f6ab41d

View File

@ -32,15 +32,12 @@
Name: kernel
Version: 4.19.194
Release: %{hulkrelease}.0086
Release: %{hulkrelease}.0087
Summary: Linux Kernel
License: GPLv2
URL: http://www.kernel.org/
%if 0%{?with_patch}
Source0: linux-%{TarballVer}.tar.gz
%else
Source0: linux-%{version}.tar.gz#/kernel.tar.gz
%endif
Source0: kernel.tar.gz
Source10: sign-modules
Source11: x509.genkey
Source12: extra_certificates
@ -220,20 +217,14 @@ package or when debugging this package.\
%endif
%prep
%if 0%{?with_patch}
if [ ! -d kernel-%{version}/vanilla-%{TarballVer} ];then
%setup -q -n kernel-%{version} -a 9998 -c
mv linux-%{TarballVer} vanilla-%{TarballVer}
else
cd kernel-%{version}
fi
cp -rl vanilla-%{TarballVer} linux-%{KernelVer}
%else
%setup -q -n kernel-%{version} -c
mv kernel linux-%{version}
cp -rl linux-%{version} linux-%{KernelVer}
%if 0%{?with_patch}
tar -xjf %{SOURCE9998}
%endif
mv kernel linux-%{KernelVer}
cd linux-%{KernelVer}
%if 0%{?with_patch}
@ -817,6 +808,8 @@ fi
%changelog
* Fri July 30 2021 Gou Hao <gouhao@uniontech.com> -4.19.194-2106.1.0.0087
- fix rpmbuild error with patches
* Thu July 8 2021 Senlin Xia <xiasenlin1@huawei.com> - 4.19.90-2106.3.0.0096
- add buildrequire: perl-devel for with_perf