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