# 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 Summary: String manipulation for Unicode strings Name: perl-Unicode-String Version: 2.10 Release: 27.%{__distinit}%{__distvers} License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/Unicode-String Source0: https://cpan.metacpan.org/modules/by-module/Unicode/Unicode-String-%{version}.tar.gz Patch0: Unicode-String-2.09-utf8doc.patch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: gcc BuildRequires: make BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(ExtUtils::MakeMaker) # Module Runtime BuildRequires: perl(Carp) BuildRequires: perl(DynaLoader) BuildRequires: perl(Exporter) BuildRequires: perl(MIME::Base64) >= 2.00 BuildRequires: perl(overload) BuildRequires: perl(strict) BuildRequires: perl(vars) # Test Suite BuildRequires: perl(Test) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif Requires: perl(MIME::Base64) >= 2.00 # Don't "provide" private Perl libs %{?perl_default_filter} %description These are experimental modules to handle various Unicode issues. They were made before perl included native UTF8 support. %prep %setup -q -n Unicode-String-%{version} # Recode documentation as UTF-8 # Can't just use iconv because README includes an example of # character code conversion that would be wrong if simply recoded %patch -P 0 -p1 %build perl Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}" make %{?_smp_mflags} %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete find %{buildroot} -type f -name '*.bs' -empty -delete %{_fixperms} -c %{buildroot} %check make test %files %doc Changes README %{perl_vendorarch}/Unicode/ %{perl_vendorarch}/auto/Unicode/ %{_mandir}/man3/Unicode::CharName.3* %{_mandir}/man3/Unicode::String.3* %changelog * Wed Jun 12 2024 Paul Howarth - 2.10-27 - Perl 5.40 rebuild * Tue Jul 11 2023 Paul Howarth - 2.10-23 - Perl 5.38 rebuild * Sat Jun 24 2023 Paul Howarth - 2.10-22 - Use SPDX-format license tag - Avoid use of deprecated patch syntax * Tue May 31 2022 Paul Howarth - 2.10-20 - Perl 5.36 rebuild * Fri May 21 2021 Paul Howarth - 2.10-17 - Perl 5.34 rebuild * Wed Jun 24 2020 Paul Howarth - 2.10-14 - Perl 5.32 rebuild * Thu May 30 2019 Paul Howarth - 2.10-11 - Perl 5.30 rebuild * Wed Jun 27 2018 Paul Howarth - 2.10-8 - Perl 5.28 rebuild * Thu Mar 22 2018 Paul Howarth - 2.10-7 - BR: gcc - BR: perl-generators unconditionally - BR: perl-interpreter rather than perl * Sun Jun 4 2017 Paul Howarth - 2.10-3 - 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 - BR: perl-devel unconditionally * Fri Sep 9 2016 Paul Howarth - 2.10-1 - Update to 2.10 - Fix for perl 5.24 compatibility - Classify buildreqs by usage - Simplify find commands using -empty and -delete - Fix for strange location of source tarball * Thu Aug 28 2014 Paul Howarth - 2.09-33 - Drop %%defattr, redundant since rpm 4.4 * Tue Jul 16 2013 Paul Howarth - 2.09-29 - Perl 5.18 rebuild * Thu Jul 5 2012 Paul Howarth - 2.09-25 - Perl 5.16 rebuild * Sun Jun 24 2012 Paul Howarth - 2.09-23 - Get rid of "defined(%%hash) is deprecated" warning (http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657144) * Tue Jun 12 2012 Paul Howarth - 2.09-22 - 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_vendorarch} - Use DESTDIR rather than PERL_INSTALL_ROOT - Use %%{_fixperms} macro rather than our own chmod incantation * Fri Jul 8 2011 Paul Howarth - 2.09-19 - 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 - 2.09-9 - Rebuild for perl 5.12.1 in Rawhide * Fri May 28 2010 Paul Howarth - 2.09-8 - Fix dist tag for RHEL-6 Beta * Thu Feb 18 2010 Paul Howarth - 2.09-7 - Properly convert documentation to UTF-8 encoding - Dist tag for Rawhide no longer needs special-casing * Fri Oct 2 2009 Paul Howarth - 2.09-6 - Use %%{?perl_default_filter} for the provides filter * Fri Mar 6 2009 Paul Howarth - 2.09-5 - Filter out unwanted provides for perl shared objects - Update to SLES-compatible dist tag macros * Sat Nov 1 2008 Paul Howarth - 2.09-4 - Tweak dist tag macros to work on current Rawhide with three-part releasenum - Clarify license as GPL version 1 or later, or Artistic (i.e. same as perl) * Mon Mar 19 2007 Paul Howarth - 2.09-3 - Fix dist tag for development builds and Fedora 7 onwards - Fix argument order for find with -depth - BuildRequire perl(ExtUtils::MakeMaker) - Convert Unicode::String manpage to UTF-8 * Thu Aug 31 2006 Paul Howarth - 2.09-2 - Disregard distribution sub-release number in dist tag - Define %%{__id_u} in a more portable way * Wed Oct 26 2005 Paul Howarth - 2.09-1 - Update to 2.09 - Use search.cpan.org URLs - Simplify distribution detection - Remove redundant macro definitions - Don't use macros in build-time command paths, hardcode them instead - Simplify compiler optimization settings - Unconditionally remove buildroot in %%clean and %%install - Fix directory ownership * Wed Jun 1 2005 Paul Howarth - 2.07-4 - Rewrite spec file in (mainly) Fedora Extras style - Include full URL for source - Fix URL - Use MODULE_COMPAT dependency style and remove explicit perl dependency * Thu Apr 15 2004 Paul Howarth - 2.07-3 - Added explicit perl dependency to ensure that an RPM built on a system with an updated version of perl (and hence having files installed in a place that a non-updated system won't find them) will not install on the non-updated system; in such cases, just rebuild from the source RPM - Changed distribution-identifying macros for greater portability * Mon Feb 16 2004 Paul Howarth - 2.07-2 - Unified spec file for Red Hat and Fedora Core * Mon Feb 02 2004 Paul Howarth - 2.07-1.fc1 - Initial RPM build