perl-Module-Pluggable/perl-Module-Pluggable.spec
2020-06-18 10:13:57 +08:00

51 lines
2.0 KiB
RPMSpec

Name: perl-Module-Pluggable
Epoch: 2
Version: 5.2
Release: 10
Summary: Automatically give your module the ability to have plugins
License: GPL+ or Artistic
URL: https://metacpan.org/release/Module-Pluggable
Source0: https://cpan.metacpan.org/authors/id/S/SI/SIMONW/Module-Pluggable-%{version}.tar.gz
BuildArch: noarch
BuildRequires: coreutils findutils make perl-interpreter perl-generators
BuildRequires: perl(ExtUtils::MakeMaker) perl(File::Spec::Functions) >= 3.00 perl(strict)
BuildRequires: perl(warnings) perl(Carp) perl(deprecate) perl(Exporter) >= 5.57
BuildRequires: perl(File::Basename) perl(File::Find) perl(if) perl(vars)
BuildRequires: perl(Module::Runtime) >= 0.012 perl(base) perl(Data::Dumper) perl(FindBin)
BuildRequires: perl(lib) perl(Test::More) >= 0.62
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(File::Spec::Functions) >= 3.00 perl(deprecate)
Recommends: perl(Module::Runtime) >= 0.012
%description
Provides a simple but, hopefully, extensible way of having 'plugins' for your module.
obviously this isn't going to be the be all and end all of solutions but is works for me
Essentially all it does is export a method into your namespace that looks.
through a search path for .pm files and turn those into class names.
Optionally it instantiates those classes for you.
%prep
%autosetup -n Module-Pluggable-%{version} -p1
find -type f -exec chmod -x {} +
%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%install
make pure_install DESTDIR=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
%{_fixperms} %{buildroot}/*
%check
make test
%files
%doc Changes README
%{perl_vendorlib}/*
%{_mandir}/man3/*
%exclude %{_libdir}/perl5/vendor_perl/auto/Module/pluggable/.packlist
%changelog
* Fri Apr 24 2020 yanan li <liyanan032@huawei.com> - 5.2-10
- package init