public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/dbcsr] rawhide: Various spec file cleanups
@ 2026-08-10  6:25 Cristian Le
  0 siblings, 0 replies; only message in thread
From: Cristian Le @ 2026-08-10  6:25 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/dbcsr
Branch : rawhide
Commit : e74b3a7589da571d6684379cd7ad417b472836ed
Author : Cristian Le <git@lecris.dev>
Date   : 2026-07-31T12:25:48+02:00
Stats  : +37/-39 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/dbcsr/c/e74b3a7589da571d6684379cd7ad417b472836ed?branch=rawhide

Log:
Various spec file cleanups

---
diff --git a/dbcsr.spec b/dbcsr.spec
index 43139ee..9b3dcf3 100644
--- a/dbcsr.spec
+++ b/dbcsr.spec
@@ -1,17 +1,11 @@
 # OpenCL support requires packaged libxs/libxstream/libxsmm dependencies.
 # Keep it disabled until those packages are available in Fedora.
-%bcond_with opencl
-
-# No openmpi on i668 with openmpi 5 in Fedora 40+
-%if 0%{?fedora} >= 40
-%ifarch %{ix86}
-%bcond_with openmpi
-%else
-%bcond_without openmpi
-%endif
-%else
-%bcond_without openmpi
-%endif
+%bcond opencl 0
+
+# OpenMPI is not available on i686
+%bcond openmpi %[ 0%{?__isa_bits} != 32 ]
+
+%global soversion 2.10
 
 Name:          dbcsr
 Version:       2.10.0
@@ -27,7 +21,6 @@ Patch:         https://github.com/cp2k/dbcsr/pull/1027.patch
 BuildRequires: cmake
 BuildRequires: gcc-c++
 BuildRequires: gcc-gfortran
-BuildRequires: make
 BuildRequires: flexiblas-devel
 %if %{with opencl}
 BuildRequires: libxs-devel
@@ -109,39 +102,44 @@ rm -r tools
 # $mpi will be evaluated in the loops below
 %global _vpath_builddir %{_vendor}-%{_target_os}-build-${mpi:-serial}
 
-%build
-export CFLAGS="%{optflags} -fPIC"
-export CXXFLAGS="%{optflags} -fPIC"
-export FFLAGS="%{optflags} -fPIC"
+%conf
 %cmake \
-  -DCMAKE_INSTALL_Fortran_MODULES=%{_fmoddir} \
-  -DBUILD_SHARED_LIBS=ON \
-  -DBUILD_TESTING=ON \
-  -DUSE_MPI=OFF \
-  -DUSE_LIBXS=OFF \
-  -DUSE_LIBXSMM=OFF \
-  %{?with_opencl:-DUSE_ACCEL=opencl -DUSE_LIBXS=ON -DUSE_LIBXSMM=ON}
-%cmake_build
+  -DCMAKE_INSTALL_Fortran_MODULES:PATH=%{_fmoddir} \
+  -DBUILD_TESTING:BOOL=ON \
+  -DUSE_MPI:BOOL=OFF \
+  %{?with_opencl:-DUSE_ACCEL:STRING=opencl} \
+  -DUSE_LIBXS:BOOL=%{with opencl} \
+  -DUSE_LIBXSMM:BOOL=%{with opencl}
+
 for mpi in %{mpi_list}
 do
   module load mpi/$mpi-%{_arch}
   %cmake \
-    -DCMAKE_INSTALL_Fortran_MODULES=$MPI_FORTRAN_MOD_DIR \
-    -DBUILD_SHARED_LIBS=ON \
-    -DBUILD_TESTING=ON \
-    -DUSE_MPI=ON \
-    -DUSE_LIBXS=OFF \
-    -DUSE_LIBXSMM=OFF \
-    %{?with_opencl:-DUSE_ACCEL=opencl -DUSE_LIBXS=ON -DUSE_LIBXSMM=ON} \
+    -DCMAKE_INSTALL_Fortran_MODULES:PATH=$MPI_FORTRAN_MOD_DIR \
+    -DBUILD_TESTING:BOOL=ON \
+    -DUSE_MPI:BOOL=ON \
+    %{?with_opencl:-DUSE_ACCEL:STRING=opencl} \
+    -DUSE_LIBXS:BOOL=%{with opencl} \
+    -DUSE_LIBXSMM:BOOL=%{with opencl} \
     -DCMAKE_INSTALL_PREFIX:PATH=$MPI_HOME \
     -DCMAKE_INSTALL_LIBDIR:PATH=$MPI_LIB \
-    -DUSE_MPI_F08=ON \
-    -DTEST_MPI_RANKS=2
+    -DUSE_MPI_F08:BOOL=ON \
+    -DTEST_MPI_RANKS:STRING=2
+  module purge
+done
+
+
+%build
+%cmake_build
+for mpi in %{mpi_list}
+do
+  module load mpi/$mpi-%{_arch}
   %cmake_build
   module purge
 done
 
 
+
 %install
 %cmake_install
 for mpi in %{mpi_list}
@@ -168,7 +166,7 @@ done
 %files
 %license LICENSE
 %doc README.md
-%{_libdir}/libdbcsr.so.*
+%{_libdir}/libdbcsr.so.%{soversion}{,.*}
 
 %files devel
 %{_fmoddir}/dbcsr_api.mod
@@ -180,8 +178,8 @@ done
 %files openmpi
 %license LICENSE
 %doc README.md
-%{_libdir}/openmpi/lib/libdbcsr.so.*
-%{_libdir}/openmpi/lib/libdbcsr_c.so.*
+%{_libdir}/openmpi/lib/libdbcsr.so.%{soversion}{,.*}
+%{_libdir}/openmpi/lib/libdbcsr_c.so.%{soversion}{,.*}
 
 %files openmpi-devel
 %{_libdir}/openmpi/include/dbcsr.h
@@ -196,8 +194,8 @@ done
 %files mpich
 %license LICENSE
 %doc README.md
-%{_libdir}/mpich/lib/libdbcsr.so.*
-%{_libdir}/mpich/lib/libdbcsr_c.so.*
+%{_libdir}/mpich/lib/libdbcsr.so.%{soversion}{,.*}
+%{_libdir}/mpich/lib/libdbcsr_c.so.%{soversion}{,.*}
 
 %files mpich-devel
 %{_libdir}/mpich/include/dbcsr.h

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-10  6:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-10  6:25 [rpms/dbcsr] rawhide: Various spec file cleanups Cristian Le

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox