3 %bcond_without tests # do not perform "make test"
6 %define pnam Geometry-Voronoi
7 %include /usr/lib/rpm/macros.perl
8 Summary: Math::Geometry::Voronoi - compute Voronoi diagrams from sets of points
9 Name: perl-Math-Geometry-Voronoi
12 License: GPL v1+ or Artistic
13 Group: Development/Languages/Perl
14 Source0: http://www.cpan.org/modules/by-module/Math/%{pdir}-%{pnam}-%{version}.tar.gz
15 # Source0-md5: 44392be55ff56870aaff286dd735a5e2
16 URL: http://search.cpan.org/dist/Math-Geometry-Voronoi/
17 BuildRequires: perl-devel >= 1:5.8.0
18 BuildRequires: rpm-perlprov >= 4.1-13
20 BuildRequires: perl-Class-Accessor
21 BuildRequires: perl-Params-Validate
23 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26 This module computes Voronoi diagrams from a set of input points. Info
27 on Voronoi diagrams can be found here:
29 http://en.wikipedia.org/wiki/Voronoi_diagram
31 This module is a wrapper around a C implementation found here:
33 http://www.derekbradley.ca/voronoi.html
35 Which is itself a modification of code by Steve Fortune, the inventor
36 of the algorithm used (Fortune's algorithm):
39 %setup -q -n %{pdir}-%{pnam}-%{version}
42 %{__perl} Makefile.PL \
46 OPTIMIZE="%{rpmcflags}"
48 %{?with_tests:%{__make} test}
51 rm -rf $RPM_BUILD_ROOT
53 %{__make} pure_install \
54 DESTDIR=$RPM_BUILD_ROOT
56 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
57 cp -a examples $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
60 rm -rf $RPM_BUILD_ROOT
63 %defattr(644,root,root,755)
65 %{perl_vendorarch}/Math/Geometry/Voronoi.pm
66 %dir %{perl_vendorarch}/auto/Math/Geometry/Voronoi
67 %attr(755,root,root) %{perl_vendorarch}/auto/Math/Geometry/Voronoi/Voronoi.so
69 %{_examplesdir}/%{name}-%{version}