114 lines
3.6 KiB
RPMSpec
114 lines
3.6 KiB
RPMSpec
%global _empty_manifest_terminate_build 0
|
|
|
|
Name: perl-namespace-autoclean
|
|
Version: 0.29
|
|
Release: 1
|
|
License: GPL+ or Artistic
|
|
Summary: Keep imports out of your namespace
|
|
URL: https://metacpan.org/release/namespace-autoclean
|
|
Source0: https://cpan.metacpan.org/modules/by-module/namespace/namespace-autoclean-%{version}.tar.gz
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: coreutils
|
|
BuildRequires: findutils
|
|
BuildRequires: make
|
|
BuildRequires: perl-interpreter
|
|
BuildRequires: perl-generators
|
|
BuildRequires: perl(ExtUtils::MakeMaker)
|
|
BuildRequires: perl(B::Hooks::EndOfScope) >= 0.12
|
|
BuildRequires: perl(List::Util)
|
|
BuildRequires: perl(namespace::clean) >= 0.20
|
|
BuildRequires: perl(strict)
|
|
BuildRequires: perl(Sub::Identify)
|
|
BuildRequires: perl(warnings)
|
|
BuildRequires: perl(Carp)
|
|
BuildRequires: perl(constant)
|
|
BuildRequires: perl(File::Basename)
|
|
BuildRequires: perl(File::Spec)
|
|
BuildRequires: perl(FindBin)
|
|
BuildRequires: perl(overload)
|
|
BuildRequires: perl(Scalar::Util)
|
|
BuildRequires: perl(Test::More) >= 0.94
|
|
BuildRequires: perl(Test::Needs)
|
|
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
Requires: perl(Sub::Identify)
|
|
|
|
%description
|
|
When you import a function into a Perl package, it will naturally also be
|
|
available as a method. The 'namespace::autoclean' pragma will remove all
|
|
imported symbols at the end of the current package's compile cycle. Functions
|
|
called in the package itself will still be bound by their name, but they won't
|
|
show up as methods on your class or instances. This module is very similar to
|
|
namespace::clean, except it will clean all imported functions, no matter if you
|
|
imported them before or after you 'use'd the pragma. It will also not touch
|
|
anything that looks like a method.
|
|
|
|
%package help
|
|
Summary: Keep imports out of your namespace
|
|
Provides: perl-namespace-autoclean-doc
|
|
|
|
%description help
|
|
When you import a function into a Perl package, it will naturally also be
|
|
available as a method. The 'namespace::autoclean' pragma will remove all
|
|
imported symbols at the end of the current package's compile cycle. Functions
|
|
called in the package itself will still be bound by their name, but they won't
|
|
show up as methods on your class or instances. This module is very similar to
|
|
namespace::clean, except it will clean all imported functions, no matter if you
|
|
imported them before or after you 'use'd the pragma. It will also not touch
|
|
anything that looks like a method.
|
|
|
|
%prep
|
|
%setup -q -n namespace-autoclean-%{version}
|
|
|
|
%build
|
|
export PERL_MM_OPT=""
|
|
%{__perl} Makefile.PL INSTALLDIRS=vendor
|
|
make %{?_smp_mflags}
|
|
|
|
%install
|
|
export PERL_MM_OPT=""
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
|
|
|
|
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
|
|
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
|
|
|
|
%{_fixperms} $RPM_BUILD_ROOT/*
|
|
|
|
pushd %{buildroot}
|
|
touch filelist.lst
|
|
if [ -d usr/bin ];then
|
|
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
if [ -d usr/sbin ];then
|
|
find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
if [ -d usr/lib64 ];then
|
|
find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
if [ -d usr/lib ];then
|
|
find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
|
|
fi
|
|
popd
|
|
mv %{buildroot}/filelist.lst .
|
|
|
|
%check
|
|
make test
|
|
|
|
%clean
|
|
rm -rf $RPM_BUILD_ROOT
|
|
|
|
%files -f filelist.lst
|
|
%defattr(-,root,root,-)
|
|
%doc Changes CONTRIBUTING dist.ini LICENCE META.json README
|
|
%{perl_vendorlib}/*
|
|
|
|
%files help
|
|
%{_mandir}/*
|
|
|
|
%changelog
|
|
* Wed Jun 29 2022 misaka00251 <misaka00251@misakanet.cn> - 0.29-1
|
|
- Init package
|