# Detect the distribution in use %global __despace head -n 1 | tr -d '[:space:]' | sed -e 's/[(].*[)]//g' %global __lower4 cut -c 1-4 | tr '[:upper:]' '[:lower:]' %global __distfile %([ -f /etc/SuSE-release ] && echo /etc/SuSE-release || echo /etc/redhat-release) %global __distinit %(sed -e 's/ release .*//' -e 's/\\([A-Za-z]\\)[^ ]*/\\1/g' %{__distfile} | %{__despace} | %{__lower4}) %global __distvers %(sed -e 's/.* release \\([^. ]*\\).*/\\1/' %{__distfile} | %{__despace}) # Identify Alma, CentOS, CentOS Stream and Rocky Linux as rhel %if "%{__distinit}" == "a" || "%{__distinit}" == "c" || "%{__distinit}" == "cl" || "%{__distinit}" == "cs" || "%{__distinit}" == "rl" %global __distinit rhel %endif # Dist tag for Fedora is still "fc" %if "%{__distinit}" == "f" %global __distinit fc %endif Name: perl-Test-SubCalls Version: 1.10 Release: 17.%{__distinit}%{__distvers} Summary: Track the number of times subs are called License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/Test-SubCalls Source0: https://cpan.metacpan.org/modules/by-module/Test/Test-SubCalls-%{version}.tar.gz BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(warnings) # Module Runtime BuildRequires: perl(Exporter) BuildRequires: perl(File::Spec) >= 0.80 BuildRequires: perl(Hook::LexWrap) >= 0.20 BuildRequires: perl(strict) BuildRequires: perl(Test::Builder) BuildRequires: perl(Test::More) >= 0.42 BuildRequires: perl(vars) # Test Suite BuildRequires: perl(File::Spec::Functions) BuildRequires: perl(Test::Builder::Tester) # Optional Tests BuildRequires: perl(CPAN::Meta) >= 2.120900 # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif %description There are a number of different situations (like testing caching code) where you want to want to do a number of tests, and then verify that some underlying subroutine deep within the code was called a specific number of times. This module provides a number of functions for doing testing in this way, in association with your normal Test::More (or similar) test scripts. %prep %setup -q -n Test-SubCalls-%{version} %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete %{_fixperms} -c %{buildroot} %check make test %files %license LICENSE %doc Changes CONTRIBUTING README %{perl_vendorlib}/Test/ %{_mandir}/man3/Test::SubCalls.3* %changelog * Sat May 27 2023 Paul Howarth - 1.10-17 - Use SPDX-format license tag - Use %%license unconditionally * Wed Jun 5 2019 Paul Howarth - 1.10-6 - Perl 5.30 rebuild * Tue Jan 2 2018 Paul Howarth - 1.10-1 - Update to 1.10 - Switch packaging to Dist::Zilla, which makes the distribution installable again on perl 5.27.7 (CPAN RT#123867) - This release by ETHER ⇒ update source URL - BR: perl-generators unconditionally - BR: perl-interpreter rather than perl * Tue Jun 13 2017 Paul Howarth - 1.09-30 - Fix building on Perl without "." in @INC (CPAN RT#120411) - Drop support for EOL distributions prior to F-13 - Drop BuildRoot: and Group: tags - Drop explicit buildroot cleaning in %%install section - Drop explicit %%clean section * Thu Oct 6 2016 Paul Howarth - 1.09-26 - Classify buildreqs by usage - Simplify find command using -delete * Fri Aug 29 2014 Paul Howarth - 1.09-19 - Drop %%defattr, redundant since rpm 4.4 - Use %%license where possible * Mon Jul 16 2012 Paul Howarth - 1.09-10 - Perl 5.16 post-bootstrap rebuild * Mon Jun 25 2012 Paul Howarth - 1.09-9 - BR: perl(Cwd) and perl(File::Spec::Functions) * Thu Apr 5 2012 Paul Howarth - 1.09-8 - Bump Test::More version requirement to 0.42 - Bump Test::Pod version requirement to 1.26 - BR: perl(Exporter) - BR: perl(File::Spec) ≥ 0.80 - BR: perl(Pod::Simple) ≥ 3.07 unless bootstrapping - BR: perl(Test::Builder) - Don't need to remove empty directories from buildroot - Drop support for old distributions prior to FC-3: - Don't need to define %%{perl_vendorlib} - Use DESTDIR rather than PERL_INSTALL_ROOT - Use search.cpan.org source URL * Wed Jun 29 2011 Paul Howarth - 1.09-6 - Rebuild for perl 5.14.1 in Rawhide - Nobody else likes macros for commands - Add support for perl_bootstrap macro - Fix dist tag for CentOS 6 and Scientific Linux * Wed Jun 23 2010 Paul Howarth - 1.09-4 - Rebuild for perl 5.12.1 in Rawhide * Fri May 28 2010 Paul Howarth - 1.09-3 - Fix dist tag for RHEL-6 Beta * Thu Mar 4 2010 Paul Howarth - 1.09-2 - Dist tag for Rawhide no longer needs special-casing - Use %%{_fixperms} macro instead of our own %%{__chmod} incantation * Mon Apr 20 2009 Paul Howarth - 1.09-1 - Update to 1.09 (upgrade to Module::Install::DSL 0.83) - Update to SLES-compatible dist tag macros - Add buildreqs perl(Test::CPAN::Meta) and perl(Test::MinimumVersion) >= 0.008 and enable author tests * Wed Sep 3 2008 Paul Howarth - 1.08-1 - Update to 1.08 - Add buildreq perl(ExtUtils::MakeMaker * Mon Sep 1 2008 Paul Howarth - 1.07-4 - Import from Fedora - Drop version requirements for perl(Test::Builder::Tester) and perl(Test::More) to support building on older distributions * Wed Feb 27 2008 Tom "spot" Callaway - 1.07-3 - Rebuild for perl 5.10 (again) * Sat Jan 12 2008 Tom "spot" Callaway - 1.07-2 - Rebuild for new perl * Wed Dec 19 2007 Tom "spot" Callaway - 1.07-1 - Bump to 1.07 - License fix * Fri May 12 2006 Jose Pedro Oliveira - 1.06-1 - Update to 1.06 * Tue Apr 25 2006 Jose Pedro Oliveira - 0.05-1 - First build