105 lines
3.4 KiB
RPMSpec
105 lines
3.4 KiB
RPMSpec
#
|
|
# spec file for package perl-Path-Iterator-Rule
|
|
#
|
|
# 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 Path-Iterator-Rule
|
|
Name: perl-Path-Iterator-Rule
|
|
Version: 1.15.0
|
|
Release: 0
|
|
# 1.015 -> normalize -> 1.15.0
|
|
%define cpan_version 1.015
|
|
License: Apache-2.0
|
|
Summary: Iterative, recursive file finder
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/D/DA/DAGOLDEN/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(File::pushd)
|
|
BuildRequires: perl(Number::Compare) >= 0.02
|
|
BuildRequires: perl(Path::Tiny)
|
|
BuildRequires: perl(Test::Deep)
|
|
BuildRequires: perl(Test::Filename) >= 0.30.0
|
|
BuildRequires: perl(Test::More) >= 0.92
|
|
BuildRequires: perl(Text::Glob)
|
|
BuildRequires: perl(Try::Tiny)
|
|
BuildRequires: perl(parent)
|
|
Requires: perl(Number::Compare) >= 0.02
|
|
Requires: perl(Text::Glob)
|
|
Requires: perl(Try::Tiny)
|
|
Provides: perl(PIR) = %{version}
|
|
Provides: perl(Path::Iterator::Rule) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
This module iterates over files and directories to identify ones matching a
|
|
user-defined set of rules. The API is based heavily on File::Find::Rule,
|
|
but with more explicit distinction between matching rules and options that
|
|
influence how directories are searched. A 'Path::Iterator::Rule' object is
|
|
a collection of rules (match criteria) with methods to add additional
|
|
criteria. Options that control directory traversal are given as arguments
|
|
to the method that generates an iterator.
|
|
|
|
Here is a summary of features for comparison to other file finding modules:
|
|
|
|
* provides many "helper" methods for specifying rules
|
|
|
|
* offers (lazy) iterator and flattened list interfaces
|
|
|
|
* custom rules implemented with callbacks
|
|
|
|
* breadth-first (default) or pre- or post-order depth-first searching
|
|
|
|
* follows symlinks (by default, but can be disabled)
|
|
|
|
* directories visited only once (no infinite loop; can be disabled)
|
|
|
|
* doesn't chdir during operation
|
|
|
|
* provides an API for extensions
|
|
|
|
As a convenience, the PIR module is an empty subclass of this one that is
|
|
less arduous to type for one-liners.
|
|
|
|
*Note*: paths are constructed with unix-style forward-slashes for
|
|
efficiency rather than using File::Spec. If proper path separators are
|
|
needed, call canonpath on the search results.
|
|
|
|
%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 CONTRIBUTING.mkdn examples README
|
|
%license LICENSE
|
|
|
|
%changelog
|