3 %bcond_without tests # do not perform "make test"
6 # see Makefile.PL /blacklist, choose first OK version to ensure skipping all broken releases
7 %define libxml2_ver 1:2.9.6
9 %include /usr/lib/rpm/macros.perl
12 Summary: XML::LibXML - interface to the GNOME libxml2 library
13 Summary(pl.UTF-8): XML::LibXML - interfejs do biblioteki libxml2 z GNOME
18 License: GPL v1+ or Artistic
19 Group: Development/Languages/Perl
20 Source0: http://www.cpan.org/modules/by-module/XML/%{pdir}-%{pnam}-%{version}.tar.gz
21 # Source0-md5: 43546fd9a3974f19323f9fb04861ece9
22 URL: http://search.cpan.org/dist/XML-LibXML/
23 BuildRequires: libxml2-devel >= %{libxml2_ver}
24 BuildRequires: perl-ExtUtils-MakeMaker >= 6.56
25 BuildRequires: perl-XML-NamespaceSupport >= 1.07
26 BuildRequires: perl-XML-SAX >= 0.11
27 BuildRequires: perl-devel >= 1:5.8.0
28 BuildRequires: rpm-perlprov >= 4.1-13
31 BuildRequires: perl-Test-Simple
33 Requires: libxml2 >= %{libxml2_ver}
34 Requires: perl-XML-NamespaceSupport >= 1.07
35 Requires: perl-XML-SAX >= 0.11
36 Provides: perl-XML-LibXML-XPathContext = %{version}
37 Obsoletes: perl-XML-LibXML-Common
38 Obsoletes: perl-XML-LibXML-XPathContext <= 0:0.07
39 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42 This module implements much of the DOM Level 2 API as an interface to
43 the GNOME libxml2 library. This makes it a fast and highly capable
44 validating XML parser library, as well as a high performance DOM.
46 %description -l pl.UTF-8
47 Ten moduł to implementacja większości API DOM Level 2 jako interfejsu
48 do biblioteki GNOME libxml2. Daje to szybki i mający duże możliwości
49 analizator sprawdzający poprawność XML-a, a także wysoko wydajny DOM.
52 Summary: XML::LibXML::SAX Perl module - XML::LibXML direct SAX parser
53 Summary(pl.UTF-8): Moduł Perla XML::LibXML::SAX - bezpośredni analizator SAX z XML::LibXML
54 Group: Development/Languages/Perl
55 Requires: %{name} = %{version}-%{release}
58 This class allows you to generate SAX2 events using LibXML. Note that
59 this is not a stream based parser, instead it parses documents into a
60 DOM and traverses the DOM tree. The reason being that libxml2's stream
61 based parsing is extremely primitive, and would require an extreme
62 amount of work to allow SAX2 parsing in a stream manner.
64 %description SAX -l pl.UTF-8
65 Ta klasa pozwala generować zdarzenia SAX2 przy użyciu LibXML2. To nie
66 jest analizator oparty na strumieniach - przetwarza dokumenty na DOM i
67 następnie wędruje po drzewie DOM. Wynika to z faktu, że w libxml2
68 analiza oparta na strumieniach jest bardzo prymitywna i wymagałaby
69 wiele pracy, aby umożliwić strumieniową analizę SAX2.
72 %setup -q -n %{pdir}-%{pnam}-%{version}
75 SKIP_SAX_INSTALL=true;
76 export SKIP_SAX_INSTALL
78 %{__perl} Makefile.PL \
82 OPTIMIZE="%{rpmcflags}"
84 %{?with_tests:%{__make} test}
87 rm -rf $RPM_BUILD_ROOT
88 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
91 DESTDIR=$RPM_BUILD_ROOT
92 install example/{*.pl,*.xml,*.dtd,*.xhtml} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
94 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex
95 install example/complex/{*.xml,*.dtd} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex
97 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex/dtd
98 install example/complex/dtd/*.dtd $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex/dtd
101 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/XML/{LibXML.pod,LibXML/*.pod,LibXML/SAX/*.pod}
104 rm -rf $RPM_BUILD_ROOT
108 %{__perl} -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
111 if [ "$1" = "0" ]; then
113 %{__perl} -MXML::SAX -e "XML::SAX->remove_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
117 %defattr(644,root,root,755)
118 %doc Changes LICENSE README TODO
119 %{perl_vendorarch}/XML/LibXML.pm
120 %dir %{perl_vendorarch}/XML/LibXML
121 %{perl_vendorarch}/XML/LibXML/[!S]*.pm
122 %dir %{perl_vendorarch}/auto/XML/LibXML
123 %attr(755,root,root) %{perl_vendorarch}/auto/XML/LibXML/LibXML.so
124 %{_mandir}/man3/XML::LibXML.3pm*
125 %{_mandir}/man3/XML::LibXML::[!S]*
126 %{_mandir}/man3/XML::LibXML::S[!A]*
127 %dir %{_examplesdir}/%{name}-%{version}
128 %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/x*.pl
129 %{_examplesdir}/%{name}-%{version}/[!x]*
132 %defattr(644,root,root,755)
133 %dir %{perl_vendorarch}/XML/LibXML/SAX
134 %{perl_vendorarch}/XML/LibXML/SAX.pm
135 %{perl_vendorarch}/XML/LibXML/SAX/*.pm
136 %{_mandir}/man3/XML::LibXML::SAX.3pm*
137 %{_mandir}/man3/XML::LibXML::SAX::*