File perl-Parallel-ForkManager.spec of Package perl-Parallel-ForkManager
%define realname Parallel-ForkManager
%define realver 1.19
%define srcext tar.gz
%{!?perl_installarchlib:%define perl_installarchlib %(perl -V:installarchlib | sed "s!.*='!!;s!'.*!!")}
# Common info
Name: perl-%{realname}
Version: %{realver}
Release: wiz%{?extraver:0.}1%{?dist}
License: Artistic-1.0 or GPL-1.0+
Group: Development/Libraries/Perl
Url: http://search.cpan.org/~yanick/Parallel-ForkManager-%{version}/
Summary: A simple parallel processing fork manager
# Install-time parameters
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
# Build-time parameters
BuildArch: noarch
BuildRequires: perl >= 5.006
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(File::Spec)
BuildRequires: perl(IO::Handle)
BuildRequires: perl(IPC::Open3)
BuildRequires: perl(Test::More) perl(Test::Warn)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: http://search.cpan.org/CPAN/authors/id/Y/YA/YANICK/%{realname}-%{realver}.%{srcext}
%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
%setup -q -n %{realname}-%{realver}
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}
# Tests failing on CentOS6 :-(
%if 0%{?suse_version} || 0%{?rhel} >= 7
%check
%{__make} test
%endif
%install
%{__make} DESTDIR=%{buildroot} install_vendor
%clean
[ "%{buildroot}" != "/" ] && %{__rm} -rf %{buildroot}
%files
%defattr(644,root,root,755)
%doc CONTRIBUTORS Changes README.mkdn
%dir %{perl_vendorlib}/Parallel
%{perl_vendorlib}/Parallel/ForkManager.pm
%doc %{_mandir}/man3/*
%exclude %{perl_vendorarch}/auto/Parallel/ForkManager/.packlist
%exclude %{perl_installarchlib}/perllocal.pod
%changelog