| |
@@ -1,6 +1,6 @@
|
| |
Name: perl-System-Info
|
| |
- Version: 0.060
|
| |
- Release: 4%{?dist}
|
| |
+ Version: 0.061
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Factory for system specific information objects
|
| |
License: GPL+ or Artistic
|
| |
URL: https://metacpan.org/release/System-Info
|
| |
@@ -11,6 +11,7 @@
|
| |
BuildRequires: perl-generators
|
| |
BuildRequires: perl-interpreter
|
| |
BuildRequires: perl(:VERSION) >= 5.8
|
| |
+ BuildRequires: perl(Config)
|
| |
BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
|
| |
BuildRequires: perl(strict)
|
| |
# Run-time
|
| |
@@ -22,7 +23,7 @@
|
| |
# Tests
|
| |
BuildRequires: perl(Carp)
|
| |
BuildRequires: perl(Test::More) >= 0.88
|
| |
- BuildRequires: perl(Test::NoWarnings)
|
| |
+ BuildRequires: perl(Test::Warnings)
|
| |
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
|
| |
|
| |
%description
|
| |
@@ -32,27 +33,58 @@
|
| |
if the information comes from Windows, Linux, HP-UX, AIX, Solaris, Irix, or
|
| |
VMS, and if the architecture is i386, x64, pa-risc2, or arm.
|
| |
|
| |
+ %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 System-Info-%{version}
|
| |
+ chmod -x examples/*
|
| |
+
|
| |
+ # 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
|
| |
%{make_build}
|
| |
|
| |
-
|
| |
%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
|
| |
make test
|
| |
|
| |
%files
|
| |
- %doc ChangeLog CONTRIBUTING.md README
|
| |
+ %doc ChangeLog CONTRIBUTING.md README examples
|
| |
%{perl_vendorlib}/*
|
| |
%{_mandir}/man3/*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Thu Aug 12 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.061-1
|
| |
+ - 0.061 bump
|
| |
+ - Package tests
|
| |
+
|
| |
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.060-4
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
| |
|
| |