]> git.pld-linux.org Git - packages/perl-XML-LibXML.git/blob - perl-XML-LibXML.spec
- updated to 2.0209
[packages/perl-XML-LibXML.git] / perl-XML-LibXML.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # unit tests
4 #
5
6 # see Makefile.PL /blacklist, choose first OK version to ensure skipping all broken releases
7 %define libxml2_ver     1:2.9.6
8
9 %define         pdir    XML
10 %define         pnam    LibXML
11 Summary:        XML::LibXML - interface to the GNOME libxml2 library
12 Summary(pl.UTF-8):      XML::LibXML - interfejs do biblioteki libxml2 z GNOME
13 Name:           perl-XML-LibXML
14 Version:        2.0209
15 Release:        1
16 # same as perl
17 License:        GPL v1+ or Artistic
18 Group:          Development/Languages/Perl
19 Source0:        http://www.cpan.org/modules/by-module/XML/%{pdir}-%{pnam}-%{version}.tar.gz
20 # Source0-md5:  4c94dffff432bcf6cae8a0bfd9e64417
21 URL:            https://metacpan.org/dist/XML-LibXML
22 BuildRequires:  libxml2-devel >= %{libxml2_ver}
23 BuildRequires:  perl-Alien-Libxml2 >= 0.14
24 # Alien::Base::Wrapper
25 BuildRequires:  perl-Alien-Base >= 0.64_01
26 BuildRequires:  perl-ExtUtils-MakeMaker >= 6.56
27 BuildRequires:  perl-devel >= 1:5.8.1
28 BuildRequires:  rpm-perlprov >= 4.1-13
29 BuildRequires:  rpmbuild(macros) >= 1.745
30 %if %{with tests}
31 BuildRequires:  iconv
32 BuildRequires:  perl(Exporter) >= 5.57
33 BuildRequires:  perl-Encode
34 BuildRequires:  perl-Scalar-List-Utils
35 BuildRequires:  perl-Test-Simple
36 BuildRequires:  perl-XML-NamespaceSupport >= 1.07
37 BuildRequires:  perl-XML-SAX >= 0.11
38 %endif
39 Requires:       libxml2 >= %{libxml2_ver}
40 Requires:       perl-XML-NamespaceSupport >= 1.07
41 Requires:       perl-XML-SAX >= 0.11
42 Provides:       perl-XML-LibXML-XPathContext = %{version}
43 Obsoletes:      perl-XML-LibXML-Common < 0.14
44 Obsoletes:      perl-XML-LibXML-XPathContext <= 0:0.07
45 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
46
47 %description
48 This module implements much of the DOM Level 2 API as an interface to
49 the GNOME libxml2 library. This makes it a fast and highly capable
50 validating XML parser library, as well as a high performance DOM.
51
52 %description -l pl.UTF-8
53 Ten moduł to implementacja większości API DOM Level 2 jako interfejsu
54 do biblioteki GNOME libxml2. Daje to szybki i mający duże możliwości
55 analizator sprawdzający poprawność XML-a, a także wysoko wydajny DOM.
56
57 %package SAX
58 Summary:        XML::LibXML::SAX Perl module - XML::LibXML direct SAX parser
59 Summary(pl.UTF-8):      Moduł Perla XML::LibXML::SAX - bezpośredni analizator SAX z XML::LibXML
60 Group:          Development/Languages/Perl
61 Requires:       %{name} = %{version}-%{release}
62
63 %description SAX
64 This class allows you to generate SAX2 events using LibXML. Note that
65 this is not a stream based parser, instead it parses documents into a
66 DOM and traverses the DOM tree. The reason being that libxml2's stream
67 based parsing is extremely primitive, and would require an extreme
68 amount of work to allow SAX2 parsing in a stream manner.
69
70 %description SAX -l pl.UTF-8
71 Ta klasa pozwala generować zdarzenia SAX2 przy użyciu LibXML2. To nie
72 jest analizator oparty na strumieniach - przetwarza dokumenty na DOM i
73 następnie wędruje po drzewie DOM. Wynika to z faktu, że w libxml2
74 analiza oparta na strumieniach jest bardzo prymitywna i wymagałaby
75 wiele pracy, aby umożliwić strumieniową analizę SAX2.
76
77 %prep
78 %setup -q -n %{pdir}-%{pnam}-%{version}
79
80 %build
81 SKIP_SAX_INSTALL=true;
82 export SKIP_SAX_INSTALL
83
84 %{__perl} Makefile.PL \
85         INSTALLDIRS=vendor
86 %{__make} \
87         CC="%{__cc}" \
88         OPTIMIZE="%{rpmcflags}"
89
90 %{?with_tests:%{__make} test}
91
92 %install
93 rm -rf $RPM_BUILD_ROOT
94 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
95
96 %{__make} install \
97         DESTDIR=$RPM_BUILD_ROOT
98 install example/{*.pl,*.xml,*.dtd,*.xhtml} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
99
100 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex
101 install example/complex/{*.xml,*.dtd} $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex
102
103 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex/dtd
104 install example/complex/dtd/*.dtd $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}/complex/dtd
105
106 # mans are provided
107 %{__rm} $RPM_BUILD_ROOT%{perl_vendorarch}/XML/{LibXML.pod,LibXML/*.pod,LibXML/SAX/*.pod}
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %post SAX
113 umask 022
114 %{__perl} -MXML::SAX -e "XML::SAX->add_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
115
116 %preun SAX
117 if [ "$1" = "0" ]; then
118         umask 022
119         %{__perl} -MXML::SAX -e "XML::SAX->remove_parser(q(XML::LibXML::SAX::Parser))->save_parsers()"
120 fi
121
122 %files
123 %defattr(644,root,root,755)
124 %doc Changes LICENSE README TODO
125 %{perl_vendorarch}/XML/LibXML.pm
126 %dir %{perl_vendorarch}/XML/LibXML
127 %{perl_vendorarch}/XML/LibXML/[!S]*.pm
128 %dir %{perl_vendorarch}/auto/XML/LibXML
129 %attr(755,root,root) %{perl_vendorarch}/auto/XML/LibXML/LibXML.so
130 %{_mandir}/man3/XML::LibXML.3pm*
131 %{_mandir}/man3/XML::LibXML::[!S]*
132 %{_mandir}/man3/XML::LibXML::S[!A]*
133 %dir %{_examplesdir}/%{name}-%{version}
134 %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/x*.pl
135 %{_examplesdir}/%{name}-%{version}/[!x]*
136
137 %files SAX
138 %defattr(644,root,root,755)
139 %dir %{perl_vendorarch}/XML/LibXML/SAX
140 %{perl_vendorarch}/XML/LibXML/SAX.pm
141 %{perl_vendorarch}/XML/LibXML/SAX/*.pm
142 %{_mandir}/man3/XML::LibXML::SAX.3pm*
143 %{_mandir}/man3/XML::LibXML::SAX::*
This page took 0.042508 seconds and 4 git commands to generate.