# 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-SAX Summary: Simple API for XML Version: 1.02 Release: 12.%{__distinit}%{__distvers} License: GPL-1.0-or-later OR Artistic-1.0-Perl URL: https://metacpan.org/release/XML-SAX Source0: https://cpan.metacpan.org/modules/by-module/XML/XML-SAX-%{version}.tar.gz Patch0: XML-SAX-1.02-rt20126.patch 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(constant) BuildRequires: perl(Encode) BuildRequires: perl(Exporter) BuildRequires: perl(File::Basename) BuildRequires: perl(File::Spec) BuildRequires: perl(File::Temp) BuildRequires: perl(IO::File) BuildRequires: perl(overload) BuildRequires: perl(strict) BuildRequires: perl(Symbol) BuildRequires: perl(vars) BuildRequires: perl(warnings) BuildRequires: perl(XML::NamespaceSupport) BuildRequires: perl(XML::SAX::Base) # Optional Functionality BuildRequires: perl(HTTP::Request) BuildRequires: perl(LWP::UserAgent) # Test Suite BuildRequires: perl(base) BuildRequires: perl(Fatal) BuildRequires: perl(File::Path) BuildRequires: perl(Test) # Dependencies %if 0%{?fedora} < 38 && 0%{?rhel} < 10 Requires: perl(:MODULE_COMPAT_%(perl -MConfig -e 'print $Config{version}')) %endif # Kludge to remove bogus XML::SAX::PurePerl* dependencies and unversioned provides %global __requires_exclude ^perl\\(XML::SAX::PurePerl %global __provides_exclude ^perl\\(XML::SAX::PurePerl\\)$ %description XML::SAX consists of several framework classes for using and building Perl SAX2 XML parsers, filters, and drivers. It is designed around the need to be able to "plug in" different SAX parsers to an application without requiring programmer intervention. Those of you familiar with the DBI will be right at home. Some of the designs come from the Java JAXP specification (SAX part), only without the javaness. %prep %setup -q -n XML-SAX-%{version} # Fix incorrect parsing of comments (CPAN RT#20126) %patch -P 0 -p1 %build perl Makefile.PL INSTALLDIRS=vendor make %install make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -delete touch %{buildroot}%{perl_vendorlib}/XML/SAX/ParserDetails.ini %{_fixperms} -c %{buildroot} %check make test %post if [ ! -f %{perl_vendorlib}/XML/SAX/ParserDetails.ini ]; then perl -MXML::SAX -e \ 'XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()' 2>/dev/null fi %preun if [ $1 -eq 0 ]; then perl -MXML::SAX -e \ 'XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers()' fi %files %license LICENSE %doc Changes README %dir %{perl_vendorlib}/XML/ %dir %{perl_vendorlib}/XML/SAX/ %{perl_vendorlib}/XML/SAX.pm %{perl_vendorlib}/XML/SAX/*.pm %doc %{perl_vendorlib}/XML/SAX/*.pod %{perl_vendorlib}/XML/SAX/PurePerl/ %{_mandir}/man3/XML::*.3* %ghost %{perl_vendorlib}/XML/SAX/ParserDetails.ini %changelog * Thu Jun 22 2023 Paul Howarth - 1.02-12 - Use SPDX-format license tag - Drop support for building with rpm < 4.9 - Avoid use of deprecated patch syntax - Use %%license unconditionally * Fri Jun 14 2019 Paul Howarth - 1.02-1 - Update to 1.02 - Spelling fixes - Add repo location to metadata - Reorganize module files under lib/XML - Regenerate MANIFEST using 'make manifest' to include missing test files * Wed Jun 5 2019 Paul Howarth - 1.00-5 - Perl 5.30 rebuild * Thu Feb 15 2018 Paul Howarth - 1.00-1 - Update to 1.00 - Add makefile dependency to fix order of build steps (CPAN RT#62289) - 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 * Mon Oct 17 2016 Paul Howarth - 0.99-17 - Classify buildreqs by usage - Simplify find command using -delete - Prefer %%global over %%define * Fri Aug 29 2014 Paul Howarth - 0.99-13 - Fix incorrect parsing of comments (CPAN RT#20126) - Drop %%defattr, redundant since rpm 4.4 - Use %%license where possible * Fri Jul 19 2013 Paul Howarth - 0.99-10 - Perl 5.18 rebuild * Tue Jun 11 2013 Paul Howarth - 0.99-5 - BR: perl(Fatal) for test suite * Mon Jun 25 2012 Paul Howarth - 0.99-4 - BR: perl(base), perl(Carp), perl(constant), perl(Encode), perl(Exporter), perl(File::Path), perl(File::Spec), perl(File::Temp), perl(IO::File) and perl(Test) - Don't need to remove empty directories from the buildroot - Drop support for old distributions prior to FC-3: - Drop workarounds for test suite issues on 5.8.0 - Don't need to define %%{perl_vendorlib} - Use DESTDIR rather than PERL_INSTALL_ROOT * Mon Feb 13 2012 Paul Howarth - 0.99-2.1 - Rebuild to avoid bogus runtime dependencies from Fedora package (#720974) * Mon Sep 5 2011 Paul Howarth - 0.99-1 - Update to 0.99: - Split off XML::SAX::Base and XML::SAX::Exception into separate package (CPAN RT#57238) - BR: perl(XML::SAX::Base) * Fri Jul 8 2011 Paul Howarth - 0.96-14 - Rebuild for perl 5.14.1 in Rawhide - Nobody else likes macros for commands - Fix dist tag for CentOS 6 and Scientific Linux * Mon Feb 14 2011 Paul Howarth - 0.96-11 - Fix dependency filtering for rpm 4.9.x * Thu Jun 24 2010 Paul Howarth - 0.96-10 - Rebuild for perl 5.12.1 in Rawhide * Thu May 27 2010 Paul Howarth - 0.96-9 - Fix dist tag for RHEL-6 * Fri Mar 5 2010 Paul Howarth - 0.96-8 - Dist tag for Rawhide no longer needs special-casing - Use %%{_fixperms} macro instead of our own %%{__chmod} incantation * Thu Nov 12 2009 Paul Howarth - 0.96-7 - Only add the pure-perl parser in %%post if there are no existing parsers (http://perl-xml.sourceforge.net/faq/#parserdetails.ini) * Tue Sep 29 2009 Paul Howarth - 0.96-2 - Define RPM macros in global scope - Make POD files as %%doc * Wed Aug 6 2008 Paul Howarth - 0.96-1 - Update to 0.96 * Tue Aug 5 2008 Paul Howarth - 0.95-1 - Update to 0.95 - Tweak dist tag macros to work with three-part releasenum in rawhide - Clarify license as GPL version 1 or later, or Artistic (i.e. same as perl) * Thu Jun 28 2007 Paul Howarth - 0.16-1 - Update to 0.16 * Mon Mar 26 2007 Paul Howarth - 0.15-2 - Improve description - Add dist tag macros - Use search.cpan.org download URL - Simplify requires-filter - Remove old spec file cruft, clean up cosmetically - Use Fedora standard buildroot - BuildRequire perl(ExtUtils::MakeMaker) - Expect test suite to fail with perl 5.8.0 * Tue Feb 13 2007 Robin Norwood - 0.15-1 - New version: 0.15 * Fri Jun 09 2006 Jason Vas Dias - 0.14-2 - fix bug 194706: fails to build under (new!) mock * Mon Jun 05 2006 Jason Vas Dias - 0.14-1 - upgrade to 0.14 * Fri Feb 03 2006 Jason Vas Dias - 0.13-1.1 - rebuild for new perl-5.8.8 * Mon Dec 19 2005 Jason Vas Dias - 0.13-1 - upgrade to 0.13 * Fri Dec 16 2005 Jesse Keating - rebuilt for new gcc * Fri Dec 16 2005 Jesse Keating - rebuilt for new gcj * Sun Apr 18 2004 Ville Skyttä - 0.12-7 - #121167 - Handle ParserDetails.ini parser registration. - Require perl(:MODULE_COMPAT_*). - Own installed directories. * Wed Oct 22 2003 Chip Turner - 0.12-1 - Specfile autogenerated.