# 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-String-Escape Version: 2010.002 Release: 39.%{__distinit}%{__distvers} Summary: Registry of string functions, including backslash escapes License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/String-Escape Source0: https://cpan.metacpan.org/modules/by-module/String/String-Escape-%{version}.tar.gz BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) # Module Runtime BuildRequires: perl(Carp) BuildRequires: perl(Exporter) BuildRequires: perl(strict) BuildRequires: perl(vars) BuildRequires: perl(warnings) # Test Suite BuildRequires: perl(Test) BuildRequires: perl(Test::More) # Optional Tests BuildRequires: perl(Pod::Coverage) >= 0.18 BuildRequires: perl(Test::Pod) >= 1.22 BuildRequires: perl(Test::Pod::Coverage) >= 1.08 # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif %description This module provides a flexible calling interface to some frequently-performed string conversion functions, including applying and removing C/Unix-style backslash escapes like \n and \t, wrapping and removing double-quotes, and truncating to fit within a desired length. %prep %setup -q -n String-Escape-%{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 %doc Changes README %{perl_vendorlib}/String/ %{_mandir}/man3/String::Escape.3* %changelog * Tue Jul 4 2023 Paul Howarth - 2010.002-39 - Switch upstream from search.cpan.org to metacpan.org - Use SPDX-format license tag * Fri Apr 13 2018 Paul Howarth - 2010.002-24 - BR: perl-generators unconditionally - BR: perl-interpreter rather than perl - 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 * Tue Sep 27 2016 Paul Howarth - 2010.002-20 - Classify buildreqs by usage - Simplify find command using -delete * Sun Aug 31 2014 Paul Howarth - 2010.002-15 - Drop %%defattr, redundant since rpm 4.4 * Sat Jun 30 2012 Paul Howarth - 2010.002-9 - BR: perl(Carp), perl(Exporter) and perl(Test) - 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 DETDIR rather than PERL_INSTALL_ROOT * Wed Jul 6 2011 Paul Howarth - 2010.002-4 - Rebuild for perl 5.14.1 in Rawhide - Nobody else likes macros for commands - Fix dist tag for CentOS 6 and Scientific Linux * Thu Jun 24 2010 Paul Howarth - 2010.002-3 - Rebuild for perl 5.12.1 in Rawhide * Fri May 7 2010 Paul Howarth - 2010.002-2 - Fix dist tag to work with RHEL6 Beta * Tue Feb 2 2010 Paul Howarth - 2010.002-1 - Update to 2010.002 - Added META.yml (CPAN RT#41226) - Changed unprintable to accept optional x in \xFF escapes - Added new functions with support for more Perl escapes - Added tests for new functions and previous bug reports - BR: perl(Test::More), perl(Test::Pod), perl(Test::Pod::Coverage) - Dist tag for Rawhide no longer needs special-casing * Thu Sep 24 2009 Paul Howarth - 2002.001-2 - Define RPM macros in global scope * Thu Oct 16 2008 Paul Howarth - 2002.001-1 - Initial RPM version