3 %bcond_without tests # do not perform "make test"
6 %define pnam Calc-Units
7 Summary: Math::Calc::Units - human-readable unit-aware calculator
8 Summary(pl.UTF-8): Math::Calc::Units - kalkulator obsługujący jednostki
9 Name: perl-Math-Calc-Units
12 License: GPL v2 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: 56e4be0e64d6c8fc27c8f87d0d3cebd8
16 URL: http://search.cpan.org/dist/Math-Calc-Units/
17 BuildRequires: perl-devel >= 1:5.8.0
18 BuildRequires: rpm-perlprov >= 4.1-13
20 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23 Math::Calc::Units is a simple calculator that keeps track of units. It
24 currently handles combinations of byte sizes and duration only,
25 although adding any other multiplicative types is easy. Any unknown
26 type is treated as a unique user type (with some effort to map English
27 plurals to their singular forms).
29 The primary intended use is via the ucalc script that prints out all
30 of the "readable" variants of a value. For example, "3 bytes" will
31 only produce "3 byte", but "3 byte / sec" produces the original along
32 with "180 byte / minute", "10.55 kilobyte / hour", etc.
34 %description -l pl.UTF-8
35 Math::Calc::Units to prosty kalkulator zachowujący jednostki.
36 Aktualnie obsługuje tylko kombinacje rozmiaru w bajtach i czasu, ale
37 dodanie dowolnych typów multiplikatywnych jest proste. Każdy nieznany
38 typ jest traktowany jako unikalny typ użytkownika (z próbą zamiany
39 angielskich form mnogich na pojedyncze).
41 Podstawowy sposób użycia to skrypt ucalc, wypisujący wszystkie
42 "czytelne" warianty wartości. Na przykład "3 bytes" daje tylko "3
43 byte", ale "3 byte / sec" daje wartość oryginalną oraz "180 byte /
44 minute", "10.55 kilobyte / hour" itd.
47 %setup -q -n %{pdir}-%{pnam}-%{version}
50 %{__perl} Makefile.PL \
54 %{?with_tests:%{__make} test}
57 rm -rf $RPM_BUILD_ROOT
60 DESTDIR=$RPM_BUILD_ROOT
63 rm -rf $RPM_BUILD_ROOT
66 %defattr(644,root,root,755)
67 %doc Changes LICENSE README
68 %attr(755,root,root) %{_bindir}/*
69 %{perl_vendorlib}/Math/Calc/Units.pm
70 %{perl_vendorlib}/Math/Calc/Units