| |
@@ -1,7 +1,7 @@
|
| |
- %global cpan_version 0.997002
|
| |
+ %global cpan_version 0.997003
|
| |
|
| |
Name: perl-App-cpm
|
| |
- Version: 0.997.002
|
| |
+ Version: 0.997.003
|
| |
Release: 1%{?dist}
|
| |
Summary: Fast CPAN module installer
|
| |
License: GPL+ or Artistic
|
| |
@@ -19,14 +19,14 @@
|
| |
BuildRequires: perl(warnings)
|
| |
# Runtime
|
| |
# None of them are used at tests.
|
| |
+ # BuildRequires: gzip
|
| |
# BuildRequires: perl(Archive::Tar)
|
| |
# BuildRequires: perl(Archive::Zip) >= 1.68
|
| |
# BuildRequires: perl(Carton::Snapshot)
|
| |
- # BuildRequires: perl(Class::Tiny)
|
| |
# BuildRequires: perl(Command::Runner) >= 0.100
|
| |
# BuildRequires: perl(Config)
|
| |
# BuildRequires: perl(constant)
|
| |
- # BuildRequires: perl(CPAN::Common::Index::Mirror)
|
| |
+ # BuildRequires: perl(CPAN::02Packages::Search)
|
| |
# BuildRequires: perl(CPAN::DistnameInfo)
|
| |
# BuildRequires: perl(CPAN::Meta)
|
| |
# BuildRequires: perl(CPAN::Meta::Prereqs)
|
| |
@@ -49,7 +49,6 @@
|
| |
# BuildRequires: perl(Getopt::Long)
|
| |
# BuildRequires: perl(HTTP::Tinyish) >= 0.12
|
| |
# BuildRequires: perl(IO::Handle)
|
| |
- # BuildRequires: perl(IO::Uncompress::Gunzip)
|
| |
# BuildRequires: perl(IPC::Run3)
|
| |
# BuildRequires: perl(JSON::PP) >= 2.27300
|
| |
# BuildRequires: perl(List::Util)
|
| |
@@ -68,6 +67,7 @@
|
| |
# BuildRequires: perl(YAML::PP) >= 0.026
|
| |
# Tests only
|
| |
BuildRequires: perl(Test::More)
|
| |
+ Requires: gzip
|
| |
Requires: perl(:MODULE_COMPAT_%(eval "$(perl -V:version)"; echo $version))
|
| |
Requires: perl(Archive::Tar)
|
| |
Requires: perl(Archive::Zip) >= 1.68
|
| |
@@ -99,8 +99,22 @@
|
| |
cpm is a fast CPAN module installer, which uses Menlo::CLI::Compat in
|
| |
parallel.
|
| |
|
| |
+ %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 App-cpm-%{cpan_version}
|
| |
+ # Help generators to recognize Perl scripts
|
| |
+ for F in t/*.t; do
|
| |
+ perl -i -MConfig -ple 'print $Config{startperl} if $. == 1' "$F"
|
| |
+ chmod +x "$F"
|
| |
+ done
|
| |
|
| |
%build
|
| |
perl Build.PL --installdirs=vendor
|
| |
@@ -109,9 +123,19 @@
|
| |
%install
|
| |
./Build install --destdir=$RPM_BUILD_ROOT --create_packlist=0
|
| |
find $RPM_BUILD_ROOT%{_mandir} -type f -empty -delete
|
| |
+ # 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
|
| |
+ # Correct permissions
|
| |
%{_fixperms} $RPM_BUILD_ROOT/*
|
| |
|
| |
%check
|
| |
+ export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
|
| |
./Build test
|
| |
|
| |
%files
|
| |
@@ -122,7 +146,14 @@
|
| |
%{_mandir}/man1/*
|
| |
%{_mandir}/man3/*
|
| |
|
| |
+ %files tests
|
| |
+ %{_libexecdir}/%{name}
|
| |
+
|
| |
%changelog
|
| |
+ * Wed Feb 24 2021 Petr Pisar <ppisar@redhat.com> - 0.997.003-1
|
| |
+ - 0.997003 bump
|
| |
+ - Package tests
|
| |
+
|
| |
* Tue Jan 26 2021 Jitka Plesnikova <jplesnik@redhat.com> - 0.997.002-1
|
| |
- 0.997002 bump
|
| |
|
| |