forked from pool/perl-Class-Load
Accepting request 91036 from devel:languages:perl
OBS-URL: https://build.opensuse.org/request/show/91036 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Class-Load?expand=0&rev=4
This commit is contained in:
committed by
Git OBS Bridge
parent
b8c0948cc1
commit
f105e1870e
@@ -18,64 +18,77 @@
|
||||
|
||||
|
||||
Name: perl-Class-Load
|
||||
Version: 0.06
|
||||
Version: 0.11
|
||||
Release: 1
|
||||
Summary: A working require "Class::Name" and more
|
||||
Source: http://search.cpan.org/CPAN/authors/id/S/SA/SARTAK/Class-Load-%{version}.tar.gz
|
||||
Url: http://search.cpan.org/dist/Class-Load
|
||||
License: GPL+ or Artistic
|
||||
%define cpan_name Class-Load
|
||||
Summary: a working (require "Class::Name") and more
|
||||
Url: http://search.cpan.org/dist/Class-Load/
|
||||
Group: Development/Libraries/Perl
|
||||
License: Perl License
|
||||
#Source: http://www.cpan.org/authors/id/D/DR/DROLSKY/%{cpan_name}-0.12.tar.gz
|
||||
Source: Class-Load-0.11.tar.gz
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%{perl_requires}
|
||||
BuildRequires: perl
|
||||
BuildRequires: perl-macros
|
||||
BuildRequires: make
|
||||
%if 0%{?suse_version} >= 1100
|
||||
BuildRequires: perl(Test::More)
|
||||
BuildRequires: perl(Test::Fatal)
|
||||
%endif
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.42
|
||||
BuildRequires: perl(Data::OptList)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30
|
||||
BuildRequires: perl(Module::Runtime) >= 0.009
|
||||
BuildRequires: perl(Package::Stash) >= 0.32
|
||||
BuildRequires: perl(Scalar::Util)
|
||||
BuildRequires: perl(Test::Fatal)
|
||||
BuildRequires: perl(Test::More) >= 0.88
|
||||
BuildRequires: perl(Try::Tiny)
|
||||
#BuildRequires: perl(Carp)
|
||||
#BuildRequires: perl(Class::Load)
|
||||
#BuildRequires: perl(Class::Load::PP)
|
||||
#BuildRequires: perl(Class::Load::VersionCheck)
|
||||
#BuildRequires: perl(constant)
|
||||
#BuildRequires: perl(Exporter)
|
||||
#BuildRequires: perl(Test::Class::Load)
|
||||
#BuildRequires: perl(Test::Requires)
|
||||
#BuildRequires: perl(Test::Spelling)
|
||||
#BuildRequires: perl(version)
|
||||
Requires: perl(Data::OptList)
|
||||
Requires: perl(Module::Runtime) >= 0.009
|
||||
Requires: perl(Package::Stash) >= 0.32
|
||||
Requires: perl(Scalar::Util)
|
||||
Requires: perl(Test::Fatal)
|
||||
Requires: perl(Test::More) >= 0.88
|
||||
Requires: perl(Try::Tiny)
|
||||
%{perl_requires}
|
||||
|
||||
%description
|
||||
"require EXPR" only accepts "Class/Name.pm" style module names, not
|
||||
"Class::Name". How frustrating! For that, we provide "load_class
|
||||
'Class::Name'".
|
||||
'require EXPR' only accepts 'Class/Name.pm' style module names, not
|
||||
'Class::Name'. How frustrating! For that, we provide 'load_class
|
||||
'Class::Name''.
|
||||
|
||||
It's often useful to test whether a module can be loaded, instead of
|
||||
throwing an error when it's not available. For that, we provide
|
||||
"try_load_class 'Class::Name'".
|
||||
'try_load_class 'Class::Name''.
|
||||
|
||||
Finally, sometimes we need to know whether a particular class has been
|
||||
loaded. Asking %%INC is an option, but that will miss inner packages and
|
||||
loaded. Asking '%INC' is an option, but that will miss inner packages and
|
||||
any class for which the filename does not correspond to the package name.
|
||||
For that, we provide "is_class_loaded 'Class::Name'".
|
||||
For that, we provide 'is_class_loaded 'Class::Name''.
|
||||
|
||||
%prep
|
||||
%setup -q -n "Class-Load-%{version}"
|
||||
%__sed -i '/^auto_install/d' Makefile.PL
|
||||
%setup -q -n %{cpan_name}-%{version}
|
||||
|
||||
%build
|
||||
%__perl Makefile.PL PREFIX="%{_prefix}"
|
||||
%__make %{?jobs:-j%{jobs}}
|
||||
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
||||
%{__make} %{?_smp_mflags}
|
||||
|
||||
%check
|
||||
%{__make} test
|
||||
|
||||
%install
|
||||
%perl_make_install
|
||||
%perl_process_packlist
|
||||
%perl_gen_filelist
|
||||
|
||||
%if 0%{?suse_version} >= 1100
|
||||
%files -f %{name}.files
|
||||
%defattr(-,root,root,755)
|
||||
%doc Changes LICENSE README
|
||||
|
||||
%check
|
||||
%__make test
|
||||
%endif
|
||||
|
||||
%clean
|
||||
%{?buildroot:%__rm -rf "%{buildroot}"}
|
||||
|
||||
%files
|
||||
%defattr(-,root,root)
|
||||
%doc Changes
|
||||
%dir %{perl_vendorlib}/Class
|
||||
%{perl_vendorlib}/Class/Load.pm
|
||||
%dir %{perl_vendorarch}/auto/Class
|
||||
%{perl_vendorarch}/auto/Class/Load
|
||||
%doc %{perl_man3dir}/Class::Load.%{perl_man3ext}%{ext_man}
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user