perl-Try-Tiny/perl-Try-Tiny.spec
hongjinghao e2e72dfc67
添加%{mod_name}宏
添加%{mod_name}宏

Signed-off-by: hongjinghao <hongjinghao@huawei.com>
2022-10-31 09:28:42 +00:00

54 lines
1.5 KiB
RPMSpec

%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_docdir}/
%define mod_name Try-Tiny
Name: perl-Try-Tiny
Summary: Minimal try/catch with proper preservation of $@
Version: 0.31
Release: 2
License: MIT
URL: https://metacpan.org/release/%{mod_name}
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/%{mod_name}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: coreutils findutils perl-generators perl-interpreter
BuildRequires: perl(ExtUtils::MakeMaker) perl(Carp) perl(constant) perl(Exporter) >= 5.57 perl(strict)
BuildRequires: perl(Sub::Util) perl(warnings) perl(File::Spec) perl(Test::More) >= 0.96
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) perl(Sub::Util)
%description
This module provides bare bones try/catch statements that are designed to minimize common mistakes with
eval blocks, and NOTHING else.
%prep
%autosetup -n %{mod_name}-%{version} -p1
%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -delete
%{_fixperms} -c $RPM_BUILD_ROOT
%check
make test
%files
%doc LICENCE Changes CONTRIBUTING README t/
%{perl_vendorlib}/Try/
%{_mandir}/man3/Try::Tiny.3*
%changelog
* Mon Oct 31 2022 hongjinghao <hongjinghao@huawei.com> - 0.31-2
- use %{mod_name} marco
* Tue Dec 7 2021 guozhaorui <guozhaorui1@huawei.com> - 0.31-1
- update version to 0.31
* Wed Oct 23 2019 Huiming Xie <xiehuiming@huawei.com> - 0.30-5
- init package