75 lines
2.3 KiB
RPMSpec
75 lines
2.3 KiB
RPMSpec
Name: perl-Sub-Name
|
|
Version: 0.26
|
|
Release: 1
|
|
Summary: (Re)name a sub
|
|
License: GPL+ or Artistic
|
|
URL: https://metacpan.org/release/Sub-Name
|
|
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/Sub-Name-%{version}.tar.gz
|
|
|
|
BuildRequires: gcc coreutils, findutils, perl-interpreter, perl-devel, perl-generators
|
|
BuildRequires: perl(ExtUtils::MakeMaker), perl(Exporter) >= 5.57, perl(strict)
|
|
BuildRequires: perl(warnings), perl(XSLoader), perl(B), perl(B::Deparse), perl(Carp)
|
|
BuildRequires: perl(feature), perl(File::Spec), perl(if), perl(Test::More) >= 0.88
|
|
BuildRequires: perl(CPAN::Meta) >= 2.120900
|
|
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
|
|
|
%description
|
|
This module has only one function, which is also exported by default:
|
|
subname NAME, CODEREF
|
|
|
|
Assigns a new name to referenced sub. If package specification is
|
|
omitted in the name, then the current package is used. The return
|
|
value is the sub.
|
|
|
|
The name is only used for informative routines (caller, Carp, etc).
|
|
You won't be able to actually invoke the sub by the given name.
|
|
To allow that, you need to do glob-assignment yourself.
|
|
|
|
Note that for anonymous closures (subs that reference lexicals declared
|
|
outside the sub itself) you can name each instance of the closure differently,
|
|
which can be very useful for debugging.
|
|
|
|
%package help
|
|
Summary: man files for %{name}
|
|
Requires: man
|
|
|
|
%description help
|
|
This package includes man files for %{name}.
|
|
|
|
%prep
|
|
%autosetup -n Sub-Name-%{version} -p1
|
|
|
|
%build
|
|
perl Makefile.PL INSTALLDIRS=vendor optimize="%{optflags}"
|
|
%make_build
|
|
|
|
%install
|
|
make pure_install DESTDIR=$RPM_BUILD_ROOT NO_PACKLIST=1
|
|
find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -delete
|
|
%{_fixperms} $RPM_BUILD_ROOT
|
|
|
|
%check
|
|
make test
|
|
|
|
%files
|
|
%license LICENCE
|
|
%doc CONTRIBUTING README
|
|
%{perl_vendorarch}/auto/Sub/
|
|
%{perl_vendorarch}/Sub/
|
|
|
|
%files help
|
|
%{_mandir}/man*/*
|
|
|
|
%changelog
|
|
* Tue Jun 14 2022 SimpleUpdate Robot <tc@openeuler.org> - 0.26-1
|
|
- Upgrade to version 0.26
|
|
|
|
* Web 02 Jun 2021 zhaoyao<zhaoyao32@huawei.com> - 0.21-11
|
|
- fixs faileds: /bin/sh: gcc: command not found.
|
|
|
|
* Tue Jan 14 2020 hy-euler <eulerstoragemt@huawei.com> 0.21-10
|
|
- Delete the unnecessary BuildRequires
|
|
|
|
* Sat Jan 11 2020 openEuler Buildteam <buildteam@openeuler.org> - 0.21-9
|
|
- Package init
|