# Add a support for the egd daemon %bcond_without perl_Crypt_Random_Seed_enables_egd Name: perl-Crypt-Random-Seed Version: 0.03 Release: 30%{?dist} Summary: Simple method to get strong randomness License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/Crypt-Random-Seed Source0: https://cpan.metacpan.org/modules/by-module/Crypt/Crypt-Random-Seed-%{version}.tar.gz BuildArch: noarch BuildRequires: coreutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(:VERSION) >= 5.6.2 BuildRequires: perl(Config) BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 BuildRequires: perl(strict) BuildRequires: perl(warnings) # Run-time: BuildRequires: perl(base) BuildRequires: perl(Carp) BuildRequires: perl(constant) BuildRequires: perl(Exporter) >= 5.57 BuildRequires: perl(Fcntl) # Win32 not used # Optional run-time: # Skip egd to exhibit /dev/random # Crypt::Random::TESHA2 not used since we have /dev/random # Skip IO::Socket to exhibit /dev/random # Tests BuildRequires: perl(Test::More) >= 0.45 # Optional tests: # Crypt::Random::TESHA2 not used since we have /dev/random %if %{with perl_Crypt_Random_Seed_enables_egd} Recommends: egd Recommends: perl(IO::Socket) %endif # Remove under-specified dependencies %global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Test::More\\)$ %description A simple mechanism to get strong randomness. The main purpose of this module is to provide a simple way to generate a seed for a PRNG such as Math::Random::ISAAC, for use in cryptographic key generation, or as the seed for an upstream module such as Bytes::Random::Secure. Flags for requiring non-blocking sources are allowed, as well as a very simple method for plugging in a source. %package tests Summary: Tests for %{name} Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release} Requires: perl-Test-Harness Requires: perl(Test::More) >= 0.45 %description tests Tests from %{name}. Execute them with "%{_libexecdir}/%{name}/test". %prep %setup -q -n Crypt-Random-Seed-%{version} # Remove always skipped tests for F in t/04-win32.t \ t/90-release-perlcritic.t t/91-release-pod-syntax.t \ t/92-release-pod-coverage.t t/93-release-kwalitee.t \ t/94-release-manifest.t; do rm "$F" perl -i -ne 'print $_ unless m{\A\Q'"$F"'\E}' MANIFEST done # Correct shebangs for F in t/*.t; do perl -i -MConfig -ple 'print $Config{startperl} if $. == 1 && !s{\A#!\s*perl}{$Config{startperl}}' "$F" chmod +x "$F" done %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 %{make_build} %install %{make_install} %{_fixperms} %{buildroot}/* # 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 %check export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}') make test %files %license LICENSE %doc Changes README TODO examples %dir %{perl_vendorlib}/Crypt %dir %{perl_vendorlib}/Crypt/Random %{perl_vendorlib}/Crypt/Random/Seed.pm %{_mandir}/man3/Crypt::Random::Seed.* %files tests %{_libexecdir}/%{name} %changelog * Mon Nov 25 2024 Petr Pisar - 0.03-30 - Modernize a spec file - Package the tests * Thu Jul 18 2024 Fedora Release Engineering - 0.03-29 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Thu Jan 25 2024 Fedora Release Engineering - 0.03-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 0.03-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Jul 20 2023 Fedora Release Engineering - 0.03-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Fri Jan 20 2023 Fedora Release Engineering - 0.03-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 0.03-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Mon May 30 2022 Jitka Plesnikova - 0.03-23 - Perl 5.36 rebuild * Fri Jan 21 2022 Fedora Release Engineering - 0.03-22 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Thu Jul 22 2021 Fedora Release Engineering - 0.03-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri May 21 2021 Jitka Plesnikova - 0.03-20 - Perl 5.34 rebuild * Wed Jan 27 2021 Fedora Release Engineering - 0.03-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Tue Jul 28 2020 Fedora Release Engineering - 0.03-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Mon Jun 22 2020 Jitka Plesnikova - 0.03-17 - Perl 5.32 rebuild * Wed Mar 25 2020 Petr Pisar - 0.03-16 - Modernize a spec file * Wed Jan 29 2020 Fedora Release Engineering - 0.03-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Fri Jul 26 2019 Fedora Release Engineering - 0.03-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Fri May 31 2019 Jitka Plesnikova - 0.03-13 - Perl 5.30 rebuild * Fri Feb 01 2019 Fedora Release Engineering - 0.03-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild * Fri Jul 13 2018 Fedora Release Engineering - 0.03-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild * Thu Jun 28 2018 Jitka Plesnikova - 0.03-10 - Perl 5.28 rebuild * Thu Feb 08 2018 Fedora Release Engineering - 0.03-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Thu Jul 27 2017 Fedora Release Engineering - 0.03-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sun Jun 04 2017 Jitka Plesnikova - 0.03-7 - Perl 5.26 rebuild * Sat Feb 11 2017 Fedora Release Engineering - 0.03-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Sun May 15 2016 Jitka Plesnikova - 0.03-5 - Perl 5.24 rebuild * Thu Feb 04 2016 Fedora Release Engineering - 0.03-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Thu Jun 18 2015 Fedora Release Engineering - 0.03-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Thu Jun 04 2015 Jitka Plesnikova - 0.03-2 - Perl 5.22 rebuild * Sun Jan 18 2015 David Dick - 0.03-1 - Initial release