From 3cbaaf5a3f24badf8697195e5a509899e0f87fa5 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Fri, 10 Jun 2022 22:02:27 -0600 Subject: [PATCH] Drop mingw for non-x86_64 on EL9 --- liblerc.spec | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/liblerc.spec b/liblerc.spec index 70a0626..1e8d025 100644 --- a/liblerc.spec +++ b/liblerc.spec @@ -1,9 +1,20 @@ %global commit b1de4cd146f73e9a679682e209de1ecde1ca094e %global shortcommit %(c=%{commit}; echo ${c:0:7}) +# mingw is x86_64 only on EL9 +%if 0%{?rhel} >= 9 +%ifarch x86_64 +%bcond_without mingw +%else +%bcond_with mingw +%endif +%else +%bcond_without mingw +%endif + Name: liblerc Version: 3.1 -Release: 0.1%{?commit:.git%{shortcommit}}%{?dist} +Release: 0.2%{?commit:.git%{shortcommit}}%{?dist} Summary: Library for Limited Error Raster Compression License: ASL 2.0 @@ -20,11 +31,13 @@ BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: python3-devel +%if %{with mingw} BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc-c++ BuildRequires: mingw64-filesystem >= 95 BuildRequires: mingw64-gcc-c++ +%endif %description LERC is an open-source image or raster format which supports rapid encoding and @@ -42,6 +55,7 @@ The %{name}-devel package contains libraries and header files for developing applications that use %{name}. +%if %{with mingw} %package -n mingw32-%{name} Summary: MinGW Windows %{name} library BuildArch: noarch @@ -56,6 +70,7 @@ BuildArch: noarch %description -n mingw64-%{name} %{summary}. +%endif %prep @@ -74,14 +89,18 @@ sed -i 's/\r$//' NOTICE README.md doc/MORE.md %cmake %cmake_build +%if %{with mingw} # MinGW build %mingw_cmake %mingw_make_build +%endif %install %cmake_install +%if %{with mingw} %mingw_make_install +%endif %files @@ -96,6 +115,7 @@ sed -i 's/\r$//' NOTICE README.md doc/MORE.md %{_libdir}/libLerc.so %{_libdir}/pkgconfig/Lerc.pc +%if %{with mingw} %files -n mingw32-%{name} %license LICENSE %{mingw32_bindir}/libLerc-3.dll @@ -111,8 +131,12 @@ sed -i 's/\r$//' NOTICE README.md doc/MORE.md %{mingw64_includedir}/Lerc_types.h %{mingw64_libdir}/libLerc.dll.a %{mingw64_libdir}/pkgconfig/Lerc.pc +%endif %changelog +* Fri Jun 10 2022 Orion Poplawski - 3.1-0.2.gitb1de4cd +- Drop mingw for non-x86_64 on EL9 + * Fri May 06 2022 Sandro Mani - 3.1-0.1.gitb1de4cd - Initial package b1de4cd