]> git.pld-linux.org Git - packages/perl-Data-Page.git/blame - perl-Data-Page.spec
- drop obsolete and outdated manual inclusion of rpm macros
[packages/perl-Data-Page.git] / perl-Data-Page.spec
CommitLineData
ba147b7f 1#
2# Conditional build:
3%bcond_without tests # do not perform "make test"
d6dcd264 4
99104a59 5%define pdir Data
6%define pnam Page
ba147b7f 7Summary: Data::Page - help when paging through sets of results
9eba8e57 8Summary(pl.UTF-8): Data::Page - pomoc przy stronicowaniu zbiorów wyników
ba147b7f 9Name: perl-Data-Page
65024e93 10Version: 2.03
03187222 11Release: 1
2ee9340c 12# same as perl
13License: GPL v1+ or Artistic
ba147b7f 14Group: Development/Languages/Perl
15Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
65024e93 16# Source0-md5: bd1fb9f7d69bf804132201c3e6a1c80a
d6dcd264
ER
17URL: http://search.cpan.org/dist/Data-Page/
18BuildRequires: perl-Module-Build
19BuildRequires: perl-devel >= 1:5.8.0
20BuildRequires: rpm-perlprov >= 4.1-13
38ba2c8c
AG
21%if %{with tests}
22BuildRequires: perl-Class-Accessor-Chained
23BuildRequires: perl-Test-Exception
24%endif
462da0fc 25Requires: perl-Class-Accessor-Chained
ba147b7f 26BuildArch: noarch
27BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28
29%description
30When searching through large amounts of data, it is often the case
31that a result set is returned that is larger than we want to display
d6dcd264 32on one page. This results in wanting to page through various pages of
ba147b7f 33data. The maths behind this is unfortunately fiddly, hence this
34module.
81ba67ea 35
ba147b7f 36The main concept is that you pass in the number of total entries, the
37number of entries per page, and the current page number. You can then
38call methods to find out how many pages of information there are, and
39what number the first and last entries on the current page really are.
40
bd50b6a5
JR
41%description -l pl.UTF-8
42Przy przeszukiwaniu dużych ilości danych zwykle zwracany zbiór wyników
43jest większy niż chcielibyśmy wyświetlić na jednej stronie. Powoduje
44to chęć podzielenia danych na strony. Obliczenia przy tym są niestety
45nietrywialne i stąd ten moduł.
81ba67ea 46
bd50b6a5
JR
47Główną ideą jest to, że przekazuje się liczbę wszystkich elementów,
48liczbę elementów na stronie i aktualny numer strony. Można wtedy
49wywoływać metody, aby określić liczbę stron z informacjami oraz numer
81ba67ea
JB
50pierwszego i ostatniego elementu na aktualnej stronie.
51
ba147b7f 52%prep
53%setup -q -n %{pdir}-%{pnam}-%{version}
54
55%build
65024e93
AM
56%{__perl} Makefile.PL \
57 INSTALLDIRS=vendor
58%{__make}
ba147b7f 59
65024e93 60%{?with_tests:%{__make} test}
ba147b7f 61
62%install
63rm -rf $RPM_BUILD_ROOT
64
65024e93
AM
65%{__make} install \
66 DESTDIR=$RPM_BUILD_ROOT
ba147b7f 67
68%clean
69rm -rf $RPM_BUILD_ROOT
70
71%files
72%defattr(644,root,root,755)
65024e93 73%doc Changes README
ba147b7f 74%{perl_vendorlib}/Data/Page.pm
75%{_mandir}/man3/*
This page took 0.069938 seconds and 4 git commands to generate.