##
## perl-xml.spec -- OpenPKG RPM Specification
## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
## Copyright (c) 2000-2002 The OpenPKG Project
## Copyright (c) 2000-2002 Ralf S. Engelschall
##
## 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_xml_parser 2.31
%define V_xml_libxml 1.53
%define V_xml_libxslt 1.52
%define V_xml_simple 1.08
%define V_xml_namespacesupport 1.08
%define V_xml_sax 0.11
%define V_xml_sax_base 1.02
%define V_xml_xslt 0.40
%define V_xml_twig 3.08
%define V_xml_xpath 1.12
%define V_xml_xpath_simple 0.05
%define V_xml_easyobj 1.12
%define V_xml_rss 0.97
%define V_xml_xupdate_libxml 0.2.4
%define V_html_tagset 3.03
%define V_html_parser 3.26
%define V_rpc_xml 0.45
%define V_soap_lite 0.55
%define V_soap_lite_smartproxy 0.11
%define V_soap_payload 1.02
# package options
%ifndef with_libxml
%define with_libxml %{l_test -p libxml}
%endif
%ifndef with_libxslt
%define with_libxslt %{l_test -p libxslt}
%endif
%if "%{with_libxslt}" == "yes" && "%{with_libxml}" == "no"
%define with_libxml yes
%endif
# 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: 20021030
Release: 20021030
# 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-Simple-%{V_xml_simple}.tar.gz
Source2: http://www.cpan.org/modules/by-module/XML/XML-NamespaceSupport-%{V_xml_namespacesupport}.tar.gz
Source3: http://www.cpan.org/modules/by-module/XML/XML-SAX-%{V_xml_sax}.tar.gz
Source4: http://www.cpan.org/modules/by-module/XML/XML-SAX-Base-%{V_xml_sax_base}.tar.gz
Source5: http://www.cpan.org/modules/by-module/XML/XML-XSLT-%{V_xml_xslt}.tar.gz
Source6: http://www.cpan.org/modules/by-module/XML/XML-Twig-%{V_xml_twig}.tar.gz
Source7: http://www.cpan.org/modules/by-module/XML/XML-XPath-%{V_xml_xpath}.tar.gz
Source8: http://www.cpan.org/modules/by-module/XML/XML-XPath-Simple-%{V_xml_xpath_simple}.tar.gz
Source9: http://www.cpan.org/modules/by-module/XML/XML-EasyOBJ-%{V_xml_easyobj}.tar.gz
Source10: http://www.cpan.org/modules/by-module/XML/XML-RSS-%{V_xml_rss}.tar.gz
Source11: http://www.cpan.org/modules/by-module/XML/XML-XUpdate-LibXML-%{V_xml_xupdate_libxml}.tar.gz
Source12: http://www.cpan.org/modules/by-module/HTML/HTML-Tagset-%{V_html_tagset}.tar.gz
Source13: http://www.cpan.org/modules/by-module/HTML/HTML-Parser-%{V_html_parser}.tar.gz
Source14: http://www.cpan.org/modules/by-module/SOAP/SOAP-Lite-%{V_soap_lite}.tar.gz
Source15: http://www.cpan.org/modules/by-module/SOAP/SOAP-Lite-SmartProxy-%{V_soap_lite_smartproxy}.tar.gz
Source16: http://www.cpan.org/modules/by-module/SOAP/SOAP-payload-%{V_soap_payload}.tar.gz
Source17: http://www.cpan.org/modules/by-module/RPC/RPC-XML-%{V_rpc_xml}.tar.gz
Source18: http://www.cpan.org/modules/by-module/XML/XML-LibXML-%{V_xml_libxml}.tar.gz
Source19: http://www.cpan.org/modules/by-module/XML/XML-LibXSLT-%{V_xml_libxslt}.tar.gz
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20021002, perl, expat
PreReq: OpenPKG, openpkg >= 20021002, perl
%if "%{with_libxml}" == "yes"
BuildPreReq: libxml
%endif
%if "%{with_libxslt}" == "yes"
BuildPreReq: libxslt
%endif
AutoReq: no
AutoReqProv: no
%description
Perl modules for use with XML:
- XML::Parser (%{V_xml_parser})
%if "%{with_libxml}" == "yes"
- XML::LibXML (%{V_xml_libxml})
- XML::XUpdate::LibXML (%{V_xml_xupdate_libxml})
%endif
%if "%{with_libxslt}" == "yes"
- XML::LibXSLT (%{V_xml_libxslt})
%endif
- XML::Simple (%{V_xml_simple})
- XML::NamespaceSupport (%{V_xml_namespacesupport})
- XML::SAX (%{V_xml_sax})
- XML::SAX::Base (%{V_xml_sax_base})
- 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})
- HTML::Tagset (%{V_html_tagset})
- HTML::Parser (%{V_html_parser})
- RPC::XML (%{V_rpc_xml})
- SOAP::Lite (%{V_soap_lite})
- SOAP::Lite::SmartProxy (%{V_soap_lite_smartproxy})
- SOAP::payload (%{V_soap_payload})
%prep
%setup0 -q -c -n %{name}-%{version}
%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
%build
%install
rm -rf $RPM_BUILD_ROOT
%{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/lib/perl5
# create a wrapper script which finds the includes
eval `%{l_prefix}/bin/perl -V:version -V:archname`
perl=$RPM_BUILD_ROOT/perl
echo "#!/bin/sh" >$perl
echo "exec %{l_prefix}/bin/perl \\" >>$perl
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version} \\" >>$perl
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version}/${archname} \\" >>$perl
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl \\" >>$perl
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version} \\" >>$perl
echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version}/${archname} \\" >>$perl
echo " \"\$@\"" >>$perl
chmod a+x $perl
# build XML::Parser
( cd XML-Parser-%{V_xml_parser}
$perl Makefile.PL \
EXPATLIBPATH=%{l_prefix}/lib EXPATINCPATH=%{l_prefix}/include \
PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl Makefile.PL
$perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl /dev/null 2>&1 || true)
# avoid conflicts
eval `$perl -V:installarchlib -V:installprivlib -V:installsitearch -V:installsitelib`
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
%{l_files_std} \
'%not %dir %{l_prefix}/lib/perl5' \
'%not %dir %{l_prefix}/lib/perl5/*' \
"%not %dir $installarchlib" \
"%not %dir $installprivlib" \
"%not %dir $installsitearch" \
"%not %dir $installsitelib" \
"%not %dir $installarchlib/auto" \
"%not %dir $installprivlib/auto" \
"%not %dir $installsitearch/auto" \
"%not %dir $installsitelib/auto"
%files -f files
%clean
rm -rf $RPM_BUILD_ROOT