diff --git a/dist/templates/kernel.template.spec b/dist/templates/kernel.template.spec index 6262340654901fa361b1d211a41db9429cf3abb6..10b0d7b15442ad48ada95d500afb00d030206bdf 100644 --- a/dist/templates/kernel.template.spec +++ b/dist/templates/kernel.template.spec @@ -509,6 +509,14 @@ This package contains all the signed ko files. %endif %endif +%package source +Summary: source code included %{_vendor} patch +BuildRequires: tar, xz +BuildArch: noarch + +%description source +This package provides source code included %{_vendor} patch for cross toolchains + ###### common macros for build and install ##################################### ### Signing scripts # If externel module signer and keygen provided, ignore built-in keygen and @@ -599,6 +607,9 @@ case $KernUnameR in ;; esac +# take tarball of source code +tar acvf %{name}-%{version}-%{release}.tar.xz * + ###### Rpmbuild Build Stage #################################################### %build @@ -1391,6 +1402,10 @@ done %endif #with_debuginfo +# copy source code tarball to installing directory +mkdir -p %{buildroot}%{_usrsrc}/%{name} +cp -f %{name}-%{version}-%{release}.tar.xz %{buildroot}%{_usrsrc}/%{name}/ + ###### RPM scriptslets ######################################################### ### Core package # Pre @@ -1516,6 +1531,9 @@ fi /sbin/ldconfig %endif +%files source +%{_usrsrc}/%{name}/%{name}-%{version}-%{release}.tar.xz + ###### Rpmbuild packaging file list ############################################ ### empty meta-package %if %{with_core}