17aec2
Summary:        SAX parser access API for Perl
17aec2
Name:           perl-XML-SAX
17aec2
Version:        1.00
17aec2
Release:        1%{?dist}
17aec2
17aec2
Group:          Development/Libraries
17aec2
License:        GPL+ or Artistic
17aec2
URL:            http://search.cpan.org/dist/XML-SAX/
17aec2
# Original source
17aec2
# http://www.cpan.org/authors/id/G/GR/GRANTM/XML-SAX-%%{version}.tar.gz
17aec2
Source0:        XML-SAX-%{version}-nopatents.tar.gz
17aec2
# XML-SAX contains patented code that we cannot ship. Therefore we use
17aec2
# this script to remove the patented code before shipping it.
17aec2
# Download the upstream tarball and invoke this script while in the
17aec2
# tarball's directory:
17aec2
# ./generate-tarball.sh %%{version}
17aec2
Source1: generate-tarball.sh
17aec2
17aec2
# Fix rt#20126
17aec2
Patch0:         perl-XML-SAX-0.99-rt20126.patch
17aec2
17aec2
BuildArch:      noarch
17aec2
BuildRequires:  coreutils
17aec2
BuildRequires:  make
17aec2
BuildRequires:  perl-generators
17aec2
BuildRequires:  perl-interpreter
17aec2
BuildRequires:  perl(ExtUtils::MakeMaker) >= 6.76
17aec2
BuildRequires:  perl(File::Basename)
17aec2
BuildRequires:  perl(File::Spec)
17aec2
# Run-time
17aec2
BuildRequires:  perl(Carp)
17aec2
BuildRequires:  perl(constant)
17aec2
BuildRequires:  perl(Encode)
17aec2
BuildRequires:  perl(Exporter)
17aec2
BuildRequires:  perl(File::Temp)
17aec2
BuildRequires:  perl(IO::File)
17aec2
BuildRequires:  perl(overload)
17aec2
BuildRequires:  perl(strict)
17aec2
BuildRequires:  perl(Symbol)
17aec2
BuildRequires:  perl(vars)
17aec2
BuildRequires:  perl(warnings)
17aec2
BuildRequires:  perl(XML::NamespaceSupport) >= 0.03
17aec2
# XML::SAX::Base became independent package, BR just for test
17aec2
BuildRequires:  perl(XML::SAX::Base)
17aec2
BuildRequires:  perl(XML::SAX::Exception)
17aec2
# Test
17aec2
BuildRequires:  perl(base)
17aec2
BuildRequires:  perl(Fatal)
17aec2
BuildRequires:  perl(File::Path)
17aec2
BuildRequires:  perl(Test)
17aec2
17aec2
Requires:       perl(:MODULE_COMPAT_%(perl -MConfig -e 'print $Config{version}'))
17aec2
Requires:       perl(LWP::UserAgent)
17aec2
17aec2
# Remove bogus XML::SAX::PurePerl* dependencies and unversioned provides
17aec2
%global __requires_exclude ^perl\\(XML::SAX::PurePerl
17aec2
%global __provides_exclude ^perl\\(XML::SAX::PurePerl\\)$
17aec2
17aec2
%description
17aec2
XML::SAX consists of several framework classes for using and building
17aec2
Perl SAX2 XML parsers, filters, and drivers. It is designed around the
17aec2
need to be able to "plug in" different SAX parsers to an application
17aec2
without requiring programmer intervention. Those of you familiar with
17aec2
the DBI will be right at home. Some of the designs come from the Java
17aec2
JAXP specification (SAX part), only without the javaness.
17aec2
17aec2
17aec2
%prep
17aec2
%setup -q -n XML-SAX-%{version}
17aec2
%patch0 -p1
17aec2
17aec2
%build
17aec2
echo N | %{__perl} Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
17aec2
make %{?_smp_mflags}
17aec2
17aec2
%install
17aec2
make pure_install DESTDIR=$RPM_BUILD_ROOT
17aec2
%{_fixperms} $RPM_BUILD_ROOT/*
17aec2
17aec2
touch $RPM_BUILD_ROOT%{perl_vendorlib}/XML/SAX/ParserDetails.ini
17aec2
17aec2
%check
17aec2
make test
17aec2
17aec2
# See http://rhn.redhat.com/errata/RHBA-2010-0008.html regarding these scriptlets
17aec2
# perl-XML-LibXML-1.58-6 is in EL 5.8 and possibly later EL-5 releases
17aec2
%post
17aec2
if [ ! -f "%{perl_vendorlib}/XML/SAX/ParserDetails.ini" ] ; then
17aec2
  perl -MXML::SAX -e \
17aec2
    'XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()' 2>/dev/null || :
17aec2
else
17aec2
  cp -p "%{perl_vendorlib}/XML/SAX/ParserDetails.ini" "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup"
17aec2
fi
17aec2
17aec2
%triggerun -- perl-XML-LibXML < 1.58-8
17aec2
if [ -f "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup" ] ; then
17aec2
  mv "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup" "%{perl_vendorlib}/XML/SAX/ParserDetails.ini"
17aec2
fi
17aec2
17aec2
%preun
17aec2
# create backup of ParserDetails.ini, therefore user's configuration is used
17aec2
if [ $1 -eq 0 ] ; then
17aec2
  perl -MXML::SAX -e \
17aec2
    'XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers()' || :
17aec2
fi
17aec2
[ -f "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup" ] && \
17aec2
rm -rf "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup" || :
17aec2
17aec2
%files
17aec2
%license LICENSE
17aec2
%doc Changes README
17aec2
%dir %{perl_vendorlib}/XML/
17aec2
%{perl_vendorlib}/XML/SAX.pm
17aec2
%dir %{perl_vendorlib}/XML/SAX/
17aec2
%{perl_vendorlib}/XML/SAX/*.pm
17aec2
%doc %{perl_vendorlib}/XML/SAX/*.pod
17aec2
%{perl_vendorlib}/XML/SAX/PurePerl/
17aec2
%{_mandir}/man3/XML::*.3pm*
17aec2
%ghost %{perl_vendorlib}/XML/SAX/ParserDetails.ini
17aec2
17aec2
17aec2
%changelog
17aec2
* Thu Feb 15 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1.00-1
17aec2
- 1.00 bump
17aec2
17aec2
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.99-21
17aec2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
17aec2
17aec2
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.99-20
17aec2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
17aec2
17aec2
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 0.99-19
17aec2
- Perl 5.26 rebuild
17aec2
17aec2
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.99-18
17aec2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
17aec2
17aec2
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 0.99-17
17aec2
- Perl 5.24 rebuild
17aec2
17aec2
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.99-16
17aec2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
17aec2
17aec2
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99-15
17aec2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
17aec2
17aec2
* Thu Jun 04 2015 Jitka Plesnikova <jplesnik@redhat.com> - 0.99-14
17aec2
- Perl 5.22 rebuild
17aec2
17aec2
* Wed Aug 27 2014 Jitka Plesnikova <jplesnik@redhat.com> - 0.99-13
17aec2
- Perl 5.20 rebuild
17aec2
17aec2
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99-12
17aec2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
17aec2
17aec2
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99-11
17aec2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
17aec2
17aec2
* Thu Jul 18 2013 Petr Pisar <ppisar@redhat.com> - 0.99-10
17aec2
- Perl 5.18 rebuild
17aec2
17aec2
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99-9
17aec2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
17aec2
17aec2
* Thu Nov 22 2012 Jitka Plesnikova <jplesnik@redhat.com> - 0.99-8
17aec2
- Create script generate-tarball.sh which remove xmltest.xml from source
17aec2
  tarball
17aec2
17aec2
* Thu Nov 22 2012 Jitka Plesnikova <jplesnik@redhat.com> - 0.99-7
17aec2
- Update dependencies and summary
17aec2
- Remove xmltest.xml due to copyright
17aec2
- Replace PERL_INSTALL_ROOT with DESTDIR
17aec2
17aec2
* Wed Aug 15 2012 Jitka Plesnikova <jplesnik@redhat.com> - 0.99-6
17aec2
- Fixed incorrect parsing of comments (RT#20126).
17aec2
- Specify all dependencies.
17aec2
17aec2
* Fri Jul 20 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99-5
17aec2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
17aec2
17aec2
* Mon Jun 11 2012 Petr Pisar <ppisar@redhat.com> - 0.99-4
17aec2
- Perl 5.16 rebuild
17aec2
17aec2
* Sat Mar 17 2012 Paul Howarth <paul@city-fan.org> - 0.99-3
17aec2
- Drop redundant runtime dependencies on perl(XML::LibXML) and
17aec2
  perl(XML::LibXML::Common), which cause circular build dependencies (#720974)
17aec2
- Simplify provides and requires filters
17aec2
- Don't need to remove empty directories from buildroot
17aec2
- Mark POD files as %%doc
17aec2
17aec2
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99-2
17aec2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
17aec2
17aec2
* Fri Oct 07 2011 Marcela Mašláňová <mmaslano@redhat.com> 0.99-1
17aec2
- update to 0.99
17aec2
17aec2
* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 0.96-15
17aec2
- Perl mass rebuild
17aec2
17aec2
* Fri Jun 24 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-14
17aec2
- fix macros to work with new macros
17aec2
- clean spec
17aec2
17aec2
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96-13
17aec2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
17aec2
17aec2
* Mon Jan 24 2011 Adrian Reber <adrian@lisas.de> - 0.96-12
17aec2
- rebuild for ppc
17aec2
17aec2
* Thu Dec 23 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.96-11
17aec2
- 661697 rebuild for fixing problems with vendorach/lib
17aec2
17aec2
* Fri May 07 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.96-10
17aec2
- Mass rebuild with perl-5.12.0
17aec2
17aec2
* Fri Feb  5 2010 Stepan Kasal <skasal@redhat.com> - 0.96-9
17aec2
- anchor the filtering regexps
17aec2
17aec2
* Fri Feb  5 2010 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-8
17aec2
- XML-LibXML use triggers for XML::SAX update. Deleting of settings in
17aec2
 ParserDetails.ini is solved by post and preun part, which create backup.
17aec2
17aec2
* Thu Nov 12 2009 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-7
17aec2
- instead of path into post used perl_vendorlib macro
17aec2
- rebuilt will be needed for perl-5.10.1
17aec2
17aec2
* Thu Nov 12 2009 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-6
17aec2
- post scriptlet needs to check whether the file is installed. When it isn't,
17aec2
 then it's needed call for adding PurePerl parser
17aec2
 http://perl-xml.sourceforge.net/faq/#parserdetails.ini
17aec2
17aec2
* Mon Oct 19 2009 Stepan Kasal <skasal@redhat.com> - 0.96-5
17aec2
- use the filtering macros
17aec2
17aec2
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96-4
17aec2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
17aec2
17aec2
* Tue Apr 28 2009 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-3
17aec2
- 478905 fix scriptlets
17aec2
17aec2
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96-2
17aec2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
17aec2
17aec2
* Thu Dec 11 2008 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-1
17aec2
- update to 0.96, big leap in versioning
17aec2
17aec2
* Sun Mar  2 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-5
17aec2
- Re-enable XML::LibXML BuildRequires
17aec2
17aec2
* Wed Feb 27 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-4
17aec2
- Rebuild for perl 5.10 (again)
17aec2
17aec2
* Mon Jan 28 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-3.1
17aec2
- temporarily disable BR against perl-XML-LibXML
17aec2
17aec2
* Thu Jan 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-3
17aec2
- rebuild for new perl
17aec2
17aec2
* Sat Jul 07 2007 Robin Norwood <rnorwood@redhat.com> - 0.16-2
17aec2
- Resolves: rhbz#247213
17aec2
- Fix provides and requires scripts.
17aec2
17aec2
* Mon Jul 02 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.16-1
17aec2
- Update to 0.16.
17aec2
- Brings specfile closer to Fedora Perl template.
17aec2
- Corrects Source0 URL (upstream maintainer has changed).
17aec2
- Move Requires filter into spec, and add Provides filter.
17aec2
17aec2
* Tue Feb 13 2007 Robin Norwood <rnorwood@redhat.com> - 0.15-1
17aec2
- New version: 0.15
17aec2
17aec2
* Fri Jun 09 2006 Jason Vas Dias <jvdias@redhat.com> - 0.14-2
17aec2
- fix bug 194706: fails to build under (new!) mock
17aec2
17aec2
* Mon Jun 05 2006 Jason Vas Dias <jvdias@redhat.com> - 0.14-1
17aec2
- upgrade to 0.14
17aec2
17aec2
* Fri Feb 03 2006 Jason Vas Dias <jvdias@redhat.com> - 0.13-1.1
17aec2
- rebuild for new perl-5.8.8
17aec2
17aec2
* Mon Dec 19 2005 Jason Vas Dias <jvdias@redhat.com> - 0.13-1
17aec2
- upgrade to 0.13
17aec2
17aec2
* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
17aec2
- rebuilt for new gcc
17aec2
17aec2
* Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
17aec2
- rebuilt for new gcj
17aec2
17aec2
* Sun Apr 18 2004 Ville Skyttä <ville.skytta at iki.fi> - 0.12-7
17aec2
- #121167
17aec2
- Handle ParserDetails.ini parser registration.
17aec2
- Require perl(:MODULE_COMPAT_*).
17aec2
- Own installed directories.
17aec2
17aec2
* Wed Oct 22 2003 Chip Turner <cturner@redhat.com> - 0.12-1
17aec2
- Specfile autogenerated.
17aec2