| |
@@ -1,6 +1,6 @@
|
| |
Name: perl-SVG
|
| |
- Version: 2.85
|
| |
- Release: 3%{?dist}
|
| |
+ Version: 2.86
|
| |
+ Release: 1%{?dist}
|
| |
Summary: An extension to generate stand-alone or inline SGV
|
| |
License: GPL+ or Artistic
|
| |
URL: https://metacpan.org/release/SVG
|
| |
@@ -16,13 +16,11 @@
|
| |
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
| |
BuildRequires: perl(strict)
|
| |
BuildRequires: perl(warnings)
|
| |
- BuildRequires: sed
|
| |
# Run-time
|
| |
BuildRequires: perl(constant)
|
| |
BuildRequires: perl(Exporter)
|
| |
BuildRequires: perl(parent)
|
| |
BuildRequires: perl(Scalar::Util)
|
| |
- BuildRequires: perl(vars)
|
| |
# Tests
|
| |
BuildRequires: perl(Test::More) >= 0.94
|
| |
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
| |
@@ -33,6 +31,15 @@
|
| |
SVG.pm is a Perl extension to generate stand-alone or inline SVG
|
| |
(scaleable vector graphics) images using the W3C SVG XML recommendation
|
| |
|
| |
+ %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 SVG-%{version}
|
| |
|
| |
@@ -41,7 +48,13 @@
|
| |
|
| |
# Fix line-endings
|
| |
for i in SVG_02_sample.pl image_sample.pl inline_sample.pl inlinesvg.pl starpath.cgi sun_text_sample.pl svgtest2.pl ; do
|
| |
- sed -i 's/\r//' examples/$i
|
| |
+ perl -pi -e 's/\r//' examples/$i
|
| |
+ done
|
| |
+
|
| |
+ # Help file to recognise the 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
|
| |
@@ -50,9 +63,20 @@
|
| |
|
| |
%install
|
| |
%{make_install}
|
| |
- find $RPM_BUILD_ROOT -type f -name '*.bs' -empty -delete
|
| |
+ find %{buildroot} -type f -name '*.bs' -empty -delete
|
| |
+ %{_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
|
| |
@@ -61,8 +85,14 @@
|
| |
%{perl_vendorlib}/*
|
| |
%{_mandir}/man3/*.3*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
|
| |
%changelog
|
| |
+ * Thu Apr 22 2021 Jitka Plesnikova <jplesnik@redhat.com> - 2.86-1
|
| |
+ - 2.86 bump
|
| |
+ - Package tests
|
| |
+
|
| |
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.85-3
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
| |
|
| |