]> git.pld-linux.org Git - packages/perl-Math-Currency.git/blob - perl-Math-Currency.spec
use generic url
[packages/perl-Math-Currency.git] / perl-Math-Currency.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # do not perform "make test"
4
5 %define         pdir    Math
6 %define         pnam    Currency
7 %include        /usr/lib/rpm/macros.perl
8 Summary:        Math::Currency - exact currency math with formatting and rounding
9 Summary(pl.UTF-8):      Math::Currency - dokładne obliczenia na walutach z formatowaniem i zaokrąglaniem
10 Name:           perl-Math-Currency
11 Version:        0.47
12 Release:        1
13 License:        GPL v1+ or Artistic except commercial distribution on CD-ROM etc.
14 Group:          Development/Languages/Perl
15 Source0:        http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
16 # Source0-md5:  545e37f755c50385df2dec5b8d55239b
17 URL:            http://search.cpan.org/dist/Math-Currency/
18 BuildRequires:  perl(Math::BigFloat) >= 1.27
19 BuildRequires:  perl-Math-BigInt
20 BuildRequires:  perl-Module-Build
21 BuildRequires:  perl-devel >= 1:5.8.0
22 BuildRequires:  rpm-perlprov >= 4.1-13
23 %if %{with tests}
24 BuildRequires:  perl(Test::More) >= 0.02
25 BuildRequires:  perl-Test-Simple
26 %endif
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 Currency math is actually more closely related to integer math than it
32 is to floating point math. Rounding errors on addition and subtraction
33 are not allowed and division/multiplication should never create more
34 accuracy than the original values. All currency values should round to
35 the closest cent or whatever the local equivalent should happen to be.
36
37 All common mathematical operations are overloaded, so once you
38 initialize a currency variable, you can treat it like any number and
39 the module will do the right thing. This module is a thin layer over
40 Math::BigFloat which is itself a layer over Math::BigInt.
41
42 %description -l pl.UTF-8
43 Obliczenia na walutach są właściwie bliższe obliczeniom na liczbach
44 całkowitych niż zmiennoprzecinkowych. Błędy zaokrągleń przy dodawaniu
45 i odejmowaniu nie są dozwolone, a dzielenie czy mnożenie nie powinno
46 dać większej dokładności niż oryginalne wartości. Wszystkie wartości
47 monetarne powinny być zaokrąglane do najbliższego centa czy
48 czegokolwiek będącego jego lokalnym odpowiednikiem.
49
50 Wszystkie zwykłe operacje matematyczne są przeciążone, więc po
51 zainicjalizowaniu zmiennej monetarnej można ją traktować jak każdą
52 liczbę, a moduł zrobi to co trzeba. Ten moduł jest cienką warstwą
53 osadzoną na Math::BigFloat, który z kolei jest warstwą na
54 Math::BigInt.
55
56 %prep
57 %setup -q -n %{pdir}-%{pnam}-%{version}
58
59 %build
60 %{__perl} Build.PL \
61         installdirs=vendor \
62         destdir=$RPM_BUILD_ROOT
63 %{__perl} Build
64
65 %{?with_tests:%{__perl} Build test}
66
67 %install
68 rm -rf $RPM_BUILD_ROOT
69
70 %{__perl} Build install
71
72 %clean
73 rm -rf $RPM_BUILD_ROOT
74
75 %files
76 %defattr(644,root,root,755)
77 %doc Changes README
78 %{perl_vendorlib}/Math/Currency.pm
79 %dir %{perl_vendorlib}/Math/Currency
80 %{perl_vendorlib}/Math/Currency/*.pm
81 %{_mandir}/man3/*
This page took 0.080129 seconds and 3 git commands to generate.