+#
+# Conditional build:
+%bcond_without tests # do not perform "make test"
+#
%include /usr/lib/rpm/macros.perl
-%define __find_requires %{_builddir}/XML-DOM-%{version}/find-perl-requires
-Summary: XML-DOM perl module
-Summary(pl): Modu³ perla XML-DOM
+%define pdir XML
+%define pnam DOM
+Summary: XML::DOM - build DOM Level 1 compliant document structures
+Summary(pl): XML::DOM - budowanie struktur dokumentów zgodnych z DOM Level 1
Name: perl-XML-DOM
-Version: 1.25
-Release: 1
-License: GPL
+Version: 1.43
+Release: 2
+# same as perl
+License: GPL v1+ or Artistic
Group: Development/Languages/Perl
-Group(pl): Programowanie/Jêzyki/Perl
-Source0: ftp://ftp.perl.org/pub/CPAN/modules/by-module/XML/XML-DOM-%{version}.tar.gz
-Patch0: perl-XML-DOM-dep.patch
-BuildRequires: rpm-perlprov >= 3.0.3-16
-BuildRequires: perl >= 5.005_03-14
-BuildRequires: perl-XML-Parser
-%requires_eq perl
-Requires: %{perl_sitearch}
+Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5: e4c3fdd46e7ada0f9db326b493058d4d
+BuildRequires: perl-devel >= 1:5.8.0
+BuildRequires: rpm-perlprov >= 4.1-13
+%if %{with tests}
+BuildRequires: perl-XML-Parser >= 2.30
+BuildRequires: perl-XML-RegExp
+BuildRequires: perl-libwww
+BuildRequires: perl-libxml >= 0.07
+%endif
+Obsoletes: perl-libxml-enno
+BuildArch: noarch
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
-XML-DOM - module for building DOM Level 1 compliant document
-structures.
+This is a Perl extension to XML::Parser. It adds a new 'Style' to
+XML::Parser, called 'Dom', that allows XML::Parser to build an Object
+Oriented datastructure with a DOM Level 1 compliant interface.
+However, there is a new DOM module, XML::GDOME which is under active
+development and significantly faster than XML::DOM, since it is based
+on the libgdome C library.
%description -l pl
-XML-DOM - modu³ do tworzenia struktur dokumentów zgodnych z DOM Level
-1.
+To jest rozszerzenie Perla do XML::Parser. Dodaje do XML::Parser nowy
+styl o nazwie "Dom", pozwalaj±c modu³owi budowaæ obiektowo
+zorientowane struktury danych z interfejsem zgodnym z DOM Level 1.
+Aczkolwiek jest nowy modu³ DOM, XML::GDOME - aktualnie aktywnie
+rozwijany i znacznie szybszy ni¿ XML::DOM, poniewa¿ jest oparty na
+bibliotece C libgdome.
%prep
-%setup -q -n XML-DOM-%{version}
-%patch -p1
-
-chmod +x find-perl-requires
+%setup -q -n %{pdir}-%{pnam}-%{version}
%build
-perl Makefile.PL
-make
+%{__perl} Makefile.PL \
+ INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
%install
rm -rf $RPM_BUILD_ROOT
-make install DESTDIR=$RPM_BUILD_ROOT
-
-(
- cd $RPM_BUILD_ROOT%{perl_sitearch}/auto/XML/DOM
- sed -e "s#$RPM_BUILD_ROOT##" .packlist >.packlist.new
- mv .packlist.new .packlist
-)
-gzip -9nf $RPM_BUILD_ROOT%{_mandir}/man3/* \
- Changes README
+%{__make} install \
+ DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc {Changes,README}.gz samples/*
-
-%{perl_sitelib}/XML/DOM.pm
-%{perl_sitearch}/auto/XML/DOM
-
+%doc Changes README
+%dir %{perl_vendorlib}/XML/DOM
+%{perl_vendorlib}/XML/DOM.pm
+%{perl_vendorlib}/XML/DOM/*.pm
+%{perl_vendorlib}/XML/Handler/*
%{_mandir}/man3/*