Files
perl-Dist-Metadata/perl-Dist-Metadata.spec
2025-08-12 18:13:36 +02:00

115 lines
3.9 KiB
RPMSpec

#
# spec file for package perl-Dist-Metadata
#
# 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 Dist-Metadata
Name: perl-Dist-Metadata
Version: 0.927.0
Release: 0
# 0.927 -> normalize -> 0.927.0
%define cpan_version 0.927
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Information about a perl module distribution
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/R/RW/RWSTAUNER/%{cpan_name}-%{cpan_version}.tar.gz
Source1: cpanspec.yml
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Archive::Tar) >= 1
BuildRequires: perl(Archive::Zip) >= 1.30
BuildRequires: perl(CPAN::DistnameInfo) >= 0.12
BuildRequires: perl(CPAN::Meta) >= 2.1
BuildRequires: perl(Digest::SHA) >= 5
BuildRequires: perl(File::Spec::Native) >= 1.2.0
BuildRequires: perl(File::Temp) >= 0.19
BuildRequires: perl(Module::Metadata)
BuildRequires: perl(Path::Class) >= 0.24
BuildRequires: perl(Test::Fatal)
BuildRequires: perl(Test::MockObject) >= 1.09
BuildRequires: perl(Test::More) >= 0.96
BuildRequires: perl(Try::Tiny) >= 0.09
BuildRequires: perl(parent)
Requires: perl(Archive::Tar) >= 1
Requires: perl(Archive::Zip) >= 1.30
Requires: perl(CPAN::DistnameInfo) >= 0.12
Requires: perl(CPAN::Meta) >= 2.1
Requires: perl(Digest::SHA) >= 5
Requires: perl(File::Spec::Native) >= 1.2.0
Requires: perl(File::Temp) >= 0.19
Requires: perl(Module::Metadata)
Requires: perl(Path::Class) >= 0.24
Requires: perl(Try::Tiny) >= 0.09
Requires: perl(parent)
Provides: perl(Dist::Metadata) = %{version}
Provides: perl(Dist::Metadata::Archive) = %{version}
Provides: perl(Dist::Metadata::Dir) = %{version}
Provides: perl(Dist::Metadata::Dist) = %{version}
Provides: perl(Dist::Metadata::Struct) = %{version}
Provides: perl(Dist::Metadata::Tar) = %{version}
Provides: perl(Dist::Metadata::Zip) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
This module provides an easy interface for getting various metadata about a
Perl module distribution.
It takes care of the common logic of:
* reading a tar file (Archive::Tar)
* finding and reading the correct META file if the distribution contains one
(CPAN::Meta)
* and determining some of the metadata if there is no META file
(Module::Metadata, CPAN::DistnameInfo)
This is mostly a wrapper around CPAN::Meta providing an easy interface to
find and load the meta file from a _tar.gz_ file. A dist can also be
represented by a directory or merely a structure of data.
If the dist does not contain a meta file the module will attempt to
determine some of that data from the dist.
*NOTE*: This interface is still being defined. Please submit any
suggestions or concerns.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
find . -type f ! -path "*/t/*" ! -name "*.pl" ! -path "*/bin/*" ! -path "*/script/*" ! -path "*/scripts/*" ! -name "configure" -print0 | xargs -0 chmod 644
%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