]>
Commit | Line | Data |
---|---|---|
a3649d16 AM |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %define pdir Math | |
6 | %define pnam Geometry-Voronoi | |
a3649d16 AM |
7 | Summary: Math::Geometry::Voronoi - compute Voronoi diagrams from sets of points |
8 | Name: perl-Math-Geometry-Voronoi | |
9 | Version: 1.3 | |
e0cd8b01 | 10 | Release: 12 |
a3649d16 AM |
11 | License: GPL v1+ or Artistic |
12 | Group: Development/Languages/Perl | |
13 | Source0: http://www.cpan.org/modules/by-module/Math/%{pdir}-%{pnam}-%{version}.tar.gz | |
14 | # Source0-md5: 44392be55ff56870aaff286dd735a5e2 | |
15 | URL: http://search.cpan.org/dist/Math-Geometry-Voronoi/ | |
16 | BuildRequires: perl-devel >= 1:5.8.0 | |
17 | BuildRequires: rpm-perlprov >= 4.1-13 | |
18 | %if %{with tests} | |
19 | BuildRequires: perl-Class-Accessor | |
20 | BuildRequires: perl-Params-Validate | |
21 | %endif | |
22 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
23 | ||
24 | %description | |
25 | This module computes Voronoi diagrams from a set of input points. Info | |
26 | on Voronoi diagrams can be found here: | |
27 | ||
28 | http://en.wikipedia.org/wiki/Voronoi_diagram | |
29 | ||
30 | This module is a wrapper around a C implementation found here: | |
31 | ||
32 | http://www.derekbradley.ca/voronoi.html | |
33 | ||
34 | Which is itself a modification of code by Steve Fortune, the inventor | |
35 | of the algorithm used (Fortune's algorithm): | |
36 | ||
37 | %prep | |
38 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
39 | ||
40 | %build | |
41 | %{__perl} Makefile.PL \ | |
42 | INSTALLDIRS=vendor | |
43 | %{__make} \ | |
44 | CC="%{__cc}" \ | |
45 | OPTIMIZE="%{rpmcflags}" | |
46 | ||
47 | %{?with_tests:%{__make} test} | |
48 | ||
49 | %install | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %{__make} pure_install \ | |
53 | DESTDIR=$RPM_BUILD_ROOT | |
54 | ||
55 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
56 | cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
57 | ||
58 | %clean | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | ||
61 | %files | |
62 | %defattr(644,root,root,755) | |
63 | %doc Changes README | |
64 | %{perl_vendorarch}/Math/Geometry/Voronoi.pm | |
65 | %dir %{perl_vendorarch}/auto/Math/Geometry/Voronoi | |
66 | %attr(755,root,root) %{perl_vendorarch}/auto/Math/Geometry/Voronoi/Voronoi.so | |
67 | %{_mandir}/man3/* | |
68 | %{_examplesdir}/%{name}-%{version} |