| |
@@ -1,6 +1,6 @@
|
| |
Name: perl-String-Formatter
|
| |
- Version: 0.102084
|
| |
- Release: 20%{?dist}
|
| |
+ Version: 1.234
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Build sprintf-like functions of your own
|
| |
License: GPLv2
|
| |
URL: https://metacpan.org/release/String-Formatter
|
| |
@@ -10,15 +10,17 @@
|
| |
BuildRequires: make
|
| |
BuildRequires: perl-generators
|
| |
BuildRequires: perl-interpreter
|
| |
- BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
| |
+ BuildRequires: perl(:VERSION) >= 5.12
|
| |
+ BuildRequires: perl(Config)
|
| |
+ BuildRequires: perl(ExtUtils::MakeMaker) >= 6.78
|
| |
BuildRequires: perl(strict)
|
| |
BuildRequires: perl(warnings)
|
| |
- BuildRequires: sed
|
| |
# Run-time:
|
| |
BuildRequires: perl(Params::Util)
|
| |
BuildRequires: perl(Sub::Exporter)
|
| |
# tests
|
| |
- BuildRequires: perl(Test::More) >= 0.88
|
| |
+ BuildRequires: perl(File::Spec)
|
| |
+ BuildRequires: perl(Test::More) >= 0.96
|
| |
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
| |
|
| |
%{?perl_default_filter}
|
| |
@@ -31,13 +33,24 @@
|
| |
most cases, it should be easy to build all sorts of formatters out of the
|
| |
options built into String::Formatter.
|
| |
|
| |
+ %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 -q -n String-Formatter-%{version}
|
| |
- sed -i -e '1s~#!perl~#!%{__perl}~' bench.pl
|
| |
- # don't install benchmark
|
| |
- mkdir eg
|
| |
- mv bench.pl eg
|
| |
- sed -i -e 's/^bench\.pl$/eg\/bench.pl/' MANIFEST
|
| |
+ perl -MConfig -pi -e 's|^#!.*perl\b|$Config{startperl}|' misc/bench.pl
|
| |
+
|
| |
+ # Help generators to recognize Perl scripts
|
| |
+ for F in t/*.t; do
|
| |
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!.*perl\b}{$Config{startperl}}' "$F"
|
| |
+ chmod +x "$F"
|
| |
+ done
|
| |
|
| |
%build
|
| |
perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
|
| |
@@ -45,18 +58,35 @@
|
| |
|
| |
%install
|
| |
%{make_install}
|
| |
- %{_fixperms} $RPM_BUILD_ROOT/*
|
| |
+ %{_fixperms} %{buildroot}/*
|
| |
+
|
| |
+ # 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 . -j "$(getconf _NPROCESSORS_ONLN)"
|
| |
+ EOF
|
| |
+ chmod +x %{buildroot}%{_libexecdir}/%{name}/test
|
| |
|
| |
%check
|
| |
+ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
| |
make test
|
| |
|
| |
%files
|
| |
%license LICENSE
|
| |
- %doc Changes README eg/bench.pl
|
| |
+ %doc Changes README misc/bench.pl
|
| |
%{perl_vendorlib}/*
|
| |
%{_mandir}/man3/*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Thu Sep 02 2021 Jitka Plesnikova <jplesnik@redhat.com> - 1.234
|
| |
+ - 1.234 bump
|
| |
+ - Package tests
|
| |
+
|
| |
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.102084-20
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
| |
|
| |