# 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-Regexp-Common Version: 2024080801 Release: 1.%{__distinit}%{__distvers} Summary: Provide commonly requested regular expressions # Old Artistic 1.0 is also valid, but we won't list it here since it is non-free. # Also, it would throw off the automated license check and flag this package. License: Artistic-2.0 OR MIT OR BSD-3-Clause URL: https://metacpan.org/release/Regexp-Common Source0: https://cpan.metacpan.org/modules/by-module/Regexp/Regexp-Common-%{version}.tar.gz Patch0: Regexp-Common-2013030901-pod.patch BuildArch: noarch # Module Build BuildRequires: coreutils BuildRequires: findutils BuildRequires: make BuildRequires: perl-generators BuildRequires: perl-interpreter BuildRequires: perl(:VERSION) >= 5.010 BuildRequires: perl(ExtUtils::MakeMaker) # Module Runtime BuildRequires: perl(Carp) BuildRequires: perl(charnames) BuildRequires: perl(Config) BuildRequires: perl(Exporter) BuildRequires: perl(overload) BuildRequires: perl(re) BuildRequires: perl(strict) BuildRequires: perl(warnings) # Test Suite BuildRequires: perl(constant) BuildRequires: perl(lib) BuildRequires: perl(Test::More) # Optional Tests BuildRequires: perl(Test::Regexp) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif Requires: perl(Carp) %description By default, this module exports a single hash (`%%RE') that stores or generates commonly needed regular expressions. Patterns currently provided include: * balanced parentheses and brackets * delimited text (with escapes) * integers and floating-point numbers in any base (up to 36) * comments in 44 languages * offensive language * lists of any pattern * IPv4 addresses * URIs * Zip codes %prep %setup -q -n Regexp-Common-%{version} # Fix POD so we get properly-coded manpage %patch -P 0 %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 COPYRIGHT* %doc TODO README Changes %{perl_vendorlib}/Regexp/ %{_mandir}/man3/Regexp::Common* %changelog * Fri Aug 9 2024 Paul Howarth - 2024080801-1 - Update to 2024080801 - Eliminate 'use vars' - Update the MySQL comment pattern * Fri Jul 14 2023 Paul Howarth - 2017060201-21 - Use SPDX-format license tag - Avoid use of deprecated patch syntax - Use %%license unconditionally * Wed Jun 5 2019 Paul Howarth - 2017060201-9 - Perl 5.30 rebuild * Mon Apr 16 2018 Paul Howarth - 2017060201-4 - BR: perl-generators unconditionally - BR: perl-interpreter rather than perl * Sun Jun 18 2017 Paul Howarth - 2017060201-1 - Update to 2017060201 - Minor documentation fixes - More fixes for tests and '.' not being present in @INC * Wed Apr 5 2017 Paul Howarth - 2017040401-1 - Update to 2017040401 - Prepare for 5.26: don't rely on '.' being present in @INC when testing - 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 - Drop patch for building with Test::More < 0.88 - BR: perl(Test::Regexp) unconditionally * Mon Jun 13 2016 Paul Howarth - 2016060801-1 - Update to 2016060801 - Removed the optional leading 0 from Australian postal codes: use -lax to enable this feature - Improved the patterns for Belgian, Danish, Greenlandic, Swiss, Italian, German, French and Norwegian postal codes, only matching actual valid codes; this implies rewriting their tests from scratch - Added patterns for postal codes for Liechtenstein, Luxembourg, Monaco, San Marino, and Vatican City * Thu Jun 2 2016 Paul Howarth - 2016060201-1 - Update to 2016060201 - Improved Australian zip code pattern; pattern matches current zip codes - Tests for Australian zip now use Test::Regexp - Stop distributing author tests - Update patch for compatibility with Test::More < 0.88 * Wed Jun 1 2016 Paul Howarth - 2016060101-1 - Update to 2016060101 - We ceased to support pre-5.10.0 perls - Fix warnings for older perls ($RE {delimited}) - Removed t/test_keep.t - Improved testing for square numbers - Updated the Copyright notices to include the current year - Add patch for compatibility with Test::More < 0.88 * Tue May 31 2016 Paul Howarth - 2016053101-1 - Update to 2016053101 - Fix POD nit (CPAN RT#103850) - Don't run author only tests, unless AUTHOR_TESTING is set (CPAN RT#90600) - Added a 'strict' option to matching IPv4 addresses (CPAN RT#93437) - Added a pattern for Austrian postal codes (CPAN RT#53299) * Sun May 29 2016 Paul Howarth - 2016052804-1 - Update to 2016052804 - When multiple delimiters are given, wrap the clauses inside a (?|); this makes it that, under -keep, the used delimiters are always in $2 and $4, and the string between the delimiters is always in $3 - A requirement on 5.10.0 is now in place for the 'delimited' and 'quoted' patterns - The 'delimited' pattern now allows specifying closing delimiters that are different from the opening delimiters - Added a 'bquoted' pattern, which is a shortcut for using the 'delimited' pattern with 85 mirror imaged bracketing constructs (requires 5.014) - Eliminate the use of s///r - Fix issues with matching Roman numerals, where the pattern wasn't greedy enough (CPAN RT#104353) - Allow Roman numerals to match sequences of 4 Is, Xs, Cs and Ms; this raises the maximum number to be matched to 4999 (MMMMCMXCIX) - Fixed some POD nits - BR: perl-generators where available - Simplify find command using -delete * Thu Feb 4 2016 Paul Howarth - 2016020301-1 - Update to 2016020301 - Fixed POD issue * Mon Jan 11 2016 Paul Howarth - 2016010801-1 - Update to 2016010801 - Use 'done_testing ()' instead of 'done_testing', so the test file compiles even if the user uses an old Test::More - Unbundle Test::More, recent version no longer needed * Fri Jan 8 2016 Paul Howarth - 2016010701-1 - Update to 2016010701 - Removed the 29143 tests from t/number/integer.t and replaced them with 34689 spread over 7 new files, because there are sporadic failures reported by CPAN testers in the t/number/integer.t file, but this file uses the random number generator to generate tests, which makes issues very hard to debug, as failures cannot be reproduced; the new tests will be deterministic - We now need Test::More ≥ 0.88, so use a bundled one if we don't have it * Wed Dec 16 2015 Paul Howarth - 2015121601-1 - Update to 2015121601 - Force Darwin 10.0 on Perl 5.10.0 to run square tests in 32 bit mode - Doc typo fixes (CPAN RT#67549 and CPAN RT#71131) - Classify buildreqs by usage * Sun Aug 31 2014 Paul Howarth - 2013031301-6 - Drop %%defattr, redundant since rpm 4.4 - Use %%license where possible * Wed Mar 13 2013 Paul Howarth - 2013031301-1 - Update to 2013031301 - Pattern for IPv6 addresses (CPAN RT#50693) * Tue Mar 12 2013 Paul Howarth - 2013031201-1 - Update to 2013031201 - Allow host/domain names to start with a digit, using $RE{net}{domain}{-rfc1101} (CPAN RT#23626) * Tue Mar 12 2013 Paul Howarth - 2013031101-1 - Update to 2013031101 - For integers and decimal numbers (reals), allow the user to specify the pattern of the signs (leading sign, and for reals, the sign of the exponent); this gives the user the option to ask for a pattern that matches unsigned numbers (by specifying the empty string as the pattern) * Mon Mar 11 2013 Paul Howarth - 2013030901-1 - Update to 2013030901 - Use (?-1) instead of (??{ }) for the recursive balanced pattern; this makes the pattern unavailable for pre-5.010 perls - Add patch to fix POD so we get properly-coded manpage * Sat Jun 30 2012 Paul Howarth - 2011121001-3 - BR: perl(Carp), perl(constant), perl(Exporter) and perl(lib) - 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 * Sun Dec 11 2011 Paul Howarth - 2011121001-1 - Update to 2011121001 - Fixed a few cases where $[ was used instead of $] (CPAN RT#73033) - Typo fix in docs - Add an explicit 1 to end the main module; otherwise it may fail under Mason * Sat Jul 2 2011 Paul Howarth - 2011041701-2 - Rebuild for perl 5.14.1 in Rawhide - Fix dist tag for CentOS 6 and Scientific Linux * Mon Apr 18 2011 Paul Howarth - 2011041701-1 - Update to 2011041701 - Fix documentation error (CPAN RT#2833) - Add patterns for JavaDoc comments (CPAN RT#13174) - Nobody else likes macros for commands * Fri Jun 25 2010 Paul Howarth - 2.122-8 - Rebuild for perl 5.12.1 in Rawhide * Tue May 11 2010 Paul Howarth - 2.122-7 - Fix dist tag for RHEL-6 Beta - Use %%{_fixperms} macro instead of our own %%{__chmod} incantation * Mon Jan 4 2010 Paul Howarth - 2.122-6 - Update to 2010010201 (add $VERSION to all submodules: CPAN RT #53250) * Thu Dec 31 2009 Paul Howarth - 2.122-5 - Update to 2009123002 (fixes for CPANTS and perl < 5.6.0) * Wed Dec 30 2009 Paul Howarth - 2.122-4 - Update to 2009123001 (upstream changed versioning schemes for this release but in the interests of avoiding a subsequent epoch bump, I'm not using this versioning scheme for the packaging until I'm convinced that this is a long term change) - Fix POD issues (CPAN RT #34886, #48974) - Fail faster on some URI subpatterns (CPAN RT #52309) - Add license texts and Changes file as %%doc - BR: perl(Test::More), perl(Test::Pod), perl(Test::Pod::Coverage) - Dist tag for Rawhide no longer needs special-casing * Wed May 6 2009 Paul Howarth - 2.122-3 - Import from Fedora * Thu Feb 26 2009 Fedora Release Engineering - 2.122-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild * Thu May 29 2008 Tom "spot" Callaway - 2.122-1 - update to 2.122 - license change * Wed Mar 5 2008 Tom "spot" Callaway - 2.120-7 - rebuild for new perl * Wed Aug 29 2007 Ralf Corsépius - 2.120-6 - BR: perl(ExtUtils::MakeMaker). * Tue Sep 05 2006 Ralf Corsépius - 2.120-5 - Mass rebuild. * Sat Feb 25 2006 Ralf Corsépius - 2.120-4 - Rebuild for FC5/perl-5.8.8. * Sat Aug 20 2005 Ralf Corsepius - 2.120-3 - Further spec cleanup. * Sat Aug 20 2005 Ralf Corsepius - 2.120-2 - Spec cleanup. * Thu Aug 11 2005 Ralf Corsepius - 2.120-1 - FE submission.