Explorar o código

finally fill this with the missing essential XML modules for Perl

Ralf S. Engelschall %!s(int64=24) %!d(string=hai) anos
pai
achega
67035ac98f
Modificáronse 1 ficheiros con 99 adicións e 21 borrados
  1. 99 21
      perl-xml/perl-xml.spec

+ 99 - 21
perl-xml/perl-xml.spec

@@ -24,8 +24,21 @@
 ##
 
 #   versions of individual parts
-%define       V_html_tagset       3.03
-%define       V_html_parser       3.26
+%define       V_xml_parser           2.31
+%define       V_xml_libxml           1.52
+%define       V_xml_libxslt          1.51
+%define       V_xml_simple           1.08
+%define       V_xml_namespacesupport 1.08
+%define       V_xml_sax              0.10
+%define       V_xml_xslt             0.40
+%define       V_xml_twig             3.05
+%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_html_tagset          3.03
+%define       V_html_parser          3.26
+%define       V_soap_lite            0.55
 
 #   package information
 Name:         perl-xml
@@ -36,42 +49,76 @@ Packager:     The OpenPKG Project
 Distribution: OpenPKG [BASE]
 Group:        Language
 License:      GPL/Artistic
-Version:      20020517
-Release:      20020517
+Version:      20020831
+Release:      20020831
 
 #   list of sources
-Source0: http://www.cpan.org/modules/by-module/HTML/HTML-Tagset-%{V_html_tagset}.tar.gz
-Source1: http://www.cpan.org/modules/by-module/HTML/HTML-Parser-%{V_html_parser}.tar.gz
-
+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-XSLT-%{V_xml_xslt}.tar.gz
+Source5:      http://www.cpan.org/modules/by-module/XML/XML-Twig-%{V_xml_twig}.tar.gz
+Source6:      http://www.cpan.org/modules/by-module/XML/XML-XPath-%{V_xml_xpath}.tar.gz
+Source7:      http://www.cpan.org/modules/by-module/XML/XML-XPath-Simple-%{V_xml_xpath_simple}.tar.gz
+Source8:      http://www.cpan.org/modules/by-module/XML/XML-EasyOBJ-%{V_xml_easyobj}.tar.gz
+Source9:      http://www.cpan.org/modules/by-module/XML/XML-RSS-%{V_xml_rss}.tar.gz
+Source10:     http://www.cpan.org/modules/by-module/HTML/HTML-Tagset-%{V_html_tagset}.tar.gz
+Source11:     http://www.cpan.org/modules/by-module/HTML/HTML-Parser-%{V_html_parser}.tar.gz
+Source12:     http://www.cpan.org/modules/by-module/SOAP/SOAP-Lite-%{V_soap_lite}.tar.gz
+Source13:     http://www.cpan.org/modules/by-module/XML/XML-LibXML-%{V_xml_libxml}.tar.gz
+Source14:     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 >= 20020206, perl
+BuildPreReq:  OpenPKG, openpkg >= 20020206, perl, expat, libxml, libxslt
 PreReq:       OpenPKG, openpkg >= 20020206, perl
 AutoReq:      no
 AutoReqProv:  no
 
 %description
     Perl modules for use with XML:
-    - HTML::Tagset     (%{V_html_tagset})
-    - HTML::Parser     (%{V_html_parser})
-    - HTML::Entities   (%{V_html_parser})
-    - HTML::HeadParser (%{V_html_parser})
-    - HTML::LinkExtor  (%{V_html_parser})
-    - HTML::PullParser (%{V_html_parser})
-    - HTML::TokParser  (%{V_html_parser})
+    - XML::Parser (%{V_xml_parser})
+    - XML::LibXML (%{V_xml_libxml})
+    - XML::LibXSLT (%{V_xml_libxslt})
+    - XML::Simple (%{V_xml_simple})
+    - XML::NamespaceSupport (%{V_xml_namespacesupport})
+    - XML::SAX (%{V_xml_sax})
+    - 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})
+    - SOAP::Lite (%{V_soap_lite})
 
 %prep
-    %setup0 -q -c -n %{name}-%{version}
+    %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
 
 %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
+
+    #   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
@@ -84,8 +131,20 @@ AutoReqProv:  no
     echo " \"\$@\"" >>$perl
     chmod a+x $perl
 
-    # uncompress and build modules
-    for mod in %{SOURCE0} %{SOURCE1}; do
+    #   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 </dev/null
+      %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl all
+      %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl install
+    )
+
+    #   build standard modules
+    for mod in \
+        %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4}  %{SOURCE5}  %{SOURCE6} \
+        %{SOURCE7} %{SOURCE8} %{SOURCE9} %{SOURCE10} %{SOURCE11} %{SOURCE12} \
+    ; do
         dir=`echo "$mod" | sed -e 's;^.*/\([^/]*\)\.tar\.gz$;\1;'`
         cd $dir
         chmod -R u+rw .
@@ -97,12 +156,31 @@ AutoReqProv:  no
         cd ..
     done
 
-    # clean up
+    #   build XML::LibXML
+    ( cd XML-LibXML-%{V_xml_libxml}
+      $perl Makefile.PL \
+          XMLPREFIX=%{l_prefix} \
+          PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl </dev/null
+      %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl all
+      %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl install
+    )
+
+    #   build XML::LibXSLT
+    ( cd XML-LibXSLT-%{V_xml_libxslt}
+      $perl Makefile.PL \
+          XMLPREFIX=%{l_prefix} \
+          PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl </dev/null
+      %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl all
+      %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl install
+    
+    )
+
+    #   clean up
     find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
     find $RPM_BUILD_ROOT%{l_prefix} -name .packlist -print | xargs rm -f
     find $RPM_BUILD_ROOT%{l_prefix} -type d -depth -print | (xargs rmdir >/dev/null 2>&1 || true)
 
-    # avoid conflicts
+    #   avoid conflicts
     eval `$perl -V:installarchlib -V:installprivlib -V:installsitearch -V:installsitelib`
     %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
         %{l_files_std} \