]>
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 | |
feccbf37 | 8 | %define base_version 1.62 |
5b1cc450 | 9 | Summary: XML::LibXML - interface to the GNOME libxml2 library |
ae85d059 | 10 | Summary(pl.UTF-8): XML::LibXML - interfejs do biblioteki libxml2 z GNOME |
70aff09e | 11 | Name: perl-XML-LibXML |
feccbf37 | 12 | Version: %{base_version}_001 |
13 | %define ver %(echo %{version} | tr -d _) | |
1968b26e | 14 | Release: 1 |
35b66355 | 15 | # same as perl |
d2bc690b | 16 | License: GPL v1+ or Artistic |
93b10e78 | 17 | Group: Development/Languages/Perl |
1968b26e | 18 | Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{ver}.tar.gz |
feccbf37 | 19 | # Source0-md5: 01655a90b3f44e48efd486ac58c89cd6 |
35b66355 | 20 | BuildRequires: gdome2-devel >= 0.7.3 |
46f69d6d | 21 | BuildRequires: libxml2-devel >= 2.5.10 |
88362b24 | 22 | BuildRequires: perl-XML-LibXML-Common |
0042f58e | 23 | BuildRequires: perl-XML-NamespaceSupport >= 1.07 |
c3053b4d | 24 | BuildRequires: perl-XML-SAX >= 0.11 |
46f69d6d | 25 | BuildRequires: perl-devel >= 1:5.8.0 |
e086ce6b | 26 | BuildRequires: pkgconfig |
38915a66 | 27 | BuildRequires: rpm-perlprov >= 4.1-13 |
46f69d6d | 28 | Requires: libxml2 >= 2.5.10 |
88362b24 | 29 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
93b10e78 | 30 | |
31 | %description | |
25829699 | 32 | This module implements much of the DOM Level 2 API as an interface to |
a559f02a | 33 | the GNOME libxml2 library. This makes it a fast and highly capable |
25829699 JB |
34 | validating XML parser library, as well as a high performance DOM. |
35 | ||
89406f45 JR |
36 | %description -l pl.UTF-8 |
37 | Ten moduł to implementacja większości API DOM Level 2 jako interfejsu | |
38 | do biblioteki GNOME libxml2. Daje to szybki i o dużych możliwościach | |
39 | parser sprawdzający poprawność XML-a, a także wysoko wydajny DOM. | |
93b10e78 | 40 | |
41 | %package SAX | |
46f69d6d | 42 | Summary: XML::LibXML::SAX Perl module - XML::LibXML direct SAX parser |
ae85d059 | 43 | Summary(pl.UTF-8): Moduł Perla XML::LibXML::SAX - bezpośredni parser SAX z XML::LibXML |
93b10e78 | 44 | Group: Development/Languages/Perl |
3f1d5dc1 | 45 | Requires: %{name} = %{version}-%{release} |
93b10e78 | 46 | |
47 | %description SAX | |
25829699 | 48 | This class allows you to generate SAX2 events using LibXML. Note that |
64c92586 | 49 | this is not a stream based parser, instead it parses documents into a |
50 | DOM and traverses the DOM tree. The reason being that libxml2's stream | |
51 | based parsing is extremely primitive, and would require an extreme | |
52 | amount of work to allow SAX2 parsing in a stream manner. | |
25829699 | 53 | |
89406f45 JR |
54 | %description SAX -l pl.UTF-8 |
55 | Ta klasa pozwala generować zdarzenia SAX2 przy użyciu LibXML2. To nie | |
56 | jest parser bazujący na strumieniach - przetwarza dokumenty na DOM i | |
57 | następnie wędruje po drzewie DOM. Wynika to z faktu, że w libxml2 | |
58 | parsowanie oparte na strumieniach jest bardzo prymitywne i wymagałoby | |
59 | wiele pracy, aby umożliwić strumieniowe parsowanie SAX2. | |
93b10e78 | 60 | |
61 | %prep | |
1968b26e | 62 | %setup -q -n %{pdir}-%{pnam}-%{base_version} |
93b10e78 | 63 | |
64 | %build | |
0de22b55 AG |
65 | SKIP_SAX_INSTALL=true; |
66 | export SKIP_SAX_INSTALL | |
d7823dc1 | 67 | |
38915a66 | 68 | %{__perl} Makefile.PL \ |
64a03af0 | 69 | INSTALLDIRS=vendor |
e086ce6b JB |
70 | %{__make} \ |
71 | OPTIMIZE="%{rpmcflags}" | |
93b10e78 | 72 | |
46f69d6d | 73 | %{?with_tests:%{__make} test} |
c3053b4d | 74 | |
93b10e78 | 75 | %install |
76 | rm -rf $RPM_BUILD_ROOT | |
77 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} | |
78 | ||
e086ce6b JB |
79 | %{__make} install \ |
80 | DESTDIR=$RPM_BUILD_ROOT | |
93b10e78 | 81 | install example/{*.pl,*.xml,*.dtd,*.xhtml} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version} |
82 | ||
83 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex | |
84 | install example/complex/{*.xml,*.dtd} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex | |
85 | ||
86 | install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex/dtd | |
87 | install example/complex/dtd/*.dtd $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex/dtd | |
88 | ||
88362b24 JB |
89 | %clean |
90 | rm -rf $RPM_BUILD_ROOT | |
d238a71d | 91 | |
93b10e78 | 92 | %post SAX |
4538f7d7 | 93 | umask 022 |
35b66355 | 94 | %{__perl} -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()" |
93b10e78 | 95 | |
96 | %preun SAX | |
05892067 JB |
97 | if [ "$1" = "0" ]; then |
98 | umask 022 | |
99 | %{__perl} -MXML::SAX -e "XML::SAX->remove_parser(q(XML::LibXML::SAX::Parser))->save_parsers()" | |
100 | fi | |
93b10e78 | 101 | |
93b10e78 | 102 | %files |
103 | %defattr(644,root,root,755) | |
c3053b4d | 104 | %doc Changes README |
38915a66 | 105 | %{perl_vendorarch}/XML/LibXML.pm |
e086ce6b | 106 | %{perl_vendorarch}/XML/LibXML/[!S]*.pm |
38915a66 | 107 | %{perl_vendorarch}/auto/XML/LibXML/LibXML.bs |
108 | %attr(755,root,root) %{perl_vendorarch}/auto/XML/LibXML/LibXML.so | |
13a12d43 | 109 | %{_mandir}/man3/XML::LibXML.3pm* |
e086ce6b | 110 | %{_mandir}/man3/XML::LibXML::[!S]* |
1968b26e | 111 | %{_mandir}/man3/XML::LibXML::S[!A]* |
c3053b4d | 112 | %dir %{_examplesdir}/%{name}-%{version} |
113 | %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/x*.pl | |
e086ce6b | 114 | %{_examplesdir}/%{name}-%{version}/[!x]* |
93b10e78 | 115 | |
116 | %files SAX | |
117 | %defattr(644,root,root,755) | |
38915a66 | 118 | %dir %{perl_vendorarch}/XML/LibXML/SAX |
119 | %{perl_vendorarch}/XML/LibXML/SAX.pm | |
120 | %{perl_vendorarch}/XML/LibXML/SAX/*.pm | |
0042f58e | 121 | %{_mandir}/man3/XML::LibXML::SAX.3pm* |
93b10e78 | 122 | %{_mandir}/man3/XML::LibXML::SAX::* |