# 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-Task-Weaken Version: 1.06 Release: 16.%{__distinit}%{__distvers} Summary: Ensure that a platform has weaken support License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/Task-Weaken Source0: https://cpan.metacpan.org/modules/by-module/Task/Task-Weaken-%{version}.tar.gz BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(Config) BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(File::Spec) BuildRequires: perl(Scalar::Util) >= 1.14 BuildRequires: perl(strict) BuildRequires: perl(warnings) # Module Runtime # (no additional dependencies) # Test Suite BuildRequires: perl(File::Spec::Functions) BuildRequires: perl(Test::More) # 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 Requires: perl(Scalar::Util) >= 1.14 %description One recurring problem in modules that use Scalar::Util's weaken function is that it is not present in the pure-perl variant. This restores the functionality testing to a dependency you do once in your Makefile.PL, rather than something you have to write extra tests for each time you write a module. %prep %setup -q -n Task-Weaken-%{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 TEST_VERBOSE=1 %files %license LICENSE %doc Changes CONTRIBUTING README %{perl_vendorlib}/Task/ %{_mandir}/man3/Task::Weaken.3* %changelog * Sun May 14 2023 Paul Howarth - 1.06-16 - Use SPDX-format license tag - Use %%license unconditionally * Fri May 31 2019 Paul Howarth - 1.06-5 - Switch upstream from search.cpan.org to metacpan.org * Fri Apr 20 2018 Paul Howarth - 1.06-1 - Update to 1.06 - Merge last commits from adamk's svn repository, which bump the minimum version of Scalar::Util in some cases (GH#1) - Run the tests in verbose mode * Thu Dec 21 2017 Paul Howarth - 1.05-1 - Update to 1.05 - Switch packaging to Dist::Zilla - Require List::Util::XS in some cases - This release by ETHER → update source URL - BR: perl-generators unconditionally - BR: perl-interpreter rather than perl * Tue Jun 13 2017 Paul Howarth - 1.04-17 - Fix building with Perls without '.' in @INC (CPAN RT#120412) - 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 * Wed Sep 28 2016 Paul Howarth - 1.04-14 - Classify buildreqs by usage - Simplify find command using -delete - Use %%license where possible - Drop %%defattr, redundant since rpm 4.4 * Mon Jul 16 2012 Paul Howarth - 1.04-4 - Perl 5.16 post-bootstrap rebuild * Tue Jun 12 2012 Paul Howarth - 1.04-3 - Use search.cpan.org source URL - Don't need to remove empty directories from the buildroot - Drop support for old distributions prior to FC-3: - Don't need to define %%{perl_vendorlib} - Use DESTDIR rather than PERL_INSTALL_ROOT * Wed Jun 29 2011 Paul Howarth - 1.04-2 - Rebuild for perl 5.14.1 in Rawhide - Add support for perl_bootstrap macro - Nobody else likes macros for commands - Fix dist tag for CentOS 6 and Scientific Linux * Tue Mar 8 2011 Paul Howarth - 1.04-1 - Update to 1.04 - Updating author tests - Updating to Module::Install - Simple refactoring of Makefile.PL - Manually run the author tests since they're not run automatically now * Wed Jun 23 2010 Paul Howarth - 1.03-4 - Rebuild for perl 5.12.1 in Rawhide * Sun May 30 2010 Paul Howarth - 1.03-3 - Fix dist tag for RHEL-6 Beta * Wed Feb 17 2010 Paul Howarth - 1.03-2 - Dist tag for Rawhide no longer needs special-casing * Mon Aug 10 2009 Paul Howarth - 1.03-1 - Import from Fedora - Update to 1.03 - Correct license (should be "GPL+ or Artistic", not "GPLv2+ or Artistic") - Enable AUTOMATED_TESTING - Add buildreqs perl(Pod::Simple), perl(Perl::MinimumVersion), perl(Test::CPAN::Meta), perl(Test::MinimumVersion), and perl(Test::Pod) for enhanced test coverage * Sun Jul 26 2009 Fedora Release Engineering - 1.02-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild * Thu Feb 26 2009 Fedora Release Engineering - 1.02-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Sat Jun 07 2008 Caolán McNamara 1.02-3 - Rebuild for dependancies * Fri Mar 28 2008 Simon Wilkinson 1.02-2 - Fix license tag * Thu Mar 27 2008 Simon Wilkinson 1.02-1 - Specfile autogenerated by cpanspec 1.73.