]> git.pld-linux.org Git - packages/perl-XML-LibXML.git/blob - perl-XML-LibXML.spec
- cosmetics, unification
[packages/perl-XML-LibXML.git] / perl-XML-LibXML.spec
1 #
2 # Conditional build:
3 %bcond_without  tests   # don't 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 Version:        1.58
15 Release:        1
16 # same as perl
17 License:        GPL or Artistic
18 Group:          Development/Languages/Perl
19 Source0:        http://www.cpan.org/authors/id/P/PH/PHISH/%{pdir}-%{pnam}-%{version}.tar.gz
20 # Source0-md5:  4691fc436e5c0f22787f5b4a54fc56b0
21 BuildRequires:  gdome2-devel >= 0.7.3
22 BuildRequires:  libxml2-devel >= 2.5.10
23 BuildRequires:  perl-XML-LibXML-Common
24 BuildRequires:  perl-XML-NamespaceSupport >= 1.07
25 BuildRequires:  perl-XML-SAX >= 0.11
26 BuildRequires:  perl-devel >= 1:5.8.0
27 BuildRequires:  pkgconfig
28 BuildRequires:  rpm-perlprov >= 4.1-13
29 Requires:       libxml2 >= 2.5.10
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %description
33 This module implements much of the DOM Level 2 API as an interface to
34 the GNOME libxml2 library. This makes it a fast and highly capable
35 validating XML parser library, as well as a high performance DOM.
36
37 %description -l pl
38 Ten modu³ to implementacja wiêkszo¶ci API DOM Level 2 jako interfejsu
39 do biblioteki GNOME libxml2. Daje to szybki i o du¿ych mo¿liwo¶ciach
40 parser sprawdzaj±cy poprawno¶æ XML-a, a tak¿e wysoko wydajny DOM.
41
42 %package SAX
43 Summary:        XML::LibXML::SAX Perl module - XML::LibXML direct SAX parser
44 Summary(pl):    Modu³ Perla XML::LibXML::SAX - bezpo¶redni parser SAX z XML::LibXML
45 Group:          Development/Languages/Perl
46 Requires:       %{name} = %{version}
47
48 %description SAX
49 This class allows you to generate SAX2 events using LibXML. Note that
50 this is not a stream based parser, instead it parses documents into a
51 DOM and traverses the DOM tree. The reason being that libxml2's stream
52 based parsing is extremely primitive, and would require an extreme
53 amount of work to allow SAX2 parsing in a stream manner.
54
55 %description SAX -l pl
56 Ta klasa pozwala generowaæ zdarzenia SAX2 przy u¿yciu LibXML2. To nie
57 jest parser bazuj±cy na strumieniach - przetwarza dokumenty na DOM i
58 nastêpnie wêdruje po drzewie DOM. Wynika to z faktu, ¿e w libxml2
59 parsowanie oparte na strumieniach jest bardzo prymitywne i wymaga³oby
60 wiele pracy, aby umo¿liwiæ strumieniowe parsowanie SAX2.
61
62 %prep
63 %setup -q -n %{pdir}-%{pnam}-%{version}
64
65 %build
66 SKIP_SAX_INSTALL=true;
67 export SKIP_SAX_INSTALL
68
69 %{__perl} Makefile.PL \
70         INSTALLDIRS=vendor
71
72 %{__make} \
73         OPTIMIZE="%{rpmcflags}"
74
75 %{?with_tests:%{__make} test}
76
77 %install
78 rm -rf $RPM_BUILD_ROOT
79 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
80
81 %{__make} install \
82         DESTDIR=$RPM_BUILD_ROOT
83
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 %dir %{_examplesdir}/%{name}-%{version}
115 %attr(755,root,root) %{_examplesdir}/%{name}-%{version}/x*.pl
116 %{_examplesdir}/%{name}-%{version}/[!x]*
117
118 %files SAX
119 %defattr(644,root,root,755)
120 %dir %{perl_vendorarch}/XML/LibXML/SAX
121 %{perl_vendorarch}/XML/LibXML/SAX.pm
122 %{perl_vendorarch}/XML/LibXML/SAX/*.pm
123 %{_mandir}/man3/XML::LibXML::SAX.3pm*
124 %{_mandir}/man3/XML::LibXML::SAX::*
This page took 0.055726 seconds and 3 git commands to generate.