blob: 1573f73bfcfc19e8812f11861e743db9eb7a20b6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
%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"/<voro++\/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 <fundawang@yeah.net> - 0.4.6-3
- adopt to new cmake macro
* Tue Oct 26 2021 chenchen <chen_aka_jan@163.com> - 0.4.6-2
- change the spec file name to be the same as the repo name
* Wed Aug 11 2021 herengui <herengui@uniontech.com> - 0.4.6-1
- Package init
|