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