perl-xml.spec 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. ##
  2. ## perl-xml.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2002 Cable & Wireless Deutschland GmbH
  4. ## Copyright (c) 2000-2002 The OpenPKG Project <http://www.openpkg.org/>
  5. ## Copyright (c) 2000-2002 Ralf S. Engelschall <rse@engelschall.com>
  6. ##
  7. ## Permission to use, copy, modify, and distribute this software for
  8. ## any purpose with or without fee is hereby granted, provided that
  9. ## the above copyright notice and this permission notice appear in all
  10. ## copies.
  11. ##
  12. ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
  13. ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
  14. ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
  15. ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
  16. ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  17. ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  18. ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
  19. ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  20. ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  21. ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
  22. ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  23. ## SUCH DAMAGE.
  24. ##
  25. # versions of individual parts
  26. %define V_xml_parser 2.31
  27. %define V_xml_libxml 1.53
  28. %define V_xml_libxslt 1.52
  29. %define V_xml_simple 1.08
  30. %define V_xml_namespacesupport 1.08
  31. %define V_xml_sax 0.11
  32. %define V_xml_sax_base 1.02
  33. %define V_xml_xslt 0.40
  34. %define V_xml_twig 3.08
  35. %define V_xml_xpath 1.12
  36. %define V_xml_xpath_simple 0.05
  37. %define V_xml_easyobj 1.12
  38. %define V_xml_rss 0.97
  39. %define V_xml_xupdate_libxml 0.2.4
  40. %define V_html_tagset 3.03
  41. %define V_html_parser 3.26
  42. %define V_rpc_xml 0.45
  43. %define V_soap_lite 0.55
  44. %define V_soap_lite_smartproxy 0.11
  45. %define V_soap_payload 1.02
  46. # package options
  47. %ifndef with_libxml
  48. %define with_libxml %{l_test -p libxml}
  49. %endif
  50. %ifndef with_libxslt
  51. %define with_libxslt %{l_test -p libxslt}
  52. %endif
  53. %if "%{with_libxslt}" == "yes" && "%{with_libxml}" == "no"
  54. %define with_libxml yes
  55. %endif
  56. # package information
  57. Name: perl-xml
  58. Summary: Perl Modules for use with XML
  59. URL: http://www.cpan.org/
  60. Vendor: Perl Community
  61. Packager: The OpenPKG Project
  62. Distribution: OpenPKG [BASE]
  63. Group: Language
  64. License: GPL/Artistic
  65. Version: 20021030
  66. Release: 20021030
  67. # list of sources
  68. Source0: http://www.cpan.org/modules/by-module/XML/XML-Parser-%{V_xml_parser}.tar.gz
  69. Source1: http://www.cpan.org/modules/by-module/XML/XML-Simple-%{V_xml_simple}.tar.gz
  70. Source2: http://www.cpan.org/modules/by-module/XML/XML-NamespaceSupport-%{V_xml_namespacesupport}.tar.gz
  71. Source3: http://www.cpan.org/modules/by-module/XML/XML-SAX-%{V_xml_sax}.tar.gz
  72. Source4: http://www.cpan.org/modules/by-module/XML/XML-SAX-Base-%{V_xml_sax_base}.tar.gz
  73. Source5: http://www.cpan.org/modules/by-module/XML/XML-XSLT-%{V_xml_xslt}.tar.gz
  74. Source6: http://www.cpan.org/modules/by-module/XML/XML-Twig-%{V_xml_twig}.tar.gz
  75. Source7: http://www.cpan.org/modules/by-module/XML/XML-XPath-%{V_xml_xpath}.tar.gz
  76. Source8: http://www.cpan.org/modules/by-module/XML/XML-XPath-Simple-%{V_xml_xpath_simple}.tar.gz
  77. Source9: http://www.cpan.org/modules/by-module/XML/XML-EasyOBJ-%{V_xml_easyobj}.tar.gz
  78. Source10: http://www.cpan.org/modules/by-module/XML/XML-RSS-%{V_xml_rss}.tar.gz
  79. Source11: http://www.cpan.org/modules/by-module/XML/XML-XUpdate-LibXML-%{V_xml_xupdate_libxml}.tar.gz
  80. Source12: http://www.cpan.org/modules/by-module/HTML/HTML-Tagset-%{V_html_tagset}.tar.gz
  81. Source13: http://www.cpan.org/modules/by-module/HTML/HTML-Parser-%{V_html_parser}.tar.gz
  82. Source14: http://www.cpan.org/modules/by-module/SOAP/SOAP-Lite-%{V_soap_lite}.tar.gz
  83. Source15: http://www.cpan.org/modules/by-module/SOAP/SOAP-Lite-SmartProxy-%{V_soap_lite_smartproxy}.tar.gz
  84. Source16: http://www.cpan.org/modules/by-module/SOAP/SOAP-payload-%{V_soap_payload}.tar.gz
  85. Source17: http://www.cpan.org/modules/by-module/RPC/RPC-XML-%{V_rpc_xml}.tar.gz
  86. Source18: http://www.cpan.org/modules/by-module/XML/XML-LibXML-%{V_xml_libxml}.tar.gz
  87. Source19: http://www.cpan.org/modules/by-module/XML/XML-LibXSLT-%{V_xml_libxslt}.tar.gz
  88. # build information
  89. Prefix: %{l_prefix}
  90. BuildRoot: %{l_buildroot}
  91. BuildPreReq: OpenPKG, openpkg >= 20021002, perl, expat
  92. PreReq: OpenPKG, openpkg >= 20021002, perl
  93. %if "%{with_libxml}" == "yes"
  94. BuildPreReq: libxml
  95. %endif
  96. %if "%{with_libxslt}" == "yes"
  97. BuildPreReq: libxslt
  98. %endif
  99. AutoReq: no
  100. AutoReqProv: no
  101. %description
  102. Perl modules for use with XML:
  103. - XML::Parser (%{V_xml_parser})
  104. %if "%{with_libxml}" == "yes"
  105. - XML::LibXML (%{V_xml_libxml})
  106. - XML::XUpdate::LibXML (%{V_xml_xupdate_libxml})
  107. %endif
  108. %if "%{with_libxslt}" == "yes"
  109. - XML::LibXSLT (%{V_xml_libxslt})
  110. %endif
  111. - XML::Simple (%{V_xml_simple})
  112. - XML::NamespaceSupport (%{V_xml_namespacesupport})
  113. - XML::SAX (%{V_xml_sax})
  114. - XML::SAX::Base (%{V_xml_sax_base})
  115. - XML::XSLT (%{V_xml_xslt})
  116. - XML::Twig (%{V_xml_twig})
  117. - XML::XPath (%{V_xml_xpath})
  118. - XML::XPath::Simple (%{V_xml_xpath_simple})
  119. - XML::EasyOBJ (%{V_xml_easyobj})
  120. - XML::RSS (%{V_xml_rss})
  121. - HTML::Tagset (%{V_html_tagset})
  122. - HTML::Parser (%{V_html_parser})
  123. - RPC::XML (%{V_rpc_xml})
  124. - SOAP::Lite (%{V_soap_lite})
  125. - SOAP::Lite::SmartProxy (%{V_soap_lite_smartproxy})
  126. - SOAP::payload (%{V_soap_payload})
  127. %prep
  128. %setup0 -q -c -n %{name}-%{version}
  129. %setup1 -q -T -D -a 1
  130. %setup2 -q -T -D -a 2
  131. %setup3 -q -T -D -a 3
  132. %setup4 -q -T -D -a 4
  133. %setup5 -q -T -D -a 5
  134. %setup6 -q -T -D -a 6
  135. %setup7 -q -T -D -a 7
  136. %setup8 -q -T -D -a 8
  137. %setup9 -q -T -D -a 9
  138. %setup10 -q -T -D -a 10
  139. %setup11 -q -T -D -a 11
  140. %setup12 -q -T -D -a 12
  141. %setup13 -q -T -D -a 13
  142. %setup14 -q -T -D -a 14
  143. %setup15 -q -T -D -a 15
  144. %setup16 -q -T -D -a 16
  145. %setup17 -q -T -D -a 17
  146. %setup18 -q -T -D -a 18
  147. %setup19 -q -T -D -a 19
  148. %build
  149. %install
  150. rm -rf $RPM_BUILD_ROOT
  151. %{l_shtool} mkdir -f -p -m 755 $RPM_BUILD_ROOT%{l_prefix}/lib/perl5
  152. # create a wrapper script which finds the includes
  153. eval `%{l_prefix}/bin/perl -V:version -V:archname`
  154. perl=$RPM_BUILD_ROOT/perl
  155. echo "#!/bin/sh" >$perl
  156. echo "exec %{l_prefix}/bin/perl \\" >>$perl
  157. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version} \\" >>$perl
  158. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/${version}/${archname} \\" >>$perl
  159. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl \\" >>$perl
  160. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version} \\" >>$perl
  161. echo " -I$RPM_BUILD_ROOT%{l_prefix}/lib/perl5/site_perl/${version}/${archname} \\" >>$perl
  162. echo " \"\$@\"" >>$perl
  163. chmod a+x $perl
  164. # build XML::Parser
  165. ( cd XML-Parser-%{V_xml_parser}
  166. $perl Makefile.PL \
  167. EXPATLIBPATH=%{l_prefix}/lib EXPATINCPATH=%{l_prefix}/include \
  168. PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl </dev/null
  169. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl all
  170. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl install
  171. )
  172. # build standard modules
  173. for mod in \
  174. %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} \
  175. %{SOURCE7} %{SOURCE8} %{SOURCE9} %{SOURCE10} %{SOURCE11} %{SOURCE12} \
  176. %{SOURCE13} %{SOURCE14} %{SOURCE15} %{SOURCE16} %{SOURCE17} \
  177. ; do
  178. dir=`echo "$mod" | sed -e 's;^.*/\([^/]*\)\.tar\.gz$;\1;'`
  179. cd $dir
  180. chmod -R u+rw .
  181. cp Makefile.PL Makefile.PL.orig
  182. sed -e "s:\$^X:'$perl':g" <Makefile.PL.orig >Makefile.PL
  183. $perl Makefile.PL PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl </dev/null
  184. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl all
  185. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl install
  186. cd ..
  187. done
  188. %if "%{with_libxml}" == "yes"
  189. # build XML::LibXML
  190. ( cd XML-LibXML-%{V_xml_libxml}
  191. $perl Makefile.PL \
  192. XMLPREFIX=%{l_prefix} \
  193. PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl </dev/null
  194. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl all
  195. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl install
  196. )
  197. %endif
  198. %if "%{with_libxslt}" == "yes"
  199. # build XML::LibXSLT
  200. ( cd XML-LibXSLT-%{V_xml_libxslt}
  201. $perl Makefile.PL \
  202. XMLPREFIX=%{l_prefix} \
  203. PREFIX=$RPM_BUILD_ROOT%{l_prefix} PERL=$perl FULLPERL=$perl </dev/null
  204. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl all
  205. %{l_make} %{l_mflags} PERL=$perl FULLPERL=$perl install
  206. )
  207. %endif
  208. # clean up
  209. find $RPM_BUILD_ROOT%{l_prefix} -name perllocal.pod -print | xargs rm -f
  210. find $RPM_BUILD_ROOT%{l_prefix} -name .packlist -print | xargs rm -f
  211. find $RPM_BUILD_ROOT%{l_prefix} -type d -depth -print | (xargs rmdir >/dev/null 2>&1 || true)
  212. # avoid conflicts
  213. eval `$perl -V:installarchlib -V:installprivlib -V:installsitearch -V:installsitelib`
  214. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
  215. %{l_files_std} \
  216. '%not %dir %{l_prefix}/lib/perl5' \
  217. '%not %dir %{l_prefix}/lib/perl5/*' \
  218. "%not %dir $installarchlib" \
  219. "%not %dir $installprivlib" \
  220. "%not %dir $installsitearch" \
  221. "%not %dir $installsitelib" \
  222. "%not %dir $installarchlib/auto" \
  223. "%not %dir $installprivlib/auto" \
  224. "%not %dir $installsitearch/auto" \
  225. "%not %dir $installsitelib/auto"
  226. %files -f files
  227. %clean
  228. rm -rf $RPM_BUILD_ROOT