]>
Commit | Line | Data |
---|---|---|
c3053b4d | 1 | # |
2 | # Conditional build: | |
d2bc690b | 3 | %bcond_without tests # do not perform "make test" |
c3053b4d | 4 | # |
93b10e78 | 5 | %include /usr/lib/rpm/macros.perl |
9a0b3960 | 6 | %define pdir XML |
7 | %define pnam LibXML | |
5b1cc450 | 8 | Summary: XML::LibXML - interface to the GNOME libxml2 library |
ae85d059 | 9 | Summary(pl.UTF-8): XML::LibXML - interfejs do biblioteki libxml2 z GNOME |
70aff09e | 10 | Name: perl-XML-LibXML |
3d8f0179 | 11 | Version: 2.0118 |
cc19b353 | 12 | Release: 2 |
35b66355 | 13 | # same as perl |
d2bc690b | 14 | License: GPL v1+ or Artistic |
93b10e78 | 15 | Group: Development/Languages/Perl |
e9816160 | 16 | Source0: http://www.cpan.org/modules/by-module/XML/%{pdir}-%{pnam}-%{version}.tar.gz |
3d8f0179 | 17 | # Source0-md5: da8d61a5d0d1bfd8d46814e376d33f58 |
5c9eff29 | 18 | URL: http://search.cpan.org/dist/XML-LibXML/ |
d91c82a2 JB |
19 | BuildRequires: libxml2-devel >= 1:2.7.2 |
20 | BuildRequires: perl-ExtUtils-MakeMaker >= 6.56 | |
0042f58e | 21 | BuildRequires: perl-XML-NamespaceSupport >= 1.07 |
c3053b4d | 22 | BuildRequires: perl-XML-SAX >= 0.11 |
46f69d6d | 23 | BuildRequires: perl-devel >= 1:5.8.0 |
38915a66 | 24 | BuildRequires: rpm-perlprov >= 4.1-13 |
d91c82a2 JB |
25 | %if %{with tests} |
26 | BuildRequires: iconv | |
27 | BuildRequires: perl-Test-Simple | |
28 | %endif | |
29 | Requires: libxml2 >= 1:2.7.2 | |
30 | Requires: perl-XML-NamespaceSupport >= 1.07 | |
31 | Requires: perl-XML-SAX >= 0.11 | |
7a25fbd0 | 32 | Provides: perl-XML-LibXML-XPathContext = %{version} |
8f080126 | 33 | Obsoletes: perl-XML-LibXML-Common |
e5d57ecf | 34 | Obsoletes: perl-XML-LibXML-XPathContext <= 0:0.07 |
88362b24 | 35 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
93b10e78 | 36 | |
37 | %description | |
25829699 | 38 | This module implements much of the DOM Level 2 API as an interface to |
a559f02a | 39 | the GNOME libxml2 library. This makes it a fast and highly capable |
25829699 JB |
40 | validating XML parser library, as well as a high performance DOM. |
41 | ||
89406f45 JR |
42 | %description -l pl.UTF-8 |
43 | Ten moduł to implementacja większości API DOM Level 2 jako interfejsu | |
d91c82a2 JB |
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. | |
93b10e78 | 46 | |
47 | %package SAX | |
46f69d6d | 48 | Summary: XML::LibXML::SAX Perl module - XML::LibXML direct SAX parser |
d91c82a2 | 49 | Summary(pl.UTF-8): Moduł Perla XML::LibXML::SAX - bezpośredni analizator SAX z XML::LibXML |
93b10e78 | 50 | Group: Development/Languages/Perl |
3f1d5dc1 | 51 | Requires: %{name} = %{version}-%{release} |
93b10e78 | 52 | |
53 | %description SAX | |
25829699 | 54 | This class allows you to generate SAX2 events using LibXML. Note that |
64c92586 | 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. | |
25829699 | 59 | |
89406f45 JR |
60 | %description SAX -l pl.UTF-8 |
61 | Ta klasa pozwala generować zdarzenia SAX2 przy użyciu LibXML2. To nie | |
d91c82a2 | 62 | jest analizator oparty na strumieniach - przetwarza dokumenty na DOM i |
89406f45 | 63 | następnie wędruje po drzewie DOM. Wynika to z faktu, że w libxml2 |
d91c82a2 JB |
64 | analiza oparta na strumieniach jest bardzo prymitywna i wymagałaby |
65 | wiele pracy, aby umożliwić strumieniową analizę SAX2. | |
93b10e78 | 66 | |
67 | %prep | |
e9816160 | 68 | %setup -q -n %{pdir}-%{pnam}-%{version} |
93b10e78 | 69 | |
70 | %build | |
0de22b55 AG |
71 | SKIP_SAX_INSTALL=true; |
72 | export SKIP_SAX_INSTALL | |
d7823dc1 | 73 | |
38915a66 | 74 | %{__perl} Makefile.PL \ |
64a03af0 | 75 | INSTALLDIRS=vendor |
e086ce6b | 76 | %{__make} \ |
f3dbed48 | 77 | CC="%{__cc}" \ |
e086ce6b | 78 | OPTIMIZE="%{rpmcflags}" |
93b10e78 | 79 | |
46f69d6d | 80 | %{?with_tests:%{__make} test} |
c3053b4d | 81 | |
93b10e78 | 82 | %install |
83 | rm -rf $RPM_BUILD_ROOT | |
84 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
85 | ||
e086ce6b JB |
86 | %{__make} install \ |
87 | DESTDIR=$RPM_BUILD_ROOT | |
93b10e78 | 88 | install example/{*.pl,*.xml,*.dtd,*.xhtml} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
89 | ||
90 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex | |
91 | install example/complex/{*.xml,*.dtd} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex | |
92 | ||
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 | |
95 | ||
d91c82a2 JB |
96 | # mans are provided |
97 | %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/XML/{LibXML.pod,LibXML/*.pod,LibXML/SAX/*.pod} | |
98 | ||
88362b24 JB |
99 | %clean |
100 | rm -rf $RPM_BUILD_ROOT | |
d238a71d | 101 | |
93b10e78 | 102 | %post SAX |
4538f7d7 | 103 | umask 022 |
35b66355 | 104 | %{__perl} -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()" |
93b10e78 | 105 | |
106 | %preun SAX | |
05892067 JB |
107 | if [ "$1" = "0" ]; then |
108 | umask 022 | |
109 | %{__perl} -MXML::SAX -e "XML::SAX->remove_parser(q(XML::LibXML::SAX::Parser))->save_parsers()" | |
110 | fi | |
93b10e78 | 111 | |
93b10e78 | 112 | %files |
113 | %defattr(644,root,root,755) | |
d91c82a2 | 114 | %doc Changes LICENSE README TODO |
38915a66 | 115 | %{perl_vendorarch}/XML/LibXML.pm |
797a7922 | 116 | %dir %{perl_vendorarch}/XML/LibXML |
e086ce6b | 117 | %{perl_vendorarch}/XML/LibXML/[!S]*.pm |
797a7922 | 118 | %dir %{perl_vendorarch}/auto/XML/LibXML |
38915a66 | 119 | %attr(755,root,root) %{perl_vendorarch}/auto/XML/LibXML/LibXML.so |
13a12d43 | 120 | %{_mandir}/man3/XML::LibXML.3pm* |
e086ce6b | 121 | %{_mandir}/man3/XML::LibXML::[!S]* |
1968b26e | 122 | %{_mandir}/man3/XML::LibXML::S[!A]* |
c3053b4d | 123 | %dir %{_examplesdir}/%{name}-%{version} |
124 | %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/x*.pl | |
e086ce6b | 125 | %{_examplesdir}/%{name}-%{version}/[!x]* |
93b10e78 | 126 | |
127 | %files SAX | |
128 | %defattr(644,root,root,755) | |
38915a66 | 129 | %dir %{perl_vendorarch}/XML/LibXML/SAX |
130 | %{perl_vendorarch}/XML/LibXML/SAX.pm | |
131 | %{perl_vendorarch}/XML/LibXML/SAX/*.pm | |
0042f58e | 132 | %{_mandir}/man3/XML::LibXML::SAX.3pm* |
93b10e78 | 133 | %{_mandir}/man3/XML::LibXML::SAX::* |