Name:           perl-Paranoid
Version:        2.10
Release:        1%{?dist}
Summary:        Paranoia support for safer programs
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            https://metacpan.org/pod/Paranoid
Source0:        https://cpan.metacpan.org/authors/id/C/CO/CORLISS/Paranoid/Paranoid-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
BuildRequires:  make
BuildRequires:  perl
BuildRequires:  perl(Carp)
BuildRequires:  perl(Errno)
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Socket6) >= 0.23
BuildRequires:  perl(Test::More)
BuildRequires:  perl(Test::Pod)
BuildRequires:  perl(Test::Pod::Coverage)
Requires:       perl(Carp)
Requires:       perl(Errno)
Requires:       perl(Socket6) >= 0.23
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description
This collection of modules started out as modules which perform things
(debatably) in a safer and taint-safe manner. Since then it's also grown to
include functionality that fit into the same framework and conventions of
the original modules, including keeping the debug hooks for command-line
debugging.

%prep
%setup -q -n Paranoid-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT

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

%{_fixperms} $RPM_BUILD_ROOT/*

%check
make test

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc CHANGELOG CREDITS LICENSE META.json README
%{perl_vendorlib}/*
%{_mandir}/man3/*

%changelog
* Wed Mar 23 2022 Greg Wildman <greg@techno.co.za> 2.10-1
- Updated version.

* Fri Feb 25 2022 Greg Wildman <greg@techno.co.za> 2.09-1
- Updated version.

* Thu Sep 26 2019 Greg Wildman <greg@techno.co.za> 2.07-1
- Updated version.

* Tue Jun 06 2017 Greg Wildman <greg@techno.co.za> 2.05-3
- Specfile autogenerated by cpanspec 1.78.
- Added Test::More dependency