From 1df4d974aa25ffc895485986afb7003bac02bb42b30a19d55286acdfe9d3521c Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Tue, 2 Aug 2011 08:33:54 +0000 Subject: [PATCH] fix up OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-List-UtilsBy?expand=0&rev=2 --- perl-List-UtilsBy.spec | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/perl-List-UtilsBy.spec b/perl-List-UtilsBy.spec index 556b6bb..d1ae9f9 100644 --- a/perl-List-UtilsBy.spec +++ b/perl-List-UtilsBy.spec @@ -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