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