Blob Blame History Raw
Name:           perl-Parallel-ForkManager
Version:        1.20
Release:        1%{?dist}
Summary:        Simple parallel processing fork manager
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            https://metacpan.org/release/Parallel-ForkManager
Source0:        https://cpan.metacpan.org/authors/id/Y/YA/YANICK/Parallel-ForkManager-%version.tar.gz
# Include a version of Test::Simple so that the test suite can be run.
Source1:        https://cpan.metacpan.org/authors/id/E/EX/EXODIST/Test-Simple-1.302138.tar.gz

BuildArch:      noarch
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Test::More)
BuildRequires:  perl(Test::Pod)
BuildRequires:  perl(Test::Pod::Coverage)
BuildRequires:  perl(Test::Warn)

Requires:       perl(:MODULE_COMPAT_%(eval "`%__perl -V:version`"; echo $version))

%description
This module is intended for use in operations that can be done in parallel
where the number of processes to be forked off should be limited. Typical
use is a downloader which will be retrieving hundreds/thousands of files.


%prep
# The -a 1 unpacks the Test-Simple tarball.
%setup -q -n Parallel-ForkManager-%version -a 1

# Prepare the example scripts for inclusion as documentation, as they are not
# generally useful and have additional dependencies.
sed -i -e '1d' examples/*.pl
chmod 644 examples/*.pl


%build
%__perl Makefile.PL INSTALLDIRS=vendor

# Ensure that the Test::Simple tests aren't run.
sed -i -r -e 's/^(test ::.* )subdirs-test/\1/' Makefile
%make_build


%install
make pure_install PERL_INSTALL_ROOT=%buildroot

find %buildroot -type f -name .packlist -exec rm -f {} \;
find %buildroot -depth -type d -exec rmdir {} 2>/dev/null \;

%_fixperms %buildroot/*

# Clean up things from the Test-Simple module which we don't want.
rm -rf %buildroot/%_mandir/man3/Test*
rm -rf %buildroot/%_mandir/man3/ok*
rm -rf %buildroot/%perl_vendorlib/Test*
rm -rf %buildroot/%perl_vendorlib/ok*

%check
# This miraculously uses the version of Test::Simple we unpacked earlier
make test

%files
%doc Changes examples/
%perl_vendorlib/Parallel/
%_mandir/man3/Parallel*


%changelog
* Fri Jul 20 2018 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.20-1
- Attempt to finally get this package updated to fix bug 751889.
- Clean up the specfile a bit.

* Sat Aug 06 2011 Remi Collet <remi@fedoraproject.org> - 0.7.9-1
- EPEL-6 build

* Mon Jan 24 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 0.7.9-1
- Update to current upstream version.
- Handle new upstream treatment of the examples.
- Update to modern packaging guidelines.

* Thu Mar 06 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.7.5-2
- Rebuild for new perl

* Wed Jan 16 2008 Jason Tibbitts <tibbs@math.uh.edu> 0.7.5-1
- Specfile autogenerated by cpanspec 1.74.
- Make the .pl files documentation instead of installing them to avoid
  additional dependencies.  Also remove their shebang lines to quiet rpmlint.