]> git.pld-linux.org Git - packages/perl-XML-LibXML.git/blob - perl-XML-LibXML.spec
- up to 1.75
[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.75
12 Release:        1
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:  a54a402e8164693aab503dd69c14e0c4
18 URL:            http://search.cpan.org/dist/XML-LibXML/
19 %{?with_tests:BuildRequires:    iconv}
20 BuildRequires:  libxml2-devel >= 2.5.10
21 BuildRequires:  perl-XML-NamespaceSupport >= 1.07
22 BuildRequires:  perl-XML-SAX >= 0.11
23 BuildRequires:  perl-devel >= 1:5.8.0
24 BuildRequires:  rpm-perlprov >= 4.1-13
25 Requires:       libxml2 >= 2.5.10
26 Provides:       perl-XML-LibXML-XPathContext = %{version}
27 Obsoletes:      perl-XML-LibXML-Common
28 Obsoletes:      perl-XML-LibXML-XPathContext <= 0:0.07
29 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
30
31 %description
32 This module implements much of the DOM Level 2 API as an interface to
33 the GNOME libxml2 library. This makes it a fast and highly capable
34 validating XML parser library, as well as a high performance DOM.
35
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.
40
41 %package SAX
42 Summary:        XML::LibXML::SAX Perl module - XML::LibXML direct SAX parser
43 Summary(pl.UTF-8):      Moduł Perla XML::LibXML::SAX - bezpośredni parser SAX z XML::LibXML
44 Group:          Development/Languages/Perl
45 Requires:       %{name} = %{version}-%{release}
46
47 %description SAX
48 This class allows you to generate SAX2 events using LibXML. Note that
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.
53
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.
60
61 %prep
62 %setup -q -n %{pdir}-%{pnam}-%{version}
63
64 %build
65 SKIP_SAX_INSTALL=true;
66 export SKIP_SAX_INSTALL
67
68 %{__perl} Makefile.PL \
69         INSTALLDIRS=vendor
70 %{__make} \
71         CC="%{__cc}" \
72         OPTIMIZE="%{rpmcflags}"
73
74 %{?with_tests:%{__make} test}
75
76 %install
77 rm -rf $RPM_BUILD_ROOT
78 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
79
80 %{__make} install \
81         DESTDIR=$RPM_BUILD_ROOT
82 install example/{*.pl,*.xml,*.dtd,*.xhtml} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
83
84 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex
85 install example/complex/{*.xml,*.dtd} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex
86
87 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex/dtd
88 install example/complex/dtd/*.dtd $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex/dtd
89
90 %clean
91 rm -rf $RPM_BUILD_ROOT
92
93 %post SAX
94 umask 022
95 %{__perl} -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
96
97 %preun SAX
98 if [ "$1" = "0" ]; then
99         umask 022
100         %{__perl} -MXML::SAX -e "XML::SAX->remove_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
101 fi
102
103 %files
104 %defattr(644,root,root,755)
105 %doc Changes README
106 %{perl_vendorarch}/XML/LibXML.pm
107 %dir %{perl_vendorarch}/XML/LibXML
108 %{perl_vendorarch}/XML/LibXML/[!S]*.pm
109 %dir %{perl_vendorarch}/auto/XML/LibXML
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.095619 seconds and 4 git commands to generate.