65 lines
2.0 KiB
RPMSpec
65 lines
2.0 KiB
RPMSpec
%define mod_name Module-Load
|
|
|
|
Name: perl-Module-Load
|
|
Epoch: 1
|
|
Version: 0.36
|
|
Release: 2
|
|
Summary: Runtime require of both modules and files
|
|
License: GPL+ or Artistic
|
|
URL: https://metacpan.org/release/%{mod_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/B/BI/BINGOS/%{mod_name}-%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
BuildRequires: perl-generators perl perl-interpreter perl(ExtUtils::MakeMaker) perl(strict) perl(File::Spec)
|
|
BuildRequires: perl(warnings) perl(Config) perl(Exporter) perl(lib) perl(Test::More) perl(vars)
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
|
|
%description
|
|
Module::Load eliminates the need to know whether you are trying to require either a file or a module.
|
|
If you consult perldoc -f require you will see that require will behave differently when given a
|
|
bareword or a string. In the case of a string, require assumes you are wanting to load a file. But
|
|
in the case of a bareword, it assumes you mean a module. This gives nasty overhead when you are trying
|
|
to dynamically require modules at runtime, since you will need to change the module notation
|
|
(Acme::Comment) to a file notation fitting the particular platform you are on.
|
|
|
|
Module::Load eliminates the need for this overhead and will just DWYM.
|
|
|
|
%package_help
|
|
|
|
%prep
|
|
%autosetup -n %{mod_name}-%{version} -p1
|
|
|
|
%build
|
|
perl Makefile.PL NO_PACKLIST=1 INSTALLDIRS=vendor
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
make pure_install DESTDIR=$RPM_BUILD_ROOT
|
|
%{_fixperms} $RPM_BUILD_ROOT/*
|
|
|
|
%check
|
|
make test
|
|
|
|
%files
|
|
%defattr(-,root,root)
|
|
%doc README CHANGES
|
|
%{perl_vendorlib}/*
|
|
|
|
%files help
|
|
%defattr(-,root,root)
|
|
%{_mandir}/man3/*
|
|
|
|
%changelog
|
|
* Mon Oct 31 2022 hongjinghao <hongjinghao@huawei.com> - 1:0.36-2
|
|
- use %{mod_name} marco
|
|
|
|
* Tue Jan 26 2021 liudabo <liudabo1@huawei.com> - 0.36-1
|
|
- upgrade version to 0.36
|
|
|
|
* Wed Jul 29 2020 shixuantong <shixuantong@huawei.com> - 0.34-1
|
|
- update to 0.34-1
|
|
|
|
* Thu Sep 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:0.32-418
|
|
- Package init
|
|
|