##
## perl-xml.spec -- OpenPKG RPM Specification
## Copyright (c) 2000-2004 The OpenPKG Project
## Copyright (c) 2000-2004 Ralf S. Engelschall
## Copyright (c) 2000-2004 Cable & Wireless
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
## SUCH DAMAGE.
##
# versions of individual parts
%define V_html_parser 3.35
%define V_html_simpleparse 0.12
%define V_html_table 1.20
%define V_html_tagreader 1.06
%define V_html_tagset 3.03
%define V_html_tree 3.18
%define V_xml_dom 1.43
%define V_xml_dtdparser 1.7
%define V_xml_easyobj 1.12
%define V_xml_gdome 0.85
%define V_xml_libxml 1.56
%define V_xml_libxml_common 0.13
%define V_xml_libxml_iterator 1.00
%define V_xml_libxml_perl 0.07
%define V_xml_libxml_xpathcontext 0.06
%define V_xml_libxslt 1.53
%define V_xml_namespacesupport 1.08
%define V_xml_nodefilter 0.01
%define V_xml_parser 2.34
%define V_xml_quote 1.02
%define V_xml_regexp 0.03
%define V_xml_rss 1.02
%define V_xml_sax 0.12
%define V_xml_sax_base 1.02
%define V_xml_sax_expat 0.37
%define V_xml_simple 2.09
%define V_xml_twig 3.12
%define V_xml_writer 0.4
%define V_xml_writer_string 0.1
%define V_xml_xpath 1.13
%define V_xml_xpath_simple 0.05
%define V_xml_xsh 1.8.2
%define V_xml_xslt 0.45
%define V_xml_xupdate_libxml 0.5.0
# package information
Name: perl-xml
Summary: Perl Modules for use with XML
URL: http://www.cpan.org/
Vendor: Perl Community
Packager: The OpenPKG Project
Distribution: OpenPKG [BASE]
Group: Language
License: GPL/Artistic
Version: 20040201
Release: 20040201
# package options
%option with_libxml no
%option with_libxslt no
%option with_libgdome no
# package option dependencies
%if "%{with_libxslt}" == "yes"
%undefine with_libxml
%define with_libxml yes
%endif
%if "%{with_libgdome}" == "yes"
%undefine with_libxml
%define with_libxml yes
%endif
# list of sources
Source0: http://www.cpan.org/modules/by-module/XML/XML-Parser-%{V_xml_parser}.tar.gz
Source1: http://www.cpan.org/modules/by-module/XML/XML-RegExp-%{V_xml_regexp}.tar.gz
Source2: http://www.cpan.org/modules/by-module/XML/XML-Simple-%{V_xml_simple}.tar.gz
Source3: http://www.cpan.org/modules/by-module/XML/XML-NamespaceSupport-%{V_xml_namespacesupport}.tar.gz
Source4: http://www.cpan.org/modules/by-module/XML/XML-SAX-%{V_xml_sax}.tar.gz
Source5: http://www.cpan.org/modules/by-module/XML/XML-SAX-Base-%{V_xml_sax_base}.tar.gz
Source6: http://www.cpan.org/modules/by-module/XML/XML-SAX-Expat-%{V_xml_sax_expat}.tar.gz
Source7: http://www.cpan.org/modules/by-module/XML/libxml-perl-%{V_xml_libxml_perl}.tar.gz
Source8: http://www.cpan.org/modules/by-module/XML/XML-DOM-%{V_xml_dom}.tar.gz
Source9: http://www.cpan.org/modules/by-module/XML/XML-XSLT-%{V_xml_xslt}.tar.gz
Source10: http://www.cpan.org/modules/by-module/XML/XML-Twig-%{V_xml_twig}.tar.gz
Source11: http://www.cpan.org/modules/by-module/XML/XML-XPath-%{V_xml_xpath}.tar.gz
Source12: http://www.cpan.org/modules/by-module/XML/XML-XPath-Simple-%{V_xml_xpath_simple}.tar.gz
Source13: http://www.cpan.org/modules/by-module/XML/XML-EasyOBJ-%{V_xml_easyobj}.tar.gz
Source14: http://www.cpan.org/modules/by-module/XML/XML-RSS-%{V_xml_rss}.tar.gz
Source15: http://www.cpan.org/modules/by-module/XML/XML-DTDParser-%{V_xml_dtdparser}.tar.gz
Source16: http://www.cpan.org/modules/by-module/XML/XML-Quote-%{V_xml_quote}.tar.gz
Source17: http://www.cpan.org/modules/by-module/XML/XML-Writer-%{V_xml_writer}.tar.gz
Source18: http://www.cpan.org/modules/by-module/XML/XML-Writer-String-%{V_xml_writer_string}.tar.gz
Source19: http://www.cpan.org/modules/by-module/XML/XML-NodeFilter-%{V_xml_nodefilter}.tar.gz
Source20: http://www.cpan.org/modules/by-module/HTML/HTML-Tagset-%{V_html_tagset}.tar.gz
Source21: http://www.cpan.org/modules/by-module/HTML/HTML-Parser-%{V_html_parser}.tar.gz
Source22: http://www.cpan.org/modules/by-module/HTML/HTML-Tree-%{V_html_tree}.tar.gz
Source23: http://www.cpan.org/modules/by-module/HTML/HTML-Table-%{V_html_table}.tar.gz
Source24: http://www.cpan.org/modules/by-module/HTML/HTML-TagReader-%{V_html_tagreader}.tar.gz
Source25: http://www.cpan.org/modules/by-module/HTML/HTML-SimpleParse-%{V_html_simpleparse}.tar.gz
Source26: http://www.cpan.org/authors/by-module/XML/XML-LibXML-Common-%{V_xml_libxml_common}.tar.gz
Source27: http://www.cpan.org/authors/by-module/XML/XML-LibXML-%{V_xml_libxml}.tar.gz
Source28: http://www.cpan.org/modules/by-module/XML/XML-LibXML-Iterator-%{V_xml_libxml_iterator}.tar.gz
Source29: http://www.cpan.org/modules/by-module/XML/XML-LibXML-XPathContext-%{V_xml_libxml_xpathcontext}.tar.gz
Source30: http://www.cpan.org/modules/by-module/XML/XML-XUpdate-LibXML-%{V_xml_xupdate_libxml}.tar.gz
Source31: http://www.cpan.org/modules/by-module/XML/XML-LibXSLT-%{V_xml_libxslt}.tar.gz
Source32: http://osdn.dl.sourceforge.net/sourceforge/xsh/XML-XSH-%{V_xml_xsh}.tar.gz
Source33: http://www.cpan.org/modules/by-module/XML/XML-GDOME-%{V_xml_gdome}.tar.gz
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20030103, perl, perl-openpkg >= 20040126, perl-util >= 20031202
PreReq: OpenPKG, openpkg >= 20030103, perl, perl-openpkg >= 20040126, perl-util >= 20031202
BuildPreReq: expat
PreReq: expat
%if "%{with_libxml}" == "yes"
BuildPreReq: libxml, perl-parse
PreReq: libxml, perl-parse
%endif
%if "%{with_libxslt}" == "yes"
BuildPreReq: libxslt
PreReq: libxslt
%endif
%if "%{with_libgdome}" == "yes"
BuildPreReq: libgdome
PreReq: libgdome
%endif
AutoReq: no
AutoReqProv: no
%description
Perl modules for use with XML:
- XML::Parser (%{V_xml_parser})
- XML::NodeFilter (%{V_xml_nodefilter})
%if "%{with_libxml}" == "yes"
- XML::LibXML::Common (%{V_xml_libxml_common})
- XML::LibXML (%{V_xml_libxml})
- XML::LibXML::Iterator (%{V_xml_libxml_iterator})
- XML::LibXML::XPathContext (%{V_xml_libxml_xpathcontext})
- XML::XUpdate::LibXML (%{V_xml_xupdate_libxml})
%endif
%if "%{with_libxslt}" == "yes"
- XML::LibXSLT (%{V_xml_libxslt})
- XML::XSH (%{V_xml_xsh})
%endif
%if "%{with_libgdome}" == "yes"
- XML::GDOME (%{V_xml_gdome})
%endif
- XML::RegExp (%{V_xml_regexp})
- XML::DOM (%{V_xml_dom})
- XML::Simple (%{V_xml_simple})
- XML::NamespaceSupport (%{V_xml_namespacesupport})
- XML::SAX (%{V_xml_sax})
- XML::SAX::Base (%{V_xml_sax_base})
- XML::SAX::Expat (%{V_xml_sax_expat})
- XML::XSLT (%{V_xml_xslt})
- XML::Twig (%{V_xml_twig})
- XML::XPath (%{V_xml_xpath})
- XML::XPath::Simple (%{V_xml_xpath_simple})
- XML::EasyOBJ (%{V_xml_easyobj})
- XML::RSS (%{V_xml_rss})
- XML::DTDParser (%{V_xml_dtdparser})
- XML::Quote (%{V_xml_quote})
- XML::Writer (%{V_xml_writer})
- XML::Writer::String (%{V_xml_writer_string})
- HTML::Tagset (%{V_html_tagset})
- HTML::Parser (%{V_html_parser})
- HTML::Tree (%{V_html_tree})
- HTML::Table (%{V_html_table})
- HTML::TagReader (%{V_html_tagreader})
- HTML::SimpleParse (%{V_html_simpleparse})
%prep
%setup0 -q -c
%setup1 -q -T -D -a 1
%setup2 -q -T -D -a 2
%setup3 -q -T -D -a 3
%setup4 -q -T -D -a 4
%setup5 -q -T -D -a 5
%setup6 -q -T -D -a 6
%setup7 -q -T -D -a 7
%setup8 -q -T -D -a 8
%setup9 -q -T -D -a 9
%setup10 -q -T -D -a 10
%setup11 -q -T -D -a 11
%setup12 -q -T -D -a 12
%setup13 -q -T -D -a 13
%setup14 -q -T -D -a 14
%setup15 -q -T -D -a 15
%setup16 -q -T -D -a 16
%setup17 -q -T -D -a 17
%setup18 -q -T -D -a 18
%setup19 -q -T -D -a 19
%setup20 -q -T -D -a 20
%setup21 -q -T -D -a 21
%setup22 -q -T -D -a 22
%setup23 -q -T -D -a 23
%setup24 -q -T -D -a 24
%setup25 -q -T -D -a 25
%setup26 -q -T -D -a 26
%setup27 -q -T -D -a 27
%setup28 -q -T -D -a 28
%setup29 -q -T -D -a 29
%setup30 -q -T -D -a 30
%setup31 -q -T -D -a 31
%setup32 -q -T -D -a 32
%setup33 -q -T -D -a 33
# FIXME: rse: required in XML-LibXML 1.56 for libxml 2.6.x
%{l_shtool} subst \
-e 's;LIBXML_DLL_IMPORT extern;LIBXML_DLL_IMPORT;g' \
XML-LibXML-%{V_xml_libxml}/LibXML.xs
%build
%install
%{l_prefix}/bin/perl-openpkg prepare
%{l_prefix}/bin/perl-openpkg -d %{SOURCE0} \
--args EXPATLIBPATH=%{l_prefix}/lib \
--args EXPATINCPATH=%{l_prefix}/include \
configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE14} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE15} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE16} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE17} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE18} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE19} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE20} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE21} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE22} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE23} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE24} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE25} configure build install
%if "%{with_libxml}" == "yes"
%{l_prefix}/bin/perl-openpkg -d %{SOURCE26} --args XMLPREFIX=%{l_prefix} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE27} --args XMLPREFIX=%{l_prefix} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE28} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE29} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE30} --args XMLPREFIX=%{l_prefix} configure build install
%endif
%if "%{with_libxslt}" == "yes"
%{l_prefix}/bin/perl-openpkg -d %{SOURCE31} --args XMLPREFIX=%{l_prefix} configure build install
%{l_prefix}/bin/perl-openpkg -d %{SOURCE32} configure build install
%endif
%if "%{with_libgdome}" == "yes"
%{l_prefix}/bin/perl-openpkg -d %{SOURCE33} configure build install
%endif
# pre-activate the XML::SAX parsers
eval `%{l_prefix}/bin/perl -V:installvendorlib`
( echo "[XML::SAX::PurePerl]"
echo "http://xml.org/sax/features/namespaces = 1"
echo "http://xml.org/sax/features/validation = 0"
echo ""
echo "[XML::SAX::Expat]"
echo "http://xml.org/sax/features/namespaces = 1"
echo "http://xml.org/sax/features/validation = 0"
) >$RPM_BUILD_ROOT$installvendorlib/XML/SAX/ParserDetails.ini
%{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
%files -f files
%clean
rm -rf $RPM_BUILD_ROOT