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