80 lines
2.8 KiB
RPMSpec
80 lines
2.8 KiB
RPMSpec
#
|
|
# spec file for package perl-Parse-LocalDistribution
|
|
#
|
|
# 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 Parse-LocalDistribution
|
|
Name: perl-Parse-LocalDistribution
|
|
Version: 0.200.0
|
|
Release: 0
|
|
# 0.20 -> normalize -> 0.200.0
|
|
%define cpan_version 0.20
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: Parses local .pm files as PAUSE does
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/I/IS/ISHIGAKI/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(ExtUtils::MakeMaker::CPANfile) >= 0.09
|
|
BuildRequires: perl(Parse::CPAN::Meta)
|
|
BuildRequires: perl(Parse::PMFile) >= 0.37
|
|
BuildRequires: perl(Test::More) >= 0.88
|
|
BuildRequires: perl(Test::UseAllModules) >= 0.10
|
|
Requires: perl(Parse::CPAN::Meta)
|
|
Requires: perl(Parse::PMFile) >= 0.37
|
|
Provides: perl(Parse::LocalDistribution) = %{version}
|
|
%undefine __perllib_provides
|
|
%{perl_requires}
|
|
|
|
%description
|
|
This is a sister module of Parse::PMFile. This module parses local .pm
|
|
files (and a META file if any) in a specific (current if not specified)
|
|
directory, and returns a hash reference that represents "provides"
|
|
information (with some extra meta data). This is almost the same as
|
|
Module::Metadata does (which has been in Perl core since Perl 5.13.9). The
|
|
main difference is the most of the code of this module is directly taken
|
|
from the PAUSE code as of June 2013. If you need better compatibility to
|
|
PAUSE, try this. If you need better performance, safety, or portability in
|
|
general, Module::Metadata may be a better and handier option (Parse::PMFile
|
|
(and thus Parse::LocalDistribution) actually evaluates code in the $VERSION
|
|
line (in a Safe compartment), which may be problematic in some cases).
|
|
|
|
This module doesn't provide a feature to extract a distribution. If you are
|
|
too lazy to implement it, CPAN::ParseDistribution may be another good
|
|
option.
|
|
|
|
%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
|
|
|
|
%changelog
|