fix rpmbuild error with patches

This commit is contained in:
gouhao 2021-07-26 16:33:51 +08:00
parent 4a082f8c75
commit c6781b3806

View File

@ -244,24 +244,13 @@ package or when debugging this package.\
%prep %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 %setup -q -n kernel-%{version} -c
if [ -d "kernel" ]; then
mv kernel linux-%{version} %if 0%{?with_patch}
cp -rl linux-%{version} linux-%{KernelVer} tar -xjf %{SOURCE9998}
else
echo "**** ERROR: no kernel source directory ****"
fi
%endif %endif
mv kernel linux-%{KernelVer}
cd linux-%{KernelVer} cd linux-%{KernelVer}
%if 0%{?with_patch} %if 0%{?with_patch}