diff --git a/libgeotiff.spec b/libgeotiff.spec index d4f54a9..b58afe9 100644 --- a/libgeotiff.spec +++ b/libgeotiff.spec @@ -1,6 +1,12 @@ +%if 0%{?rhel} >= 9 +%bcond_with mingw +%else +%bcond_without mingw +%endif + Name: libgeotiff Version: 1.7.1 -Release: 2%{?dist} +Release: 3%{?dist} Summary: GeoTIFF format library License: MIT @@ -20,6 +26,7 @@ BuildRequires: libjpeg-devel BuildRequires: proj-devel BuildRequires: zlib-devel +%if %{with mingw} BuildRequires: mingw32-filesystem >= 95 BuildRequires: mingw32-gcc BuildRequires: mingw32-libtiff @@ -33,6 +40,7 @@ BuildRequires: mingw64-libtiff BuildRequires: mingw64-libjpeg BuildRequires: mingw64-proj BuildRequires: mingw64-zlib +%endif %description @@ -50,6 +58,7 @@ Requires: %{name}%{?_isa} = %{version}-%{release} The GeoTIFF library provides support for development of geotiff image format. +%if %{with mingw} %package -n mingw32-%{name} Summary: MinGW Windows %{name} library Obsoletes: mingw32-%{name}-static @@ -87,6 +96,7 @@ BuildArch: noarch %{?mingw_debug_package} +%endif %prep @@ -98,14 +108,18 @@ BuildArch: noarch %cmake -DGEOTIFF_BIN_SUBDIR=bin -DGEOTIFF_INCLUDE_SUBDIR=include/%{name} -DGEOTIFF_LIB_SUBDIR=%{_lib} %cmake_build +%if %{with mingw} # MinGW build %mingw_cmake -DGEOTIFF_BIN_SUBDIR=bin -DGEOTIFF_INCLUDE_SUBDIR=include/%{name} %mingw_make_build +%endif %install %cmake_install +%if %{with mingw} %mingw_make_install +%endif # install pkgconfig file @@ -123,6 +137,7 @@ Libs: -L\${libdir} -lgeotiff Cflags: -I\${includedir} EOF +%if %{with mingw} mkdir -p %{buildroot}%{mingw32_libdir}/pkgconfig/ cat > %{buildroot}%{mingw32_libdir}/pkgconfig/%{name}.pc < - 1.7.1-3 +- Make mingw build conditional, disable for EL9 + * Fri Mar 25 2022 Sandro Mani - 1.7.1-2 - Rebuild with mingw-gcc-12