]> git.pld-linux.org Git - packages/perl-XML-LibXML.git/blob - perl-XML-LibXML.spec
- BR: pkgconfig (needed to detect current gdome2 using gdome-config)
[packages/perl-XML-LibXML.git] / perl-XML-LibXML.spec
1 #
2 # Conditional build:
3 # _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 %define         _ver    1.54_3
15 Version:        %(echo %{_ver} | sed 's:_:\.:')
16 Release:        4
17 # same as perl
18 License:        GPL/Artistic
19 Group:          Development/Languages/Perl
20 #Source0:       http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
21 Source0:        http://www.cpan.org/authors/id/P/PH/PHISH/%{pdir}-%{pnam}-%{_ver}.tar.gz
22 # Source0-md5:  888d33be26b89ead449b2995a1e2adac
23 Patch0:         %{name}-Makefile.patch
24 BuildRequires:  gdome2-devel >= 0.7.3
25 BuildRequires:  libxml2-devel >= 2.4.8
26 BuildRequires:  perl-XML-LibXML-Common
27 BuildRequires:  perl-XML-NamespaceSupport >= 1.07
28 BuildRequires:  perl-XML-SAX >= 0.11
29 BuildRequires:  perl-devel >= 5.6.1
30 BuildRequires:  pkgconfig
31 BuildRequires:  rpm-perlprov >= 4.1-13
32 Requires:       libxml2 >= 2.4.8
33 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35 %description
36 This module implements much of the DOM Level 2 API as an interface to
37 the GNOME libxml2 library. This makes it a fast and highly capable
38 validating XML parser library, as well as a high performance DOM.
39
40 %description -l pl
41 Ten modu³ to implementacja wiêkszo¶ci API DOM Level 2 jako interfejsu
42 do biblioteki GNOME libxml2. Daje to szybki i o du¿ych mo¿liwo¶ciach
43 parser sprawdzaj±cy poprawno¶æ XML, a tak¿e wysoko wydajny DOM.
44
45 %package SAX
46 Summary:        XML::LibXML::SAX perl module
47 Summary(pl):    Modu³ perla XML::LibXML::SAX
48 Group:          Development/Languages/Perl
49 Requires:       %{name} = %{version}
50
51 %description SAX
52 This class allows you to generate SAX2 events using LibXML. Note that
53 this is not a stream based parser, instead it parses documents into a
54 DOM and traverses the DOM tree. The reason being that libxml2's stream
55 based parsing is extremely primitive, and would require an extreme
56 amount of work to allow SAX2 parsing in a stream manner.
57
58 %description SAX -l pl
59 Ta klasa pozwala generowaæ zdarzenia SAX2 przy u¿yciu LibXML2. To nie
60 jest parser bazuj±cy na strumieniach - przetwarza dokumenty na DOM i
61 nastêpnie wêdruje po drzewie DOM. Wynika to z faktu, ¿e w libxml2
62 parsowanie oparte na strumieniach jest bardzo prymitywne i wymaga³oby
63 wiele pracy, aby umo¿liwiæ strumieniowe parsowanie SAX2.
64
65 %prep
66 %setup -q -n %{pdir}-%{pnam}-%{_ver}
67 %patch0 -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.030851 seconds and 3 git commands to generate.