Related: #1979490 Handle module-build-service tags when detecting minor version
Instead of a hard-coded list of .el8_N => N, use a bit of lua to pattern match both .el8_N and also something like .module+el8.Y.Z+2+3b9e7ff5 x-Related: RHELPLAN-44129 (cherry picked from commit 6108038596daf9c370968afbc125582661bb112f) Conflicts: thunderbird.spec Adapted from rhel-8.4.0 (cherry picked from commit a68c1a0a8a566d5993fe7235404e287ceb5630d4) Conflicts: thunderbird.spec
This commit is contained in:
parent
51f6989dc5
commit
0646bec503
@ -6,37 +6,26 @@
|
|||||||
%global debug_package %{nil}
|
%global debug_package %{nil}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global rhel_minor_version -1
|
%{lua:
|
||||||
%if 0%{?flatpak:1}
|
function dist_to_rhel_minor(str, start)
|
||||||
%global rhel_minor_version 4
|
match = string.match(str, ".module%+el8.%d+")
|
||||||
%endif
|
if match then
|
||||||
%if "%{?dist}" == ".el8"
|
return string.sub(match, 13)
|
||||||
%global rhel_minor_version 5
|
end
|
||||||
%endif
|
match = string.match(str, ".el8_%d+")
|
||||||
%if "%{?dist}" == ".el8_4"
|
if match then
|
||||||
%global rhel_minor_version 4
|
return string.sub(match, 6)
|
||||||
%endif
|
end
|
||||||
%if "%{?dist}" == ".el8_3"
|
return -1
|
||||||
%global rhel_minor_version 3
|
end}
|
||||||
%endif
|
|
||||||
%if "%{?dist}" == ".el8_2"
|
%global rhel_minor_version %{lua:print(dist_to_rhel_minor(rpm.expand("%dist")))}
|
||||||
%global rhel_minor_version 2
|
|
||||||
%endif
|
|
||||||
%if "%{?dist}" == ".el8_1"
|
|
||||||
%global rhel_minor_version 1
|
|
||||||
%endif
|
|
||||||
%if "%{?dist}" == ".el8_0"
|
|
||||||
%global rhel_minor_version 0
|
|
||||||
%endif
|
|
||||||
%if "%{?dist}" == ".el9"
|
|
||||||
%global rhel_minor_version 4
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%global system_nss 1
|
%global system_nss 1
|
||||||
%global bundle_nss 0
|
%global bundle_nss 0
|
||||||
|
|
||||||
%if 0%{?rhel} >= 8
|
%if 0%{?rhel} >= 8
|
||||||
%if 0%{?rhel_minor_version} < 2
|
%if %{rhel_minor_version} < 2
|
||||||
%global bundle_nss 1
|
%global bundle_nss 1
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@ -151,7 +140,7 @@
|
|||||||
%define use_bundled_yasm 0
|
%define use_bundled_yasm 0
|
||||||
|
|
||||||
%if 0%{?rhel} >= 8
|
%if 0%{?rhel} >= 8
|
||||||
%if 0%{?rhel_minor_version} <= 2
|
%if %{rhel_minor_version} <= 2
|
||||||
%define use_bundled_nodejs 1
|
%define use_bundled_nodejs 1
|
||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
@ -361,7 +350,7 @@ BuildRequires: openssl-devel
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if 0%{?rhel} >= 8
|
%if 0%{?rhel} >= 8
|
||||||
%if 0%{?rhel_minor_version} >= 3
|
%if %{rhel_minor_version} >= 3
|
||||||
BuildRequires: pkgconfig(libpipewire-0.3)
|
BuildRequires: pkgconfig(libpipewire-0.3)
|
||||||
%else
|
%else
|
||||||
BuildRequires: pipewire-devel
|
BuildRequires: pipewire-devel
|
||||||
@ -496,7 +485,7 @@ Mozilla Thunderbird is a standalone mail and newsgroup client.
|
|||||||
%prep
|
%prep
|
||||||
echo "Build environment"
|
echo "Build environment"
|
||||||
echo "dist %{?dist}"
|
echo "dist %{?dist}"
|
||||||
echo "RHEL 8 minor version: %{?rhel_minor_version}"
|
echo "RHEL 8 minor version: %{rhel_minor_version}"
|
||||||
echo "use_bundled_ffi %{?use_bundled_ffi}"
|
echo "use_bundled_ffi %{?use_bundled_ffi}"
|
||||||
echo "use_bundled_python_2 %{?use_bundled_python_2}"
|
echo "use_bundled_python_2 %{?use_bundled_python_2}"
|
||||||
echo "use_bundled_python_3 %{?use_bundled_python_3}"
|
echo "use_bundled_python_3 %{?use_bundled_python_3}"
|
||||||
@ -532,7 +521,7 @@ echo "use_bundled_yasm %{?use_bundled_yasm}"
|
|||||||
%patch219 -p1 -b .rhbz-1173156
|
%patch219 -p1 -b .rhbz-1173156
|
||||||
%patch224 -p1 -b .1170092
|
%patch224 -p1 -b .1170092
|
||||||
%if 0%{?rhel} >= 8
|
%if 0%{?rhel} >= 8
|
||||||
%if 0%{?rhel_minor_version} >= 3
|
%if %{rhel_minor_version} >= 3
|
||||||
%patch235 -p1 -b .pipewire-0-3
|
%patch235 -p1 -b .pipewire-0-3
|
||||||
%else
|
%else
|
||||||
%patch231 -p1 -b .pipewire
|
%patch231 -p1 -b .pipewire
|
||||||
|
Loading…
Reference in New Issue
Block a user