public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/mctc-lib] rawhide: Switch to using CMake build system and minor cleanup
@ 2026-07-27 13:23 Cristian Le
  0 siblings, 0 replies; only message in thread
From: Cristian Le @ 2026-07-27 13:23 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/mctc-lib
Branch : rawhide
Commit : 5f98774bfbd041661544e44d4631065c702a3cee
Author : Cristian Le <git@lecris.dev>
Date   : 2026-07-27T15:04:17+02:00
Stats  : +26/-17 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/mctc-lib/c/5f98774bfbd041661544e44d4631065c702a3cee?branch=rawhide

Log:
Switch to using CMake build system and minor cleanup

---
diff --git a/mctc-lib.spec b/mctc-lib.spec
index 3f4820a..f64d310 100644
--- a/mctc-lib.spec
+++ b/mctc-lib.spec
@@ -1,3 +1,5 @@
+%global soversion 0
+
 Name:           mctc-lib
 Version:        0.5.2
 Release:        %autorelease
@@ -6,12 +8,10 @@ License:        Apache-2.0
 URL:            https://grimme-lab.github.io/mctc-lib/
 Source0:        https://github.com/grimme-lab/mctc-lib/archive/v%{version}/%{name}-%{version}.tar.gz
 
-BuildRequires:  python3-devel
 BuildRequires:  gcc-gfortran
-BuildRequires:  meson
-BuildRequires:  ninja-build
-BuildRequires:  pkgconfig(jonquil)
-BuildRequires:  pkgconfig(toml-f)
+BuildRequires:  cmake
+BuildRequires:  cmake(jonquil)
+BuildRequires:  cmake(toml-f)
 # For docs
 BuildRequires:  rubygem-asciidoctor
 
@@ -32,31 +32,40 @@ developing applications that use %{name}.
 %prep
 %autosetup -p1
 
+
+%conf
+# TODO: Account for absolute path CMAKE_INSTALL_INCLUDEDIR so we can use %%{_fmoddir}
+%cmake \
+  -DCMAKE_INSTALL_INCLUDEDIR:PATH=%{_lib}/gfortran/modules \
+  -Dmctc-lib-module-dir:STRING=mctc-lib \
+  -DMCTCLIB_WITH_OpenMP:BOOL=ON \
+  -DMCTCLIB_WITH_JSON:BOOL=ON
+
+
 %build
-%meson
-%meson_build
+%cmake_build
+
 
 %install
-%meson_install
-# Remove static libraries
-rm -f %{buildroot}%{_libdir}/*.a
+%cmake_install
+
+
+%check
+%ctest
 
-# Move module files
-mkdir -p %{buildroot}%{_fmoddir}
-mv %{buildroot}%{_includedir}/mctc-lib/*/*.mod %{buildroot}%{_fmoddir}
-rm -rf %{buildroot}%{_includedir}/mctc-lib/
 
 %files
 %license LICENSE
 %doc README.md
 %{_bindir}/mctc-convert
-%{_mandir}/man1/mctc-convert.1*
-%{_libdir}/libmctc-lib*.so.0*
+%{_libdir}/libmctc-lib.so.%{soversion}{,.*}
 
 %files devel
-%{_fmoddir}/mctc_*.mod
+%{_fmoddir}/mctc-lib/
+%{_libdir}/cmake/mctc-lib/
 %{_libdir}/pkgconfig/mctc-lib.pc
 %{_libdir}/libmctc-lib.so
 
+
 %changelog
 %autochangelog

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

only message in thread, other threads:[~2026-07-27 13:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-27 13:23 [rpms/mctc-lib] rawhide: Switch to using CMake build system and minor cleanup Cristian Le

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