public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/libpoly] rawhide: Use the cmake declarative buildsystem
@ 2026-07-13 22:32 Jerry James
  0 siblings, 0 replies; only message in thread
From: Jerry James @ 2026-07-13 22:32 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/libpoly
Branch : rawhide
Commit : e35e275005a2bffd4614b996157c9af5e1c79c92
Author : Jerry James <loganjerry@gmail.com>
Date   : 2026-07-13T16:32:26-06:00
Stats  : +18/-22 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/libpoly/c/e35e275005a2bffd4614b996157c9af5e1c79c92?branch=rawhide

Log:
Use the cmake declarative buildsystem

---
diff --git a/libpoly.spec b/libpoly.spec
index efc343f..7f7ff58 100644
--- a/libpoly.spec
+++ b/libpoly.spec
@@ -1,3 +1,6 @@
+# Whether to run tests
+%bcond ctest 1
+
 %global giturl  https://github.com/SRI-CSL/libpoly
 
 Name:           libpoly
@@ -12,6 +15,11 @@ Source:         %{giturl}/archive/v%{version}/%{name}-%{version}.tar.gz
 
 # See https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
 ExcludeArch:    %{ix86}
+BuildSystem:    cmake
+BuildOption(conf): %{_cmake_skip_rpath}
+BuildOption(conf): -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
+BuildOption(conf): -DLIBPOLY_BUILD_STATIC:BOOL=OFF
+BuildOption(conf): -DLIBPOLY_BUILD_STATIC_PIC:BOOL=OFF
 
 BuildRequires:  cmake
 BuildRequires:  gcc-c++
@@ -47,46 +55,34 @@ This package contains a python 3 interface to %{name}.
 %prep
 %autosetup -p1
 
-%conf
+sed 's/\${LIBPOLY_VERSION}/%{version}/' python/setup.py.in > python/setup.py
+
 # Install in the right place
-if [ "%{_lib}" != "lib" ]; then
-  sed -i 's/\(DESTINATION \)lib/\1%{_lib}/' src/CMakeLists.txt
-fi
+sed -i 's/\(DESTINATION \)lib/\1${LIB_INSTALL_DIR}/' src/CMakeLists.txt
 
 # Clean up hidden files before they get installed
 find . -name .gitignore -delete
 
 %generate_buildrequires
-cd python
-sed 's/\${LIBPOLY_VERSION}/%{version}/' setup.py.in > setup.py
-%pyproject_buildrequires
-rm setup.py
+%pyproject_buildrequires -d python
 
-%build
-%cmake %{_cmake_skip_rpath} \
-  -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo \
-  -DLIBPOLY_BUILD_STATIC:BOOL=OFF \
-  -DLIBPOLY_BUILD_STATIC_PIC:BOOL=OFF
-%cmake_build
+%conf -p
+rm python/setup.py
 
+%build -a
 # Build the python interface the Fedora way
 sed -i "s|library_dirs = \[|&'$PWD/%{_vpath_builddir}/src', |" python/setup.py
-cd python
-%pyproject_wheel
-cd -
-
-%install
-%cmake_install
+%pyproject_wheel -d python
 
+%install -a
 # Install the python interface the Fedora way
 cd python
 %pyproject_install
 %pyproject_save_files -L polypy
 cd -
 
-%check
+%check -p
 export LD_LIBRARY_PATH=$PWD/%{_vpath_builddir}/src
-%ctest
 
 %files
 %license LICENCE

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

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

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-13 22:32 [rpms/libpoly] rawhide: Use the cmake declarative buildsystem Jerry James

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