# 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-XML-Simple Version: 2.25 Release: 17.%{__distinit}%{__distvers} Summary: Easy API to maintain XML in Perl License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/XML-Simple Source0: https://cpan.metacpan.org/modules/by-module/XML/XML-Simple-%{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(File::Basename) BuildRequires: perl(IO::Handle) BuildRequires: perl(Scalar::Util) BuildRequires: perl(Storable) BuildRequires: perl(strict) BuildRequires: perl(vars) BuildRequires: perl(warnings) BuildRequires: perl(warnings::register) BuildRequires: perl(XML::NamespaceSupport) >= 1.04 # Preferred back-end BuildRequires: perl(XML::LibXML) BuildRequires: perl(XML::SAX) >= 0.15 # Test Suite BuildRequires: perl(base) BuildRequires: perl(File::Spec) BuildRequires: perl(File::Temp) BuildRequires: perl(FileHandle) BuildRequires: perl(IO::File) BuildRequires: perl(Test::More) BuildRequires: perl(XML::SAX::Base) # Optional back-ends BuildRequires: perl(XML::Parser) BuildRequires: perl(XML::SAX::Expat) # XML-SAX-ExpatXS up to 0.98 has known namespace bugs, and will cause the # tests to fail if it is installed as the default SAX parser. BuildConflicts: perl(XML::SAX::ExpatXS) # Optional Tests BuildRequires: perl(Tie::IxHash) # Author Tests BuildRequires: perl(Test::Pod) >= 1.41 # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version)) %endif Requires: perl(File::Basename) Requires: perl(IO::Handle) Requires: perl(Storable) Requires: perl(XML::NamespaceSupport) >= 1.04 Requires: perl(XML::LibXML) Requires: perl(XML::SAX) >= 0.15 %description The XML::Simple module provides a simple API layer on top of an underlying XML parsing module (either XML::Parser or one of the SAX2 parser modules). %prep %setup -q -n XML-Simple-%{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 RELEASE_TESTING=1 %files %license LICENSE %doc Changes README %dir %{perl_vendorlib}/XML/ %dir %{perl_vendorlib}/XML/Simple/ %doc %{perl_vendorlib}/XML/Simple/FAQ.pod %{perl_vendorlib}/XML/Simple.pm %{_mandir}/man3/XML::Simple.3* %{_mandir}/man3/XML::Simple::FAQ.3* %changelog * Wed Mar 29 2023 Paul Howarth - 2.25-17 - Use SPDX-format license tag - Use %%license unconditionally * Thu Jun 6 2019 Paul Howarth - 2.25-5 - Perl 5.30 rebuild * Mon Mar 19 2018 Paul Howarth - 2.25-1 - Update to 2.25 - Disable entity expansion when using XML::Parser, for more secure default behaviour - Call to XML::Parser constructor is now in its own method to ease overriding - BR: perl-generators unconditionally - BR: perl-interpreter rather than perl * Mon Apr 17 2017 Paul Howarth - 2.24-1 - Update to 2.24 - Another fix to the logic for detecting circular references (CPAN RT#114120) - Don't initialize $XML::Simple::PREFERRED_PARSER to undef as a caller may have already set it before loading XML::Simple and if not, it would have defaulted to undef anyway (CPAN RT#118205) - 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 * Mon Oct 17 2016 Paul Howarth - 2.22-3 - BR: perl-generators where available - Simplify find command using -delete - Package LICENSE file * Mon Dec 7 2015 Paul Howarth - 2.22-1 - Update to 2.22 - POD fix in link to package XML::SAX::ParseFactory - Allow subclass to override attribute escaping - POD fix adding NAME section to FAQ (CPAN RT#110080) - POD typo fix (CPAN RT#110082) - Fix reference comparison operator used in checking for circular data structures (CPAN RT#89553) - Add better diagnostics from file handling code in test suite * Fri Dec 4 2015 Paul Howarth - 2.21-1 - Update to 2.21 - Improved diagnostics - xml_in() will now catch parse exceptions and add caller information via Carp::croak - Switch to use lexical warnings (suppress with either 'no warnings;' or 'no warnings "XML::Simple";', rather than $^W = 0) - POD fixes - Regex escaping fixes for Perl 5.22+ - Add workaround for test failures on RHEL/CentOS 6.5 (CPAN RT#102115) - Remove some 'eval' calls from test suite that could mask root cause of test failures - Make each test script use unique filenames to allow tests to be run in parallel (CPAN RT#101362) - POD update: mention XML::Twig in 'STATUS' section (CPAN RT#79228) - Classify buildreqs by usage - Drop patch for building with ExtUtils::MakeMaker < 6.31, now redundant - Use XML::SAX+XML::LibXML for back-end dependency rather than XML::Parser * Fri Sep 12 2014 Paul Howarth - 2.20-9 - Drop %%defattr, redundant since rpm 4.4 * Wed Jun 20 2012 Paul Howarth - 2.20-1 - Update to 2.20 - Use lexical filehandles instead of old-style fileglobs (CPAN RT#77787) - Restrict scope of :strict mode to calling package (CPAN RT#41562) - Reinstate XML::SAX::Expat dependency - Change minimum Perl requirement to 5.008 - Fix POD typo (CPAN RT#45414) - Update POD to reflect best practise regarding :strict and options - Suppress warning from empty CDATA section (CPAN RT#58359) - Switch to using Dist::Zilla for release management - BR: perl(Carp), perl(Exporter) and perl(XML::SAX::Expat) - Bump perl(XML::SAX) version requirement to 0.15 - BR: perl(Test::Pod) and run the release tests too - Add patch to support building with ExtUtils::MakeMaker < 6.31 - 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 * Tue Jul 26 2011 Paul Howarth - 2.18-7 - Rebuild for perl 5.14.1 in Rawhide - Use %%{_fixperms} macro instead of our own %%{__chmod} incantation - Nobody else likes macros for commands - Fix dist tag for CentOS 6 and Scientific Linux * Thu Jun 24 2010 Paul Howarth - 2.18-6 - Rebuild for perl 5.12.1 in Rawhide * Thu May 27 2010 Paul Howarth - 2.18-5 - Fix dist tag for RHEL-6 Beta * Wed Mar 3 2010 Paul Howarth - 2.18-4 - Add buildreq perl(Tie::IxHash) for additional test coverage - Dist tag for Rawhide no longer needs special-casing * Tue Sep 29 2009 Paul Howarth - 2.18-3 - Define RPM macros in global scope * Wed Oct 29 2008 Paul Howarth - 2.18-2 - Tweak dist tag macros to work on current Rawhide with three-part releasenum - Make %%files list more explicit and mark FAQ.pod as %%doc * Thu Aug 16 2007 Paul Howarth - 2.18-1 - Update to 2.18 - Reclarify license to retain dual-license info regarding the Artistic license * Fri Aug 3 2007 Paul Howarth - 2.17-1 - Update to 2.17 - Clarify license as GPL v1 or later (GPL+); whilst the upstream source is distributed as "GPL or Artistic" (i.e. same as perl), the Artistic license is not free and Fedora does not distribute software under non-free terms - Add buildreq perl(Test::More) * Mon Mar 26 2007 Paul Howarth - 2.16-3 - Import from Fedora - Include dist tag macros - Use search.cpan.org download URL - BuildRequire perl(ExtUtils::MakeMaker) - Fix argument order for find with -depth - Macro-ize commands where possible, use hardcoded paths otherwise * Tue Dec 05 2006 Robin Norwood - 2.16-2 - Fix incorrect 'Release' tag - removed extra dot * Sat Dec 02 2006 Robin Norwood - 2.16-1 - Upgrade to latest CPAN version: 2.16 * Wed Jun 7 2006 Jason Vas Dias - 2.14-4 - fix bug 191911: make test fails when default Parser is XML::SAX::PurePerl but succeeds when default Parser is XML::LibXML::SAX; hence, add buildreqs perl(XML::LibXML) and perl(XML::LibXML::Common) * Wed Jun 7 2006 Matthias Clasen - 2.14-2.2 - Require perl-XML-Parser (#193985) * Fri Feb 03 2006 Jason Vas Dias - 2.14-2.1 - Rebuild for new perl-5.8.8 * Tue Jan 17 2006 Matthias Clasen - 2.14-2 - Pull perl-XML-Simple from Extras into Core for dependency reasons * Fri Sep 9 2005 Jose Pedro Oliveira - 2.14-1 - Update to 2.14 - Added the dist tag * Wed Apr 6 2005 Michael Schwendt - 2.13-2 - Rebuilt * Sat Nov 27 2004 Jose Pedro Oliveira - 0:2.13-1 - Update to 2.13 * Wed May 12 2004 Jose Pedro Oliveira - 0:2.12-0.fdr.4 - Avoid creation of the perllocal.pod file (make pure_install) * Thu May 6 2004 Jose Pedro Oliveira - 0:2.12-0.fdr.3 - Build requirement for perl < 5.8.0 - perl(Storable) * Thu May 6 2004 Jose Pedro Oliveira - 0:2.12-0.fdr.2 - Missing $RPM_OPT_FLAGS in the %%build section - Optional test module as build requirement perl(Tie::IxHash) * Mon Apr 26 2004 Ville Skyttä - 0:2.12-0.fdr.1 - Update to 2.12 - Require perl(:MODULE_COMPAT_*) * Sun Mar 14 2004 Ville Skyttä - 0:2.11-0.fdr.1 - Update to 2.11 - Reduce directory ownership bloat * Tue Nov 18 2003 Ville Skyttä - 0:2.09-0.fdr.2 - Use INSTALLARCHLIB workaround in %%install * Wed Sep 10 2003 Ville Skyttä - 0:2.09-0.fdr.1 - Update to 2.09 * Wed Sep 3 2003 Ville Skyttä - 0:2.08-0.fdr.1 - First build