# Repackaging of the upstream Windows binary release rather than a source build. # Upstream ships one x86_64 archive, built against msvcrt with a 64-bit integer # interface. There is no ucrt build, so ucrt64 is left out rather than mixing # CRTs in one process, and the 32-bit x86 archive has no 64-bit integer variant # to match, so mingw32 is left out too. %global mingw_build_win32 0 %global mingw_build_win64 1 %global mingw_build_ucrt64 0 %{?mingw_package_header} Name: mingw-openblas Version: 0.3.34 Release: 1%{?dist} Summary: MinGW Windows optimized BLAS and LAPACK library # BSD-3-Clause: OpenBLAS itself # BSD-3-Clause-Open-MPI: the LAPACK reference code OpenBLAS builds in License: BSD-3-Clause AND BSD-3-Clause-Open-MPI URL: https://www.openblas.net/ Source0: https://github.com/OpenMathLib/OpenBLAS/releases/download/v%{version}/OpenBLAS-%{version}-x64-64.zip # The binary archive carries no copy of the licence. Source1: https://raw.githubusercontent.com/OpenMathLib/OpenBLAS/v%{version}/LICENSE#/OpenBLAS-%{version}-LICENSE BuildArch: noarch BuildRequires: unzip BuildRequires: mingw64-filesystem >= 95 %description OpenBLAS is an optimized BLAS library based on GotoBLAS2, bundling a full LAPACK. This package repackages the binary release the OpenBLAS project publishes for Windows. It is built with DYNAMIC_ARCH, so kernels are selected for the host CPU at run time, and with a 64-bit integer interface. # Win64 %package -n mingw64-openblas Summary: MinGW Windows optimized BLAS and LAPACK library %description -n mingw64-openblas OpenBLAS is an optimized BLAS library based on GotoBLAS2, bundling a full LAPACK. This package repackages the binary release the OpenBLAS project publishes for Windows. This build uses a 64-bit integer interface (ILP64) and leaves the symbol names unmangled, so dgemm_ takes int64_t arguments under its ordinary name. Callers must take their integer type from blasint in openblas_config.h. Passing 32-bit integers links without complaint and then misbehaves. %package -n mingw64-openblas-static Summary: Static version of the MinGW Windows OpenBLAS library Requires: mingw64-openblas = %{version}-%{release} # The static archive needs the Fortran runtime, which the DLL links in already. Requires: mingw64-gcc-gfortran %description -n mingw64-openblas-static Static version of the MinGW Windows OpenBLAS library. %prep %setup -q -c -n OpenBLAS-%{version} cp -p %{SOURCE1} LICENSE %install mkdir -p %{buildroot}%{mingw64_bindir} mkdir -p %{buildroot}%{mingw64_includedir} mkdir -p %{buildroot}%{mingw64_libdir} install -m 0755 -p bin/libopenblas.dll %{buildroot}%{mingw64_bindir}/ install -m 0644 -p include/*.h %{buildroot}%{mingw64_includedir}/ install -m 0644 -p lib/libopenblas.a lib/libopenblas.dll.a lib/libopenblas.def \ %{buildroot}%{mingw64_libdir}/ # libopenblasp-r%%{version}.a is byte for byte the same file as libopenblas.a, # and the .lib/.exp pair is only good to MSVC. cp -a lib/cmake %{buildroot}%{mingw64_libdir}/ # OpenBLAS_LIBRARIES points at the DLL, which mingw cannot link against. sed -i 's|/bin/libopenblas\.dll|/lib/libopenblas.dll.a|' \ %{buildroot}%{mingw64_libdir}/cmake/openblas/OpenBLASConfig.cmake # The shipped pkg-config file carries the paths of the machine that built the # archive, and an extralib line in MSVC syntax. mkdir -p %{buildroot}%{mingw64_libdir}/pkgconfig sed -e 's|^libdir=.*|libdir=%{mingw64_libdir}|' \ -e 's|^includedir=.*|includedir=%{mingw64_includedir}|' \ -e 's|^extralib=.*|extralib=-ladvapi32 -lgfortran -lquadmath -lm|' \ lib/pkgconfig/openblas64.pc \ > %{buildroot}%{mingw64_libdir}/pkgconfig/openblas64.pc chmod 0644 %{buildroot}%{mingw64_libdir}/pkgconfig/openblas64.pc ln -s openblas64.pc %{buildroot}%{mingw64_libdir}/pkgconfig/openblas.pc # Win64 %files -n mingw64-openblas %license LICENSE %{mingw64_bindir}/libopenblas.dll %{mingw64_includedir}/cblas.h %{mingw64_includedir}/f77blas.h %{mingw64_includedir}/lapack.h %{mingw64_includedir}/lapacke.h %{mingw64_includedir}/lapacke_config.h %{mingw64_includedir}/lapacke_mangling.h %{mingw64_includedir}/lapacke_utils.h %{mingw64_includedir}/openblas_config.h %{mingw64_libdir}/libopenblas.def %{mingw64_libdir}/libopenblas.dll.a %{mingw64_libdir}/cmake/openblas %{mingw64_libdir}/pkgconfig/openblas.pc %{mingw64_libdir}/pkgconfig/openblas64.pc %files -n mingw64-openblas-static %license LICENSE %{mingw64_libdir}/libopenblas.a %changelog * Tue Sep 08 2026 Jack Greiner - 0.3.34-1 - Update to 0.3.34 * Tue Sep 08 2026 Jack Greiner - 0.3.30-1 - Add initial mingw openblas package