source: spec/trunk/SPECS/perl-Try-Tiny.spec@ 1566

Last change on this file since 1566 was 1316, checked in by Silvan Scherrer, 8 years ago

spec: perl-Try-Tiny: Release version 0.30-1.

File size: 2.4 KB
Line 
1%{bcond_with perl_Try_Tiny_enables_optional_test}
2
3Name: perl-Try-Tiny
4Summary: Minimal try/catch with proper localization of $@
5Version: 0.30
6Release: 1%{?dist}
7License: MIT
8URL: http://search.cpan.org/dist/Try-Tiny
9Vendor: bww bitwise works GmbH
10Source0: http://search.cpan.org/CPAN/authors/id/E/ET/ETHER/Try-Tiny-%{version}.tar.gz
11BuildArch: noarch
12# Module Build
13BuildRequires: coreutils
14BuildRequires: findutils
15BuildRequires: make
16BuildRequires: perl-generators
17#BuildRequires: perl-interpreter
18BuildRequires: perl(ExtUtils::MakeMaker)
19# Module
20BuildRequires: perl(Carp)
21BuildRequires: perl(constant)
22BuildRequires: perl(Exporter) >= 5.57
23BuildRequires: perl(strict)
24BuildRequires: perl(Sub::Util)
25BuildRequires: perl(warnings)
26# Test Suite
27BuildRequires: perl(File::Spec)
28BuildRequires: perl(Test::More) >= 0.96
29# Optional Tests
30%if %{with perl_Try_Tiny_enables_optional_test}
31BuildRequires: perl(Capture::Tiny) >= 0.12
32BuildRequires: perl(CPAN::Meta) >= 2.120900
33BuildRequires: perl(CPAN::Meta::Check) >= 0.011
34BuildRequires: perl(CPAN::Meta::Requirements)
35%endif
36# Runtime
37Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
38Requires: perl(Sub::Util)
39
40# Do not provide private modules from tests packaged as a documentation
41%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_docdir}/
42
43%description
44This module provides bare bones try/catch statements that are designed to
45minimize common mistakes with eval blocks, and NOTHING else.
46
47This is unlike TryCatch, which provides a nice syntax and avoids adding
48another call stack layer, and supports calling return from the try block to
49return from the parent subroutine. These extra features come at a cost of a
50few dependencies, namely Devel::Declare and Scope::Upper that are occasionally
51problematic, and the additional catch filtering uses Moose type constraints,
52which may not be desirable either.
53
54%prep
55%setup -q -n Try-Tiny-%{version}
56
57%build
58perl Makefile.PL INSTALLDIRS=vendor
59make %{?_smp_mflags}
60make manifypods
61
62%install
63make pure_install DESTDIR=%{buildroot}
64find %{buildroot} -type f -name .packlist -delete
65%{_fixperms} -c %{buildroot}
66
67%check
68#make test
69
70%files
71%license LICENCE
72%doc Changes CONTRIBUTING README t/
73%{perl_vendorlib}/Try/
74%{_mandir}/man3/Try.Tiny.3*
75
76%changelog
77* Fri Feb 23 2018 Silvan Scherrer <silvan.scherrer@aroa.ch> - 0.30-1
78- initial version
Note: See TracBrowser for help on using the repository browser.