From: Marcin Krol Date: Fri, 29 Mar 2024 00:15:52 +0000 (+0100) Subject: - version suffix for package name instead of alt_kernel, fixed extraversion X-Git-Url: https://git.tld-linux.org/?a=commitdiff_plain;h=1932415c3ffb901cba8f78d5051fb4d17b690314;p=packages%2Fkernel.git - version suffix for package name instead of alt_kernel, fixed extraversion --- diff --git a/kernel.spec b/kernel.spec index 26db39b..fb51e68 100644 --- a/kernel.spec +++ b/kernel.spec @@ -7,7 +7,9 @@ %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} @@ -20,7 +22,7 @@ Summary(de.UTF-8): Der Linux-Kernel (Kern des Linux-Betriebssystems) 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 @@ -111,7 +113,7 @@ BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %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- @@ -329,7 +331,7 @@ cd linux-%{basever} %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 @@ -555,13 +557,13 @@ fi %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