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