+#
+# Conditional build:
+# _with_tests - perform "make test"
+#
%include /usr/lib/rpm/macros.perl
-
-%define pdir XML
-%define pnam LibXML
-
-Summary: XML::LibXML perl module
-Summary(pl): Modu³ perla XML::LibXML
+%define pdir XML
+%define pnam LibXML
+Summary: XML::LibXML Perl module
+Summary(cs): Modul XML::LibXML pro Perl
+Summary(da): Perlmodul XML::LibXML
+Summary(de): XML::LibXML Perl Modul
+Summary(es): Módulo de Perl XML::LibXML
+Summary(fr): Module Perl XML::LibXML
+Summary(it): Modulo di Perl XML::LibXML
+Summary(ja): XML::LibXML Perl ¥â¥¸¥å¡¼¥ë
+Summary(ko): XML::LibXML ÆÞ ¸ðÁÙ
+Summary(no): Perlmodul XML::LibXML
+Summary(pl): Modu³ Perla XML::LibXML
+Summary(pt): Módulo de Perl XML::LibXML
+Summary(pt_BR): Módulo Perl XML::LibXML
+Summary(ru): íÏÄÕÌØ ÄÌÑ Perl XML::LibXML
+Summary(sv): XML::LibXML Perlmodul
+Summary(uk): íÏÄÕÌØ ÄÌÑ Perl XML::LibXML
+Summary(zh_CN): XML::LibXML Perl Ä£¿é
Name: perl-%{pdir}-%{pnam}
-Version: 1.51
-Release: 1
+Version: 1.53
+Release: 2
License: GPL
Group: Development/Languages/Perl
Source0: ftp://ftp.cpan.org/pub/CPAN/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
Patch0: %{name}-Makefile.patch
-BuildRequires: rpm-perlprov >= 4.0.2-56
-BuildRequires: perl-devel >= 5.6.1
-BuildRequires: perl-XML-SAX
BuildRequires: libxml2-devel >= 2.4.8
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRequires: perl-XML-LibXML-Common
+BuildRequires: perl-XML-NamespaceSupport >= 1.07
+BuildRequires: perl-XML-SAX >= 0.11
+BuildRequires: perl-devel >= 5.6.1
+BuildRequires: rpm-perlprov >= 4.0.2-56
Requires: libxml2 >= 2.4.8
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
This module implements much of the DOM Level 2 API as an interface to
parser sprawdzaj±cy poprawno¶æ XML, a tak¿e wysoko wydajny DOM.
%package SAX
-Summary: XML::LibXML-SAX perl module
-Summary(pl): Modu³ perla XML::LibXML-SAX
+Summary: XML::LibXML::SAX perl module
+Summary(pl): Modu³ perla XML::LibXML::SAX
Group: Development/Languages/Perl
+Requires: %{name} = %{version}
%description SAX
This class allows you to generate SAX2 events using LibXML. Note that
perl Makefile.PL
%{__make} OPTIMIZE="%{rpmcflags}"
+# dtd test fails for unknown reason
+%{?_with_tests:%{__make} test}
+
%install
rm -rf $RPM_BUILD_ROOT
install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
%{__make} install DESTDIR=$RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
install example/{*.pl,*.xml,*.dtd,*.xhtml} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex
install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex/dtd
install example/complex/dtd/*.dtd $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex/dtd
-gzip -9nf Changes README PHISHS.CHANGES
+%clean
+rm -rf $RPM_BUILD_ROOT
%post SAX
perl -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
%preun SAX
perl -MXML::SAX -e "XML::SAX->remove_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
-%clean
-rm -rf $RPM_BUILD_ROOT
-
%files
%defattr(644,root,root,755)
-%doc *.gz
+%doc Changes README
%{perl_sitearch}/XML/LibXML.pm
-%dir %{perl_sitearch}/XML/LibXML
-%{perl_sitearch}/XML/LibXML/*.pm
-%{perl_sitearch}/XML/LibXML/*.pod
-%dir %{perl_sitearch}/auto/XML/LibXML
+%{perl_sitearch}/XML/LibXML/[^S]*.pm
%{perl_sitearch}/auto/XML/LibXML/LibXML.bs
%attr(755,root,root) %{perl_sitearch}/auto/XML/LibXML/LibXML.so
%{_mandir}/man3/XML::LibXML.3pm.gz
-%{_mandir}/man3/XML::LibXML::[^S][^A][^X]*
-%{_examplesdir}/%{name}-%{version}
+%{_mandir}/man3/XML::LibXML::[^S]*
+%dir %{_examplesdir}/%{name}-%{version}
+%attr(755,root,root) %{_examplesdir}/%{name}-%{version}/x*.pl
+%{_examplesdir}/%{name}-%{version}/[^x]*
%files SAX
%defattr(644,root,root,755)
%dir %{perl_sitearch}/XML/LibXML/SAX
+%{perl_sitearch}/XML/LibXML/SAX.pm
%{perl_sitearch}/XML/LibXML/SAX/*.pm
-%{_mandir}/man3/XML::LibXML::SAX.3pm.gz
+%{_mandir}/man3/XML::LibXML::SAX.3pm*
%{_mandir}/man3/XML::LibXML::SAX::*