Files
perl-PAUSE-Permissions/perl-PAUSE-Permissions.spec
2025-08-12 18:16:23 +02:00

113 lines
3.9 KiB
RPMSpec

#
# spec file for package perl-PAUSE-Permissions
#
# 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 PAUSE-Permissions
Name: perl-PAUSE-Permissions
Version: 0.170.0
Release: 0
# 0.17 -> normalize -> 0.170.0
%define cpan_version 0.17
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Interface to PAUSE's module permissions file (06perms.txt)
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/N/NE/NEILB/%{cpan_name}-%{cpan_version}.tar.gz
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(File::HomeDir)
BuildRequires: perl(HTTP::Date)
BuildRequires: perl(HTTP::Tiny)
BuildRequires: perl(List::Util) >= 1.33
BuildRequires: perl(Moo)
BuildRequires: perl(MooX::Options)
BuildRequires: perl(Path::Tiny)
BuildRequires: perl(Test::More) >= 0.88
BuildRequires: perl(Time::Duration::Parse)
BuildRequires: perl(autodie)
BuildRequires: perl(feature)
Requires: perl(File::HomeDir)
Requires: perl(HTTP::Date)
Requires: perl(HTTP::Tiny)
Requires: perl(List::Util) >= 1.33
Requires: perl(Moo)
Requires: perl(MooX::Options)
Requires: perl(Time::Duration::Parse)
Requires: perl(autodie)
Requires: perl(feature)
Provides: perl(PAUSE::Permissions) = %{version}
Provides: perl(PAUSE::Permissions::Entry) = %{version}
Provides: perl(PAUSE::Permissions::EntryIterator) = %{version}
Provides: perl(PAUSE::Permissions::Module) = %{version}
Provides: perl(PAUSE::Permissions::ModuleIterator) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
PAUSE::Permissions provides an interface to the '06perms.txt' file produced
by the Perl Authors Upload Server (PAUSE). The file records who has what
permissions for every module on CPAN. The format and interpretation of this
file are covered in "The 06perms.txt file" below.
By default, the module will mirror '06perms.txt' from CPAN, using
HTTP::Tiny to request it and store it locally What gets cached locally is
actually a transformed version of 06perms.txt for easier processing.
By default it will get the file from http://www.cpan.org, but you can pass
an alternate URI to the constructor:
$perms_uri = "http://$CPAN_MIRROR/modules/06perms.txt";
$pp = PAUSE::Permissions->new(uri => $perms_uri);
If you've already got a copy lying around, you can tell the module to use
that:
$pp = PAUSE::Permissions->new( path => '/tmp/my06perms.txt' );
Note that the file you provide this way must be in the post-processed
format, and not a raw copy of '06perms.txt'.
Having created an instance of 'PAUSE::Permissions', you can then call the
'module_permissions' method to get the permissions for a particular module.
The SYNOPSIS gives the basic usage.
*Note*: you should make sure you're using version 0.08 or later. PAUSE now
treats package names case insensitively with respect to permissions, so
this module does now as well.
%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