From 7aabb6fa4102affa46a7f4b7e56a0928a873acbb Mon Sep 17 00:00:00 2001 From: David Schwörer Date: Aug 24 2020 13:02:00 +0000 Subject: make spec cleaner --- diff --git a/bout++.spec b/bout++.spec index 7446c55..69938e8 100644 --- a/bout++.spec +++ b/bout++.spec @@ -13,6 +13,8 @@ Patch0: remove-mpark.patch %if 0%{?fedora} >= 33 %bcond_without flexiblas +%else +%bcond_with flexiblas %endif # Disable tests and manual on epel < 8 @@ -70,7 +72,8 @@ BuildRequires: python%{python3_pkgversion}-scipy %if %{with flexiblas} BuildRequires: flexiblas-devel %else -BuildRequires: blas-devel, lapack-devel +BuildRequires: blas-devel +BuildRequires: lapack-devel %endif BuildRequires: gcc-c++ %if %{with system_mpark} @@ -326,12 +329,6 @@ do exit 1 fi - %if %{with flexiblas} - sed -e 's|-lblas|-lflexiblas|g' \ - -e 's|-llapack|-lflexiblas|g' \ - -i configure - %endif - %configure \ --with-netcdf \ --with-hdf5 \ @@ -351,6 +348,12 @@ do sed -e "s| -L%{_libdir} | |g" \ -e 's|@$(LD)|$(LD)|' \ -i make.config + + %if %{with flexiblas} + sed -e 's|-lblas|-lflexiblas|g' \ + -e 's|-llapack|-lflexiblas|g' \ + -i make.config + %endif cat make.config make %{?_smp_mflags} shared python