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