# # spec file for package perl-Sort-Sub # # Copyright (c) 2024 SUSE LLC # # 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. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define cpan_name Sort-Sub Name: perl-Sort-Sub Version: 0.121.0 Release: 0 # 0.121 -> normalize -> 0.121.0 %define cpan_version 0.121 License: Artistic-1.0 OR GPL-1.0-or-later Summary: Collection of sort subroutines URL: https://metacpan.org/release/%{cpan_name} Source0: https://cpan.metacpan.org/authors/id/P/PE/PERLANCAR/%{cpan_name}-%{cpan_version}.tar.gz Source1: cpanspec.yml Source100: README.md BuildArch: noarch BuildRequires: perl BuildRequires: perl-macros BuildRequires: perl(Complete::Sah) >= 0.12.0 BuildRequires: perl(Complete::Sequence) >= 0.2.0 BuildRequires: perl(Complete::Util) >= 0.620 BuildRequires: perl(Log::ger) >= 0.38.0 BuildRequires: perl(Sort::Naturally) BuildRequires: perl(Test::More) >= 0.98 BuildRequires: perl(parent) Requires: perl(Complete::Sah) >= 0.12.0 Requires: perl(Complete::Sequence) >= 0.2.0 Requires: perl(Complete::Util) >= 0.620 Requires: perl(Log::ger) >= 0.38.0 Requires: perl(Sort::Naturally) Requires: perl(Test::More) >= 0.98 Requires: perl(parent) Provides: perl(Sort::Sub) = %{version} Provides: perl(Sort::Sub::asciibetically) = %{version} Provides: perl(Sort::Sub::by_ascii_then_num) = %{version} Provides: perl(Sort::Sub::by_count) = %{version} Provides: perl(Sort::Sub::by_first_num_in_text) = %{version} Provides: perl(Sort::Sub::by_last_num_in_text) = %{version} Provides: perl(Sort::Sub::by_length) = %{version} Provides: perl(Sort::Sub::by_num_in_text) = %{version} Provides: perl(Sort::Sub::by_num_then_ascii) = %{version} Provides: perl(Sort::Sub::by_perl_code) = %{version} Provides: perl(Sort::Sub::by_perl_function) = %{version} Provides: perl(Sort::Sub::by_perl_op) = %{version} Provides: perl(Sort::Sub::by_rand) = %{version} Provides: perl(Sort::Sub::naturally) = %{version} Provides: perl(Sort::Sub::numerically) = %{version} Provides: perl(Sort::Sub::numerically_no_warning) = %{version} Provides: perl(Sort::Sub::randomly) = %{version} Provides: perl(Sort::Sub::record_by_order) = %{version} Provides: perl(Sort::Sub::record_by_reverse_order) = %{version} Provides: perl(Sub::Sort) = %{version} Provides: perl(Test::Sort::Sub) = %{version} %undefine __perllib_provides %{perl_requires} %description Sort::Sub and 'Sort::Sub::*' are a convenient packaging of any kind of subroutine which you can use for 'sort()'. To use Sort::Sub, you import a list of: ["$"]NAME [ "<" [i][r] ">" ] Where NAME is actually searched under 'Sort::Sub::*' namespace. For example: naturally will attempt to load 'Sort::Sub::naturally' module and call its 'gen_sorter' subroutine. You can either request a subroutine name like the above or a variable name (e.g. '$naturally'). After the name, you can add some options, enclosed with angle brackets '<>'. There are some known options, e.g. 'i' (for case-insensitive sort) or 'r' (for reverse sort). Some examples: naturally naturally naturally %prep %autosetup -n %{cpan_name}-%{cpan_version} %build perl Makefile.PL INSTALLDIRS=vendor %make_build %check make test %install %perl_make_install %perl_process_packlist %perl_gen_filelist %files -f %{name}.files %doc Changes README %license LICENSE %changelog