2011-08-02 10:28:44 +02:00
|
|
|
#
|
2015-04-14 07:59:25 +02:00
|
|
|
# spec file for package perl-List-UtilsBy
|
2011-08-02 10:28:44 +02:00
|
|
|
#
|
2022-05-11 18:34:16 +02:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2011-08-02 10:28:44 +02:00
|
|
|
#
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2022-05-11 18:34:16 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-08-02 10:28:44 +02:00
|
|
|
#
|
|
|
|
|
2015-04-14 07:59:25 +02:00
|
|
|
|
2022-05-11 18:34:16 +02:00
|
|
|
%define cpan_name List-UtilsBy
|
2011-08-02 10:28:44 +02:00
|
|
|
Name: perl-List-UtilsBy
|
2022-05-11 18:34:16 +02:00
|
|
|
Version: 0.12
|
2015-04-14 07:59:25 +02:00
|
|
|
Release: 0
|
2022-05-11 18:34:16 +02:00
|
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
|
|
Summary: Higher-order list utility functions
|
|
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
2018-02-07 16:53:02 +01:00
|
|
|
Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/%{cpan_name}-%{version}.tar.gz
|
2015-07-19 08:09:15 +02:00
|
|
|
Source1: cpanspec.yml
|
2011-08-02 10:28:44 +02:00
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: perl
|
|
|
|
BuildRequires: perl-macros
|
2015-07-19 08:09:15 +02:00
|
|
|
BuildRequires: perl(Module::Build) >= 0.400400
|
|
|
|
BuildRequires: perl(Test::More) >= 0.88
|
2011-08-02 10:28:44 +02:00
|
|
|
%{perl_requires}
|
|
|
|
|
|
|
|
%description
|
2011-08-02 10:33:54 +02:00
|
|
|
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
|
2018-02-07 16:53:02 +01:00
|
|
|
string value. The sort_by function sorts them according to the string value
|
|
|
|
returned by the extra function, when given each value.
|
2011-08-02 10:33:54 +02:00
|
|
|
|
2018-02-07 16:53:02 +01:00
|
|
|
my @names_sorted = sort @names;
|
2011-08-02 10:33:54 +02:00
|
|
|
|
2018-02-07 16:53:02 +01:00
|
|
|
my @people_sorted = sort_by { $_->name } @people;
|
2011-08-02 10:28:44 +02:00
|
|
|
|
|
|
|
%prep
|
2022-05-11 18:34:16 +02:00
|
|
|
%autosetup -n %{cpan_name}-%{version}
|
2011-08-02 10:28:44 +02:00
|
|
|
|
|
|
|
%build
|
2022-05-11 18:34:16 +02:00
|
|
|
perl Build.PL installdirs=vendor
|
2011-08-02 10:33:54 +02:00
|
|
|
./Build build flags=%{?_smp_mflags}
|
2011-08-02 10:28:44 +02:00
|
|
|
|
|
|
|
%check
|
2011-08-02 10:33:54 +02:00
|
|
|
./Build test
|
2011-08-02 10:28:44 +02:00
|
|
|
|
|
|
|
%install
|
2011-08-02 10:33:54 +02:00
|
|
|
./Build install destdir=%{buildroot} create_packlist=0
|
2011-08-02 10:28:44 +02:00
|
|
|
%perl_gen_filelist
|
|
|
|
|
|
|
|
%files -f %{name}.files
|
2018-02-07 16:53:02 +01:00
|
|
|
%doc Changes README
|
|
|
|
%license LICENSE
|
2011-08-02 10:28:44 +02:00
|
|
|
|
|
|
|
%changelog
|