Stephan Kulow 2011-08-02 08:33:54 +00:00 committed by Git OBS Bridge
parent 14001c3d3e
commit 1df4d974aa

View File

@ -18,36 +18,44 @@
Name: perl-List-UtilsBy
Version: 0.07
Release: 1
License: CHECK(GPL+ or Artistic)
License: GPL+ or Artistic
%define cpan_name List-UtilsBy
Summary: List::UtilsBy Perl module
Summary: higher-order list utility functions
Url: http://search.cpan.org/dist/List-UtilsBy/
Group: Development/Libraries/Perl
Source: http://www.cpan.org/authors/id/P/PE/PEVANS/List-UtilsBy-%{version}.tar.gz
Source: http://www.cpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Module::Build)
%{perl_requires}
Requires: perl
Requires: perl-macros
%description
List::UtilsBy Perl module
This module provides a number of list utility functions, all of which take
an initial code block to control their behaviour. They are variations on
similar core perl or 'List::Util' functions of similar names, but which use
the block to control their behaviour. For example, the core Perl function
'sort' takes a list of values and returns them, sorted into order by their
string value. The 'sort_by' function sorts them according to the string
value returned by the extra function, when given each value.
my @names_sorted = sort @names;
my @people_sorted = sort_by { $_->name } @people;
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
%{__perl} Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}
%check
%{__make} test
./Build test
%install
%perl_make_install
%perl_process_packlist
./Build install destdir=%{buildroot} create_packlist=0
%perl_gen_filelist
%clean
@ -55,5 +63,6 @@ List::UtilsBy Perl module
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes LICENSE README
%changelog