]>
Commit | Line | Data |
---|---|---|
8131c086 AM |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
5 | %define pdir Math | |
6 | %define pnam ConvexHull-MonotoneChain | |
7 | %include /usr/lib/rpm/macros.perl | |
8 | Summary: Math::ConvexHull::MonotoneChain - Andrew's monotone chain algorithm for finding a convex hull in 2D | |
9 | Name: perl-Math-ConvexHull-MonotoneChain | |
10 | Version: 0.01 | |
3fceacac | 11 | Release: 2 |
8131c086 AM |
12 | License: Perl |
13 | Group: Development/Languages/Perl | |
14 | Source0: http://www.cpan.org/modules/by-module/Math/%{pdir}-%{pnam}-%{version}.tar.gz | |
15 | # Source0-md5: eaac1a9350f914fea5bbce2029b95b57 | |
16 | URL: http://search.cpan.org/dist/Math-ConvexHull-MonotoneChain/ | |
17 | BuildRequires: perl-devel >= 1:5.8.0 | |
18 | BuildRequires: rpm-perlprov >= 4.1-13 | |
19 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
20 | ||
21 | %description | |
22 | This is somewhat experimental still. | |
23 | ||
24 | This (XS) module optionally exports a single function convex_hull | |
25 | which calculates the convex hull of the input points and returns it. | |
26 | The algorithm is O(n log n) due to having to sort the input list, but | |
27 | should be somewhat faster than a plain Graham's scan (also O(n log n)) | |
28 | in practice since it avoids polar coordinates. | |
29 | ||
30 | %prep | |
31 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
32 | ||
33 | %build | |
34 | %{__perl} Makefile.PL \ | |
35 | INSTALLDIRS=vendor | |
36 | %{__make} \ | |
37 | CC="%{__cc}" \ | |
38 | OPTIMIZE="%{rpmcflags}" | |
39 | ||
40 | %{?with_tests:%{__make} test} | |
41 | ||
42 | %install | |
43 | rm -rf $RPM_BUILD_ROOT | |
44 | ||
45 | %{__make} pure_install \ | |
46 | DESTDIR=$RPM_BUILD_ROOT | |
47 | ||
48 | %clean | |
49 | rm -rf $RPM_BUILD_ROOT | |
50 | ||
51 | %files | |
52 | %defattr(644,root,root,755) | |
53 | %doc Changes | |
fbeb240c | 54 | %dir %{perl_vendorarch}/Math/ConvexHull |
8131c086 | 55 | %{perl_vendorarch}/Math/ConvexHull/MonotoneChain.pm |
fbeb240c | 56 | %dir %{perl_vendorarch}/auto/Math/ConvexHull |
8131c086 AM |
57 | %dir %{perl_vendorarch}/auto/Math/ConvexHull/MonotoneChain |
58 | %attr(755,root,root) %{perl_vendorarch}/auto/Math/ConvexHull/MonotoneChain/MonotoneChain.so | |
59 | %{_mandir}/man3/* |