| |
@@ -1,12 +1,13 @@
|
| |
%global pkgname Data-MessagePack
|
| |
|
| |
Name: perl-Data-MessagePack
|
| |
- Version: 1.01
|
| |
- Release: 7%{?dist}
|
| |
+ Version: 1.02
|
| |
+ Release: 1%{?dist}
|
| |
Summary: MessagePack serialising/deserialising
|
| |
License: GPL+ or Artistic
|
| |
URL: https://metacpan.org/release/Data-MessagePack
|
| |
Source0: https://cpan.metacpan.org/authors/id/S/SY/SYOHEX/%{pkgname}-%{version}.tar.gz
|
| |
+ BuildRequires: coreutils
|
| |
BuildRequires: findutils
|
| |
BuildRequires: gcc
|
| |
BuildRequires: perl-devel
|
| |
@@ -46,11 +47,29 @@
|
| |
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
| |
Requires: perl(XSLoader)
|
| |
|
| |
+ # Filter modules bundled for tests
|
| |
+ %global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_libexecdir}
|
| |
+ %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\(t::Util\\)
|
| |
+
|
| |
%description
|
| |
This module converts Perl data structures to MessagePack and vice versa.
|
| |
|
| |
+ %package tests
|
| |
+ Summary: Tests for %{name}
|
| |
+ Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
| |
+ Requires: perl-Test-Harness
|
| |
+
|
| |
+ %description tests
|
| |
+ Tests from %{name}. Execute them
|
| |
+ with "%{_libexecdir}/%{name}/test".
|
| |
+
|
| |
%prep
|
| |
%setup -qn %{pkgname}-%{version}
|
| |
+ # Help generators to recognize Perl scripts
|
| |
+ for F in t/*.t t/*.pl; do
|
| |
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
|
| |
+ chmod +x "$F"
|
| |
+ done
|
| |
|
| |
%build
|
| |
perl Build.PL --installdirs=vendor --optimize="$RPM_OPT_FLAGS"
|
| |
@@ -61,6 +80,15 @@
|
| |
find $RPM_BUILD_ROOT -type f -name '*.bs' -size 0 -delete
|
| |
%{_fixperms} $RPM_BUILD_ROOT/*
|
| |
|
| |
+ # Install tests
|
| |
+ mkdir -p %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cp -a t %{buildroot}%{_libexecdir}/%{name}
|
| |
+ cat > %{buildroot}%{_libexecdir}/%{name}/test << 'EOF'
|
| |
+ #!/bin/sh
|
| |
+ cd %{_libexecdir}/%{name} && exec prove -I . -r -j "$(getconf _NPROCESSORS_ONLN)"
|
| |
+ EOF
|
| |
+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
| |
+
|
| |
%check
|
| |
./Build test
|
| |
|
| |
@@ -71,7 +99,14 @@
|
| |
%{perl_vendorarch}/Data*
|
| |
%{_mandir}/man3/*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Wed Mar 23 2022 Jitka Plesnikova <jplesnik@redhat.com> - 1.02-1
|
| |
+ - 1.02 bump
|
| |
+ - Package tests
|
| |
+
|
| |
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.01-7
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
| |
|
| |