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