%undefine __cmake_in_source_build Name: voro++ Version: 0.4.6 Release: 3 Summary: Library for 3D computations of the Voronoi tessellation License: BSD-3-Clause-LBNL URL: http://math.lbl.gov/voro++/ Source0: http://math.lbl.gov/voro++/download/dir/%{name}-%{version}.tar.gz Source1: CMakeLists.txt # Make base class destructors virtual Patch0: voro++_virtual-destructor.patch # Fix manpage formatting Patch1: voro++_man.patch BuildRequires: cmake gcc-c++ make %description Voro++ is a software library for carrying out three-dimensional computations of the Voronoi tessellation. A distinguishing feature of the Voro++ library is that it carries out cell-based calculations, computing the Voronoi cell for each particle individually. It is particularly well-suited for applications that rely on cell-based statistics, where features of Voronoi cells (e.g. volume, centroid, number of faces) can be used to analyze a system of particles. %package devel Summary: %{name} headers Requires: %{name}%{?_isa} = %{version}-%{release} %description devel Header files for %{name}. %package doc Summary: %{name} documentation BuildArch: noarch %description doc Documentation for %{name}. %prep %autosetup -p1 install -m 0644 %{SOURCE1} src %build %cmake -S src %make_build %install %make_install install -D -p -m 0644 man/voro++.1 %{buildroot}%{_mandir}/man1/voro++.1 # Fix path in examples find examples -name "*.cc" -exec sed -i 's/"voro++.hh"//g' '{}' \; cp config.mk examples/ find examples -name "Makefile" -exec sed -i 's/..\/..\/config.mk/..\/config.mk/g' '{}' \; %files %license LICENSE %doc README NEWS %{_bindir}/%{name} %{_mandir}/man1/* %{_libdir}/lib%{name}.so.* %files devel %{_includedir}/* %{_libdir}/lib%{name}.so %files doc %doc LICENSE %doc html/ %doc examples/ %doc scripts/ %changelog * Mon Nov 18 2024 Funda Wang - 0.4.6-3 - adopt to new cmake macro * Tue Oct 26 2021 chenchen - 0.4.6-2 - change the spec file name to be the same as the repo name * Wed Aug 11 2021 herengui - 0.4.6-1 - Package init