]> git.pld-linux.org Git - packages/perl-XML-LibXML.git/blob - perl-XML-LibXML.spec
63b7d03825032fe5509e17a9de777f52773aea57
[packages/perl-XML-LibXML.git] / perl-XML-LibXML.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # perform "make test"
4 #
5 # TODO:
6 # - add pod files to spec
7 #
8 %include        /usr/lib/rpm/macros.perl
9 %define         pdir    XML
10 %define         pnam    LibXML
11 Summary:        XML::LibXML - Interface to the gnome libxml2 library
12 Summary(pl):    XML::LibXML - Interfejs do biblioteki libxml2 z gnome
13 Name:           perl-%{pdir}-%{pnam}
14 Version:        1.56
15 Release:        1
16 # same as perl
17 License:        GPL or Artistic
18 Group:          Development/Languages/Perl
19 Source0:        http://www.cpan.org/authors/id/P/PH/PHISH/%{pdir}-%{pnam}-%{version}.tar.gz
20 # Source0-md5:  e22a4d79e6afdc8965518bf8a3abb492
21 Patch0:         %{name}-Makefile.patch
22 Patch1:         %{name}-extern.patch
23 BuildRequires:  gdome2-devel >= 0.7.3
24 BuildRequires:  libxml2-devel >= 2.5.10
25 BuildRequires:  perl-XML-LibXML-Common
26 BuildRequires:  perl-XML-NamespaceSupport >= 1.07
27 BuildRequires:  perl-XML-SAX >= 0.11
28 BuildRequires:  perl-devel >= 1:5.8.0
29 BuildRequires:  pkgconfig
30 BuildRequires:  rpm-perlprov >= 4.1-13
31 Requires:       libxml2 >= 2.5.10
32 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
33
34 %description
35 This module implements much of the DOM Level 2 API as an interface to
36 the GNOME libxml2 library. This makes it a fast and highly capable
37 validating XML parser library, as well as a high performance DOM.
38
39 %description -l pl
40 Ten modu³ to implementacja wiêkszo¶ci API DOM Level 2 jako interfejsu
41 do biblioteki GNOME libxml2. Daje to szybki i o du¿ych mo¿liwo¶ciach
42 parser sprawdzaj±cy poprawno¶æ XML, a tak¿e wysoko wydajny DOM.
43
44 %package SAX
45 Summary:        XML::LibXML::SAX Perl module - XML::LibXML direct SAX parser
46 Summary(pl):    Modu³ Perla XML::LibXML::SAX - bezpo¶redni parser SAX z XML::LibXML
47 Group:          Development/Languages/Perl
48 Requires:       %{name} = %{version}
49
50 %description SAX
51 This class allows you to generate SAX2 events using LibXML. Note that
52 this is not a stream based parser, instead it parses documents into a
53 DOM and traverses the DOM tree. The reason being that libxml2's stream
54 based parsing is extremely primitive, and would require an extreme
55 amount of work to allow SAX2 parsing in a stream manner.
56
57 %description SAX -l pl
58 Ta klasa pozwala generowaæ zdarzenia SAX2 przy u¿yciu LibXML2. To nie
59 jest parser bazuj±cy na strumieniach - przetwarza dokumenty na DOM i
60 nastêpnie wêdruje po drzewie DOM. Wynika to z faktu, ¿e w libxml2
61 parsowanie oparte na strumieniach jest bardzo prymitywne i wymaga³oby
62 wiele pracy, aby umo¿liwiæ strumieniowe parsowanie SAX2.
63
64 %prep
65 %setup -q -n %{pdir}-%{pnam}-%{version}
66 %patch0 -p1
67 %patch1 -p1
68
69 %build
70 %{__perl} Makefile.PL \
71         INSTALLDIRS=vendor
72 %{__make} \
73         OPTIMIZE="%{rpmcflags}"
74
75 # dtd test fails for unknown reason
76 %{?with_tests:%{__make} test}
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
81
82 %{__make} install \
83         DESTDIR=$RPM_BUILD_ROOT
84
85 install example/{*.pl,*.xml,*.dtd,*.xhtml} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
86
87 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex
88 install example/complex/{*.xml,*.dtd} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex
89
90 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex/dtd
91 install example/complex/dtd/*.dtd $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex/dtd
92
93 %clean
94 rm -rf $RPM_BUILD_ROOT
95
96 %post SAX
97 umask 022
98 %{__perl} -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
99
100 %preun SAX
101 umask 022
102 %{__perl} -MXML::SAX -e "XML::SAX->remove_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
103
104 %files
105 %defattr(644,root,root,755)
106 %doc Changes README
107 %{perl_vendorarch}/XML/LibXML.pm
108 %{perl_vendorarch}/XML/LibXML/[!S]*.pm
109 %{perl_vendorarch}/auto/XML/LibXML/LibXML.bs
110 %attr(755,root,root) %{perl_vendorarch}/auto/XML/LibXML/LibXML.so
111 %{_mandir}/man3/XML::LibXML.3pm*
112 %{_mandir}/man3/XML::LibXML::[!S]*
113 %dir %{_examplesdir}/%{name}-%{version}
114 %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/x*.pl
115 %{_examplesdir}/%{name}-%{version}/[!x]*
116
117 %files SAX
118 %defattr(644,root,root,755)
119 %dir %{perl_vendorarch}/XML/LibXML/SAX
120 %{perl_vendorarch}/XML/LibXML/SAX.pm
121 %{perl_vendorarch}/XML/LibXML/SAX/*.pm
122 %{_mandir}/man3/XML::LibXML::SAX.3pm*
123 %{_mandir}/man3/XML::LibXML::SAX::*
This page took 0.479895 seconds and 2 git commands to generate.