]>
Commit | Line | Data |
---|---|---|
0bf32622 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
0bf32622 JB |
5 | %define pdir Test |
6 | %define pnam Number-Delta | |
7 | Summary: Test::Number::Delta - Compare the difference between numbers agains given tolerance | |
8 | Summary(pl.UTF-8): Test::Number::Delta - porównywanie różnicy między liczbami do podanej tolerancji | |
9 | Name: perl-Test-Number-Delta | |
44531896 | 10 | Version: 1.06 |
0bf32622 | 11 | Release: 1 |
44531896 | 12 | License: Apache v2.0 |
0bf32622 JB |
13 | Group: Development/Languages/Perl |
14 | Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz | |
44531896 | 15 | # Source0-md5: f0d420e7f679a0bc593713d21c25f51e |
3b71eeef | 16 | URL: https://metacpan.org/release/ExtUtils-Depends |
44531896 | 17 | BuildRequires: perl-ExtUtils-MakeMaker >= 6.17 |
0bf32622 JB |
18 | BuildRequires: perl-devel >= 1:5.8.0 |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
3b71eeef | 20 | BuildRequires: rpmbuil(macros) >= 1.745 |
0bf32622 JB |
21 | %if %{with tests} |
22 | BuildRequires: perl-Test-Simple >= 0.45 | |
23 | BuildRequires: perl(Test::Builder) >= 0.32 | |
24 | BuildRequires: perl(Test::Builder::Tester) >= 1.02 | |
25 | %endif | |
26 | BuildArch: noarch | |
27 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
28 | ||
29 | %description | |
30 | At some point or another, most programmers find they need to compare | |
31 | floating-point numbers for equality. The typical idiom is to test if | |
32 | the absolute value of the difference of the numbers is within a | |
33 | desired tolerance, usually called epsilon. This module provides such | |
34 | functions (delta_within and delta_ok) for use with Test::Harness. | |
35 | Usage is similar to other test functions described in Test::More. | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | W pewnych sytuacjach wielu programistów potrzebuje porównania liczb | |
39 | zmiennoprzecinkowych pod kątem równości. Zwykle wykonuje się to | |
40 | sprawdzając czy wartość bezwzględną różnicy liczb mieści się w zadanej | |
41 | tolerancji, zwykle nazywanej epsilonem. Ten moduł udostępnia takie | |
42 | funkcje (delta_within i delta_ok) do używania w Test::Harness. | |
43 | Składnia jest podobna do innych funkcji testowych opisanych w | |
44 | Test::More. | |
45 | ||
46 | %prep | |
47 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
48 | ||
49 | %build | |
50 | %{__perl} Makefile.PL \ | |
51 | INSTALLDIRS=vendor | |
52 | ||
53 | %{__make} | |
54 | ||
55 | %{?with_tests:%{__make} test} | |
56 | ||
57 | %install | |
58 | rm -rf $RPM_BUILD_ROOT | |
59 | ||
60 | %{__make} pure_install \ | |
61 | DESTDIR=$RPM_BUILD_ROOT | |
62 | ||
63 | %clean | |
64 | rm -rf $RPM_BUILD_ROOT | |
65 | ||
66 | %files | |
67 | %defattr(644,root,root,755) | |
44531896 | 68 | %doc Changes README |
0bf32622 JB |
69 | %dir %{perl_vendorlib}/Test/Number |
70 | %{perl_vendorlib}/Test/Number/Delta.pm | |
71 | %{_mandir}/man3/Test::Number::Delta.3pm* |