File perl-forks.spec of Package perl-forks

#
# spec file for package perl-forks
#
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           perl-forks
Version:        0.36
Release:        0
%define cpan_name forks
Summary:        Drop-in Replacement for Perl Threads Using Fork()
License:        Artistic-1.0 or GPL-1.0+
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/forks/
Source0:        https://cpan.metacpan.org/authors/id/R/RY/RYBSKEJ/%{cpan_name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
BuildRequires:  perl(Acme::Damn)
BuildRequires:  perl(Devel::Symdump)
BuildRequires:  perl(List::MoreUtils) >= 0.15
BuildRequires:  perl(Sys::SigAction) >= 0.11
Requires:       perl(Acme::Damn)
Requires:       perl(Devel::Symdump)
Requires:       perl(List::MoreUtils) >= 0.15
Requires:       perl(Sys::SigAction) >= 0.11
%{perl_requires}

%description
The "forks" pragma allows a developer to use threads without having to have
a threaded perl, or to even run 5.8.0 or higher.

Refer to the threads module for ithreads API documentation. Also, use

    perl -Mforks -e 'print $threads::VERSION'

to see what version of threads you should refer to regarding supported API
features.

There were a number of goals that I am trying to reach with this
implementation.

    Using this module *only* makes sense if you run on a system that has an
    implementation of the 'fork' function by the Operating System. Windows
    is currently the only known system on which Perl runs which does *not*
    have an implementation of 'fork'. Therefore, it *doesn't* make any
    sense to use this module on a Windows system. And therefore, a check is
    made during installation barring you from installing on a Windows
    system.

%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes CREDITS MANIFEST.skip README TODO

%changelog
openSUSE Build Service is sponsored by