%define postver 83
%define rel 1
-%define alt_kernel 6.1
+%define alt_kernel %{nil}
+
+%define versuffix -%{basever}
# kernel release (used in filesystem and eventually in uname -r)
# modules will be looked from /lib/modules/%{kernel_release}
Summary(et.UTF-8): Linuxi kernel (ehk operatsioonisüsteemi tuum)
Summary(fr.UTF-8): Le Kernel-Linux (La partie centrale du systeme)
Summary(pl.UTF-8): JÄ…dro Linuksa
-Name: kernel%{_alt_kernel}
+Name: kernel%{versuffix}%{_alt_kernel}
Version: %{basever}.%{postver}
Release: %{rel}
Epoch: 3
%define objdir %{topdir}/%{targetobj}
%define targetobj %{_target_base_arch}-gcc-%(%{kgcc} -dumpversion)
-%define _kernelsrcdir /usr/src/linux%{_alt_kernel}-%{version}
+%define _kernelsrcdir /usr/src/linux%{versuffix}%{_alt_kernel}-%{version}
%if "%{_target_base_arch}" != "%{_host_base_arch}"
%define CrossOpts ARCH=%{_target_base_arch} CROSS_COMPILE=%{_target_cpu}-tld-linux-
%endif
# Fix EXTRAVERSION in main Makefile
-sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{?alt_kernel:-%{alt_kernel}}#g' Makefile
+sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{?alt_kernel:_%{alt_kernel}}#g' Makefile
# cleanup backups after patching
find '(' -name '*~' -o -name '*.orig' -o -name '.gitignore' ')' -print0 | xargs -0 -r -l512 rm -f
%depmod %{kernel_release}
%post headers
-ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{_alt_kernel}
+ln -snf %{basename:%{_kernelsrcdir}} %{_prefix}/src/linux%{versuffix}%{_alt_kernel}
%postun headers
if [ "$1" = "0" ]; then
- if [ -L %{_prefix}/src/linux%{_alt_kernel} ]; then
- if [ "$(readlink %{_prefix}/src/linux%{_alt_kernel})" = "linux%{_alt_kernel}-%{version}" ]; then
- rm -f %{_prefix}/src/linux%{_alt_kernel}
+ if [ -L %{_prefix}/src/linux%{versuffix}%{_alt_kernel} ]; then
+ if [ "$(readlink %{_prefix}/src/linux%{versuffix}%{_alt_kernel})" = "linux%{versuffix}%{_alt_kernel}-%{version}" ]; then
+ rm -f %{_prefix}/src/linux%{versuffix}%{_alt_kernel}
fi
fi
fi