perl-Syntax-Keyword-Try/perl-Syntax-Keyword-Try.spec

194 lines
6.0 KiB
RPMSpec
Raw Normal View History

2018-12-04 11:26:51 +00:00
Name: perl-Syntax-Keyword-Try
Version: 0.28
Release: 2%{?dist}
2018-12-04 11:26:51 +00:00
Summary: try/catch/finally syntax for perl
License: GPL-1.0-or-later OR Artistic-1.0-Perl
2018-12-04 11:26:51 +00:00
URL: https://metacpan.org/release/Syntax-Keyword-Try/
Source0: https://cpan.metacpan.org/authors/id/P/PE/PEVANS/Syntax-Keyword-Try-%{version}.tar.gz
2020-07-21 10:11:19 +00:00
BuildRequires: coreutils
2018-12-04 11:26:51 +00:00
BuildRequires: findutils
BuildRequires: gcc
BuildRequires: perl-devel
BuildRequires: perl-generators
BuildRequires: perl-interpreter
BuildRequires: perl(ExtUtils::CBuilder)
BuildRequires: perl(Module::Build)
BuildRequires: perl(strict)
2021-06-03 08:02:11 +00:00
BuildRequires: perl(XS::Parse::Keyword::Builder) >= 0.06
2018-12-04 11:26:51 +00:00
BuildRequires: perl(warnings)
# Run-time
2020-07-21 10:11:19 +00:00
BuildRequires: perl(:VERSION) >= 5.14
2021-05-11 09:22:38 +00:00
BuildRequires: perl(B)
2021-06-03 08:02:11 +00:00
BuildRequires: perl(B::Deparse)
2018-12-04 11:26:51 +00:00
BuildRequires: perl(Carp)
2021-05-11 09:22:38 +00:00
BuildRequires: perl(constant)
2018-12-04 11:26:51 +00:00
BuildRequires: perl(XSLoader)
BuildRequires: perl(XS::Parse::Keyword) >= 0.06
2018-12-04 11:26:51 +00:00
# Tests
BuildRequires: perl(overload)
BuildRequires: perl(Test::More) >= 0.88
# Optional
2021-03-26 16:44:56 +00:00
BuildRequires: perl(Future)
BuildRequires: perl(Future::AsyncAwait)
2021-06-03 08:02:11 +00:00
BuildRequires: perl(Syntax::Keyword::Defer)
2018-12-04 11:26:51 +00:00
BuildRequires: perl(Test::Pod) >= 1.00
BuildRequires: perl(threads)
Requires: perl(XS::Parse::Keyword) >= 0.06
2018-12-04 11:26:51 +00:00
%description
This module provides a syntax plugin that implements exception-handling
semantics in a form familiar to users of other languages, being built on a
block labeled with the try keyword, followed by at least one of a catch or
finally block.
2021-03-26 17:03:09 +00:00
%package tests
Summary: Tests for %{name}
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
Requires: perl-Test-Harness
Requires: perl(Future)
Requires: perl(Future::AsyncAwait)
Requires: perl(threads)
%description tests
Tests from %{name}. Execute them
with "%{_libexecdir}/%{name}/test".
2018-12-04 11:26:51 +00:00
%prep
%setup -q -n Syntax-Keyword-Try-%{version}
2021-03-26 17:03:09 +00:00
# Help file to recognise the Perl scripts
for F in t/*.t; do
2021-06-28 11:14:22 +00:00
perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
2021-03-26 17:03:09 +00:00
chmod +x "$F"
done
2021-06-28 11:14:22 +00:00
%build
perl Build.PL --installdirs=vendor --optimize="$RPM_OPT_FLAGS"
./Build
2021-03-26 17:03:09 +00:00
2018-12-04 11:26:51 +00:00
%install
2021-05-11 09:22:38 +00:00
./Build install --destdir=%{buildroot} --create_packlist=0
find %{buildroot} -type f -name '*.bs' -size 0 -delete
%{_fixperms} %{buildroot}/*
2018-12-04 11:26:51 +00:00
2021-03-26 17:03:09 +00:00
# Install tests
mkdir -p %{buildroot}%{_libexecdir}/%{name}
cp -a t %{buildroot}%{_libexecdir}/%{name}
rm %{buildroot}%{_libexecdir}/%{name}/t/99pod.t
cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
#!/bin/sh
cd %{_libexecdir}/%{name} && exec prove -I . -j "$(getconf _NPROCESSORS_ONLN)"
2021-03-26 17:03:09 +00:00
EOF
chmod +x %{buildroot}%{_libexecdir}/%{name}/test
2018-12-04 11:26:51 +00:00
%check
2021-03-26 17:03:09 +00:00
export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
2018-12-04 11:26:51 +00:00
./Build test
%files
%license LICENSE
%doc Changes README
%{perl_vendorarch}/auto/*
%{perl_vendorarch}/Syntax*
%{_mandir}/man3/*
2021-03-26 17:03:09 +00:00
%files tests
%{_libexecdir}/%{name}
2018-12-04 11:26:51 +00:00
%changelog
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.28-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Fri Dec 16 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.28-1
- 0.28 bump
* Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.27-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
2022-05-31 20:04:41 +00:00
* Tue May 31 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.27-2
- Perl 5.36 rebuild
2022-02-21 14:32:13 +00:00
* Mon Feb 21 2022 Jitka Plesnikova <jplesnik@redhat.com> - 0.27-1
- 0.27 bump
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.26-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
2021-10-14 06:46:14 +00:00
* Thu Oct 14 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.26-1
- 0.26 bump
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.25-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Thu Jun 03 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.25-2
- Add run-requires perl(XS::Parse::Keyword)
2021-06-03 08:02:11 +00:00
* Thu Jun 03 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.25-1
- 0.25 bump
2021-05-21 22:13:53 +00:00
* Fri May 21 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.24-2
- Perl 5.34 rebuild
2021-05-11 09:22:38 +00:00
* Tue May 11 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.24-1
- 0.24 bump
2021-03-29 10:24:59 +00:00
* Mon Mar 29 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.23-1
- 0.23 bump
2021-03-26 16:44:56 +00:00
* Fri Mar 26 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.22-1
- 0.22 bump
2021-03-26 17:03:09 +00:00
- Package tests
2021-03-26 16:44:56 +00:00
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.21-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
2021-01-25 10:51:29 +00:00
* Mon Jan 25 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.21-1
- 0.21 bump
2020-11-24 12:48:47 +00:00
* Tue Nov 24 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.20-1
- 0.20 bump
2020-08-03 07:48:23 +00:00
* Mon Aug 03 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.18-1
- 0.18 bump
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.16-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
2020-07-24 09:09:10 +00:00
* Fri Jul 24 2020 Petr Pisar <ppisar@redhat.com> - 0.16-1
- 0.16 bump
2020-07-21 10:11:19 +00:00
* Tue Jul 21 2020 Petr Pisar <ppisar@redhat.com> - 0.15-1
- 0.15 bump
2020-07-08 07:03:02 +00:00
* Wed Jul 08 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.14-1
- 0.14 bump
2020-06-30 17:45:18 +00:00
* Tue Jun 30 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.13-1
- 0.13 bump
2020-06-23 09:22:59 +00:00
* Tue Jun 23 2020 Jitka Plesnikova <jplesnik@redhat.com> - 0.11-3
- Perl 5.32 rebuild
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
2019-09-09 10:33:24 +00:00
* Mon Sep 09 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.11-1
- 0.11 bump
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.10-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
2019-06-18 11:49:12 +00:00
* Tue Jun 18 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.10-1
- 0.10 bump
2019-05-31 05:05:33 +00:00
* Fri May 31 2019 Jitka Plesnikova <jplesnik@redhat.com> - 0.09-3
- Perl 5.30 rebuild
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.09-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
2018-12-04 11:26:51 +00:00
* Mon Dec 03 2018 Jitka Plesnikova <jplesnik@redhat.com> - 0.09-1
- Specfile autogenerated by cpanspec 1.78.