forked from pool/perl-Class-Load
Accepted submit request 65168 from user babelworx OBS-URL: https://build.opensuse.org/request/show/65168 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Class-Load?expand=0&rev=1
64 lines
1.8 KiB
RPMSpec
64 lines
1.8 KiB
RPMSpec
# vim: set sw=4 ts=4 et nu:
|
|
|
|
Name: perl-Class-Load
|
|
Version: 0.06
|
|
Release: 0
|
|
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
|
|
Group: Development/Libraries/Perl
|
|
License: Perl License
|
|
BuildRoot: %{_tmppath}/build-%{name}-%{version}
|
|
%{perl_requires}
|
|
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(Scalar::Util)
|
|
Requires: perl(Scalar::Util)
|
|
|
|
%description
|
|
"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'".
|
|
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
|
|
any class for which the filename does not correspond to the package name.
|
|
For that, we provide "is_class_loaded 'Class::Name'".
|
|
|
|
%prep
|
|
%setup -q -n "Class-Load-%{version}"
|
|
%__sed -i '/^auto_install/d' Makefile.PL
|
|
|
|
%build
|
|
%__perl Makefile.PL PREFIX="%{_prefix}"
|
|
%__make %{?jobs:-j%{jobs}}
|
|
|
|
%install
|
|
%perl_make_install
|
|
%perl_process_packlist
|
|
|
|
%if 0%{?suse_version} >= 1100
|
|
%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}
|
|
|