forked from pool/perl-Data-Page
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Data-Page?expand=0&rev=2
58 lines
1.7 KiB
RPMSpec
58 lines
1.7 KiB
RPMSpec
# vim: set sw=4 ts=4 et nu:
|
|
# norootforbuild
|
|
|
|
Name: perl-Data-Page
|
|
Version: 2.02
|
|
Release: 0
|
|
Summary: Help when paging through sets of results
|
|
Source: http://search.cpan.org/CPAN/authors/id/L/LB/LBROCARD/Data-Page-%{version}.tar.gz
|
|
URL: http://search.cpan.org/dist/Data-Page
|
|
Group: Development/Libraries/Perl
|
|
License: Perl License
|
|
BuildRoot: %{_tmppath}/build-%{name}-%{version}
|
|
Requires: perl = %{perl_version}
|
|
BuildRequires: perl(Module::Build) >= 0.35
|
|
BuildRequires: perl(Test::More)
|
|
BuildRequires: perl(Class::Accessor::Chained::Fast)
|
|
BuildRequires: perl(Test::Exception)
|
|
Requires: perl(Class::Accessor::Chained::Fast)
|
|
|
|
%description
|
|
When searching through large amounts of data, it is often the case that a
|
|
result set is returned that is larger than we want to display on one page.
|
|
|
|
This results in wanting to page through various pages of data. The maths
|
|
behind this is unfortunately fiddly, hence this module.
|
|
|
|
The main concept is that you pass in the number of total entries, the
|
|
number of entries per page, and the current page number. You can then call
|
|
methods to find out how many pages of information there are, and what
|
|
number the first and last entries on the current page really are.
|
|
|
|
%prep
|
|
%setup -q -n "Data-Page-%{version}"
|
|
|
|
%build
|
|
%__perl ./Build.PL
|
|
./Build
|
|
|
|
%install
|
|
./Build pure_install --destdir "%{buildroot}" --installdirs vendor
|
|
%perl_process_packlist
|
|
|
|
%check
|
|
./Build test
|
|
|
|
%clean
|
|
%{?buildroot:%__rm -rf "%{buildroot}"}
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc README NINJA CHANGES
|
|
%dir %{perl_vendorlib}/Data
|
|
%{perl_vendorlib}/Data/Page.pm
|
|
%dir %{perl_vendorarch}/auto/Data
|
|
%{perl_vendorarch}/auto/Data/Page
|
|
%doc %{perl_man3dir}/Data::Page.%{perl_man3ext}%{ext_man}
|
|
|