diff --git a/.cvsignore b/.cvsignore index 765a7dc..1756b97 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -XML-SAX-0.15.tar.gz +XML-SAX-0.16.tar.gz diff --git a/filter-requires-xmlsax.sh b/filter-requires-xmlsax.sh deleted file mode 100755 index 6677d02..0000000 --- a/filter-requires-xmlsax.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -/usr/lib/rpm/find-requires $* | grep -v 'perl(XML::SAX::PurePerl' diff --git a/perl-XML-SAX.spec b/perl-XML-SAX.spec index 3ac0491..bb3c697 100644 --- a/perl-XML-SAX.spec +++ b/perl-XML-SAX.spec @@ -1,58 +1,79 @@ -%define _use_internal_dependency_generator 0 -%{!?perl_vendorlib: %define perl_vendorlib %(eval "`perl -V:installvendorlib`"; echo $installvendorlib)} +Summary: XML-SAX Perl module +Name: perl-XML-SAX +Version: 0.16 +Release: 1%{?dist} -Summary: XML-SAX Perl module -Name: perl-XML-SAX -Version: 0.15 -Release: 1 -License: GPL or Artistic -Group: Development/Libraries -URL: http://search.cpan.org/dist/XML-SAX/ -Source: ftp://cpan.org/pub/CPAN/authors/id/M/MS/MSERGEANT/XML-SAX-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -BuildRequires: perl >= 2:5.8.0 -Requires: %(perl -MConfig -le 'if (defined $Config{useithreads}) { print "perl(:WITH_ITHREADS)" } else { print "perl(:WITHOUT_ITHREADS)" }') -Requires: %(perl -MConfig -le 'if (defined $Config{usethreads}) { print "perl(:WITH_THREADS)" } else { print "perl(:WITHOUT_THREADS)" }') -Requires: %(perl -MConfig -le 'if (defined $Config{uselargefiles}) { print "perl(:WITH_LARGEFILES)" } else { print "perl(:WITHOUT_LARGEFILES)" }') -Requires: perl(:MODULE_COMPAT_%(perl -MConfig -e 'print $Config{version}')) -Requires: perl-XML-LibXML perl-XML-LibXML-Common -Source1: filter-requires-xmlsax.sh -BuildArch: noarch -BuildRequires: perl-XML-NamespaceSupport perl-XML-LibXML perl-XML-LibXML-Common +Group: Development/Libraries +License: GPL or Artistic +URL: http://search.cpan.org/dist/XML-SAX/ +Source0: http://www.cpan.org/authors/id/G/GR/GRANTM/XML-SAX-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -# Provide perl-specific find-{provides,requires}. -%define __find_provides /usr/lib/rpm/find-provides.perl -# %%define __find_requires /usr/lib/rpm/find-requires.perl -%define __find_requires %{SOURCE1} +BuildArch: noarch +BuildRequires: perl(XML::NamespaceSupport) +BuildRequires: perl(XML::LibXML) perl(XML::LibXML::Common) +BuildRequires: perl(ExtUtils::MakeMaker) + +Requires: perl(:MODULE_COMPAT_%(perl -MConfig -e 'print $Config{version}')) +Requires: perl(XML::LibXML) perl(XML::LibXML::Common) %description -%{summary}. +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} +# Filter unwanted Requires: perl-XML-SAx should not Require perl(XML::SAX) +cat << \EOF > %{name}-req +#!/bin/sh +%{__perl_requires} $* |\ + sed -e '/perl(XML::SAX::PurePerl)/d' +EOF + +%define __perl_requires %{_builddir}/XML-SAX-%{version}/%{name}-req +chmod +x %{__perl_requires} + + +# Filter unwanted Provides: perl-XML-SAX should not Provide an +# unversioned perl(XML::SAX) along with the +# versioned one +cat << \EOF > %{name}-prov +#!/bin/sh +%{__perl_provides} $* |\ + sed -e '/perl(XML::SAX::PurePerl)/d' +EOF + +%define __perl_provides %{_builddir}/XML-SAX-%{version}/%{name}-prov +chmod +x %{__perl_provides} + + %build -echo N | CFLAGS="$RPM_OPT_FLAGS" perl Makefile.PL INSTALLDIRS=vendor -make OPTIMIZE="$RPM_OPT_FLAGS" +echo N | %{__perl} Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT -make install \ - PERL_INSTALL_ROOT=$RPM_BUILD_ROOT \ - INSTALLARCHLIB=$RPM_BUILD_ROOT%{perl_archlib} -find $RPM_BUILD_ROOT -type f -a \( -name perllocal.pod -o -name .packlist \ - -o \( -name '*.bs' -a -empty \) \) -exec rm -f {} ';' -find $RPM_BUILD_ROOT -type d -depth -exec rmdir {} 2>/dev/null ';' +make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT +find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';' +find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';' chmod -R u+w $RPM_BUILD_ROOT/* + touch $RPM_BUILD_ROOT%{perl_vendorlib}/XML/SAX/ParserDetails.ini -%check || : +%check make test %clean rm -rf $RPM_BUILD_ROOT + %post perl -MXML::SAX -e \ 'XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()' 2>/dev/null @@ -63,6 +84,7 @@ if [ $1 -eq 0 ]; then 'XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers()' fi + %files %defattr(-,root,root,-) %doc Changes LICENSE README @@ -72,11 +94,18 @@ fi %{perl_vendorlib}/XML/SAX/*.pm %{perl_vendorlib}/XML/SAX/*.pod %{perl_vendorlib}/XML/SAX/PurePerl -%{_mandir}/man3/XML::*.3* +%{_mandir}/man3/XML::*.3pm* %ghost %{perl_vendorlib}/XML/SAX/ParserDetails.ini %exclude %{perl_vendorlib}/XML/SAX/placeholder.pl + %changelog +* Mon Jul 02 2007 Jose Pedro Oliveira - 0.16-1 +- Update to 0.16. +- Brings specfile closer to Fedora Perl template. +- Corrects Source0 URL (upstream maintainer has changed). +- Move Requires filter into spec, and add Provides filter. + * Tue Feb 13 2007 Robin Norwood - 0.15-1 - New version: 0.15 diff --git a/sources b/sources index b83e7e3..617117f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -4b2276bafedc5a41cf50fea2296e31c4 XML-SAX-0.15.tar.gz +4b07b6a9884f772ee07139b385661e9d XML-SAX-0.16.tar.gz