perl-xml.spec 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. ##
  2. ## perl-xml.spec -- OpenPKG RPM Specification
  3. ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
  4. ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
  5. ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.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_html_parser 3.35
  27. %define V_html_simpleparse 0.12
  28. %define V_html_table 1.20
  29. %define V_html_tagreader 1.06
  30. %define V_html_tagset 3.03
  31. %define V_html_tree 3.18
  32. %define V_xml_dom 1.43
  33. %define V_xml_dtdparser 1.7
  34. %define V_xml_easyobj 1.12
  35. %define V_xml_gdome 0.85
  36. %define V_xml_libxml 1.56
  37. %define V_xml_libxml_common 0.13
  38. %define V_xml_libxml_iterator 1.00
  39. %define V_xml_libxml_perl 0.07
  40. %define V_xml_libxml_xpathcontext 0.06
  41. %define V_xml_libxslt 1.53
  42. %define V_xml_namespacesupport 1.08
  43. %define V_xml_nodefilter 0.01
  44. %define V_xml_parser 2.34
  45. %define V_xml_quote 1.02
  46. %define V_xml_regexp 0.03
  47. %define V_xml_rss 1.02
  48. %define V_xml_sax 0.12
  49. %define V_xml_sax_base 1.02
  50. %define V_xml_sax_expat 0.37
  51. %define V_xml_simple 2.09
  52. %define V_xml_twig 3.12
  53. %define V_xml_writer 0.4
  54. %define V_xml_writer_string 0.1
  55. %define V_xml_xpath 1.13
  56. %define V_xml_xpath_simple 0.05
  57. %define V_xml_xsh 1.8.2
  58. %define V_xml_xslt 0.45
  59. %define V_xml_xupdate_libxml 0.5.0
  60. # package information
  61. Name: perl-xml
  62. Summary: Perl Modules for use with XML
  63. URL: http://www.cpan.org/
  64. Vendor: Perl Community
  65. Packager: The OpenPKG Project
  66. Distribution: OpenPKG [BASE]
  67. Group: Language
  68. License: GPL/Artistic
  69. Version: 20040201
  70. Release: 20040201
  71. # package options
  72. %option with_libxml no
  73. %option with_libxslt no
  74. %option with_libgdome no
  75. # package option dependencies
  76. %if "%{with_libxslt}" == "yes"
  77. %undefine with_libxml
  78. %define with_libxml yes
  79. %endif
  80. %if "%{with_libgdome}" == "yes"
  81. %undefine with_libxml
  82. %define with_libxml yes
  83. %endif
  84. # list of sources
  85. Source0: http://www.cpan.org/modules/by-module/XML/XML-Parser-%{V_xml_parser}.tar.gz
  86. Source1: http://www.cpan.org/modules/by-module/XML/XML-RegExp-%{V_xml_regexp}.tar.gz
  87. Source2: http://www.cpan.org/modules/by-module/XML/XML-Simple-%{V_xml_simple}.tar.gz
  88. Source3: http://www.cpan.org/modules/by-module/XML/XML-NamespaceSupport-%{V_xml_namespacesupport}.tar.gz
  89. Source4: http://www.cpan.org/modules/by-module/XML/XML-SAX-%{V_xml_sax}.tar.gz
  90. Source5: http://www.cpan.org/modules/by-module/XML/XML-SAX-Base-%{V_xml_sax_base}.tar.gz
  91. Source6: http://www.cpan.org/modules/by-module/XML/XML-SAX-Expat-%{V_xml_sax_expat}.tar.gz
  92. Source7: http://www.cpan.org/modules/by-module/XML/libxml-perl-%{V_xml_libxml_perl}.tar.gz
  93. Source8: http://www.cpan.org/modules/by-module/XML/XML-DOM-%{V_xml_dom}.tar.gz
  94. Source9: http://www.cpan.org/modules/by-module/XML/XML-XSLT-%{V_xml_xslt}.tar.gz
  95. Source10: http://www.cpan.org/modules/by-module/XML/XML-Twig-%{V_xml_twig}.tar.gz
  96. Source11: http://www.cpan.org/modules/by-module/XML/XML-XPath-%{V_xml_xpath}.tar.gz
  97. Source12: http://www.cpan.org/modules/by-module/XML/XML-XPath-Simple-%{V_xml_xpath_simple}.tar.gz
  98. Source13: http://www.cpan.org/modules/by-module/XML/XML-EasyOBJ-%{V_xml_easyobj}.tar.gz
  99. Source14: http://www.cpan.org/modules/by-module/XML/XML-RSS-%{V_xml_rss}.tar.gz
  100. Source15: http://www.cpan.org/modules/by-module/XML/XML-DTDParser-%{V_xml_dtdparser}.tar.gz
  101. Source16: http://www.cpan.org/modules/by-module/XML/XML-Quote-%{V_xml_quote}.tar.gz
  102. Source17: http://www.cpan.org/modules/by-module/XML/XML-Writer-%{V_xml_writer}.tar.gz
  103. Source18: http://www.cpan.org/modules/by-module/XML/XML-Writer-String-%{V_xml_writer_string}.tar.gz
  104. Source19: http://www.cpan.org/modules/by-module/XML/XML-NodeFilter-%{V_xml_nodefilter}.tar.gz
  105. Source20: http://www.cpan.org/modules/by-module/HTML/HTML-Tagset-%{V_html_tagset}.tar.gz
  106. Source21: http://www.cpan.org/modules/by-module/HTML/HTML-Parser-%{V_html_parser}.tar.gz
  107. Source22: http://www.cpan.org/modules/by-module/HTML/HTML-Tree-%{V_html_tree}.tar.gz
  108. Source23: http://www.cpan.org/modules/by-module/HTML/HTML-Table-%{V_html_table}.tar.gz
  109. Source24: http://www.cpan.org/modules/by-module/HTML/HTML-TagReader-%{V_html_tagreader}.tar.gz
  110. Source25: http://www.cpan.org/modules/by-module/HTML/HTML-SimpleParse-%{V_html_simpleparse}.tar.gz
  111. Source26: http://www.cpan.org/authors/by-module/XML/XML-LibXML-Common-%{V_xml_libxml_common}.tar.gz
  112. Source27: http://www.cpan.org/authors/by-module/XML/XML-LibXML-%{V_xml_libxml}.tar.gz
  113. Source28: http://www.cpan.org/modules/by-module/XML/XML-LibXML-Iterator-%{V_xml_libxml_iterator}.tar.gz
  114. Source29: http://www.cpan.org/modules/by-module/XML/XML-LibXML-XPathContext-%{V_xml_libxml_xpathcontext}.tar.gz
  115. Source30: http://www.cpan.org/modules/by-module/XML/XML-XUpdate-LibXML-%{V_xml_xupdate_libxml}.tar.gz
  116. Source31: http://www.cpan.org/modules/by-module/XML/XML-LibXSLT-%{V_xml_libxslt}.tar.gz
  117. Source32: http://osdn.dl.sourceforge.net/sourceforge/xsh/XML-XSH-%{V_xml_xsh}.tar.gz
  118. Source33: http://www.cpan.org/modules/by-module/XML/XML-GDOME-%{V_xml_gdome}.tar.gz
  119. # build information
  120. Prefix: %{l_prefix}
  121. BuildRoot: %{l_buildroot}
  122. BuildPreReq: OpenPKG, openpkg >= 20030103, perl, perl-openpkg >= 20040126, perl-util >= 20031202
  123. PreReq: OpenPKG, openpkg >= 20030103, perl, perl-openpkg >= 20040126, perl-util >= 20031202
  124. BuildPreReq: expat
  125. PreReq: expat
  126. %if "%{with_libxml}" == "yes"
  127. BuildPreReq: libxml, perl-parse
  128. PreReq: libxml, perl-parse
  129. %endif
  130. %if "%{with_libxslt}" == "yes"
  131. BuildPreReq: libxslt
  132. PreReq: libxslt
  133. %endif
  134. %if "%{with_libgdome}" == "yes"
  135. BuildPreReq: libgdome
  136. PreReq: libgdome
  137. %endif
  138. AutoReq: no
  139. AutoReqProv: no
  140. %description
  141. Perl modules for use with XML:
  142. - XML::Parser (%{V_xml_parser})
  143. - XML::NodeFilter (%{V_xml_nodefilter})
  144. %if "%{with_libxml}" == "yes"
  145. - XML::LibXML::Common (%{V_xml_libxml_common})
  146. - XML::LibXML (%{V_xml_libxml})
  147. - XML::LibXML::Iterator (%{V_xml_libxml_iterator})
  148. - XML::LibXML::XPathContext (%{V_xml_libxml_xpathcontext})
  149. - XML::XUpdate::LibXML (%{V_xml_xupdate_libxml})
  150. %endif
  151. %if "%{with_libxslt}" == "yes"
  152. - XML::LibXSLT (%{V_xml_libxslt})
  153. - XML::XSH (%{V_xml_xsh})
  154. %endif
  155. %if "%{with_libgdome}" == "yes"
  156. - XML::GDOME (%{V_xml_gdome})
  157. %endif
  158. - XML::RegExp (%{V_xml_regexp})
  159. - XML::DOM (%{V_xml_dom})
  160. - XML::Simple (%{V_xml_simple})
  161. - XML::NamespaceSupport (%{V_xml_namespacesupport})
  162. - XML::SAX (%{V_xml_sax})
  163. - XML::SAX::Base (%{V_xml_sax_base})
  164. - XML::SAX::Expat (%{V_xml_sax_expat})
  165. - XML::XSLT (%{V_xml_xslt})
  166. - XML::Twig (%{V_xml_twig})
  167. - XML::XPath (%{V_xml_xpath})
  168. - XML::XPath::Simple (%{V_xml_xpath_simple})
  169. - XML::EasyOBJ (%{V_xml_easyobj})
  170. - XML::RSS (%{V_xml_rss})
  171. - XML::DTDParser (%{V_xml_dtdparser})
  172. - XML::Quote (%{V_xml_quote})
  173. - XML::Writer (%{V_xml_writer})
  174. - XML::Writer::String (%{V_xml_writer_string})
  175. - HTML::Tagset (%{V_html_tagset})
  176. - HTML::Parser (%{V_html_parser})
  177. - HTML::Tree (%{V_html_tree})
  178. - HTML::Table (%{V_html_table})
  179. - HTML::TagReader (%{V_html_tagreader})
  180. - HTML::SimpleParse (%{V_html_simpleparse})
  181. %prep
  182. %setup0 -q -c
  183. %setup1 -q -T -D -a 1
  184. %setup2 -q -T -D -a 2
  185. %setup3 -q -T -D -a 3
  186. %setup4 -q -T -D -a 4
  187. %setup5 -q -T -D -a 5
  188. %setup6 -q -T -D -a 6
  189. %setup7 -q -T -D -a 7
  190. %setup8 -q -T -D -a 8
  191. %setup9 -q -T -D -a 9
  192. %setup10 -q -T -D -a 10
  193. %setup11 -q -T -D -a 11
  194. %setup12 -q -T -D -a 12
  195. %setup13 -q -T -D -a 13
  196. %setup14 -q -T -D -a 14
  197. %setup15 -q -T -D -a 15
  198. %setup16 -q -T -D -a 16
  199. %setup17 -q -T -D -a 17
  200. %setup18 -q -T -D -a 18
  201. %setup19 -q -T -D -a 19
  202. %setup20 -q -T -D -a 20
  203. %setup21 -q -T -D -a 21
  204. %setup22 -q -T -D -a 22
  205. %setup23 -q -T -D -a 23
  206. %setup24 -q -T -D -a 24
  207. %setup25 -q -T -D -a 25
  208. %setup26 -q -T -D -a 26
  209. %setup27 -q -T -D -a 27
  210. %setup28 -q -T -D -a 28
  211. %setup29 -q -T -D -a 29
  212. %setup30 -q -T -D -a 30
  213. %setup31 -q -T -D -a 31
  214. %setup32 -q -T -D -a 32
  215. %setup33 -q -T -D -a 33
  216. # FIXME: rse: required in XML-LibXML 1.56 for libxml 2.6.x
  217. %{l_shtool} subst \
  218. -e 's;LIBXML_DLL_IMPORT extern;LIBXML_DLL_IMPORT;g' \
  219. XML-LibXML-%{V_xml_libxml}/LibXML.xs
  220. %build
  221. %install
  222. %{l_prefix}/bin/perl-openpkg prepare
  223. %{l_prefix}/bin/perl-openpkg -d %{SOURCE0} \
  224. --args EXPATLIBPATH=%{l_prefix}/lib \
  225. --args EXPATINCPATH=%{l_prefix}/include \
  226. configure build install
  227. %{l_prefix}/bin/perl-openpkg -d %{SOURCE1} configure build install
  228. %{l_prefix}/bin/perl-openpkg -d %{SOURCE2} configure build install
  229. %{l_prefix}/bin/perl-openpkg -d %{SOURCE3} configure build install
  230. %{l_prefix}/bin/perl-openpkg -d %{SOURCE4} configure build install
  231. %{l_prefix}/bin/perl-openpkg -d %{SOURCE5} configure build install
  232. %{l_prefix}/bin/perl-openpkg -d %{SOURCE6} configure build install
  233. %{l_prefix}/bin/perl-openpkg -d %{SOURCE7} configure build install
  234. %{l_prefix}/bin/perl-openpkg -d %{SOURCE8} configure build install
  235. %{l_prefix}/bin/perl-openpkg -d %{SOURCE9} configure build install
  236. %{l_prefix}/bin/perl-openpkg -d %{SOURCE10} configure build install
  237. %{l_prefix}/bin/perl-openpkg -d %{SOURCE11} configure build install
  238. %{l_prefix}/bin/perl-openpkg -d %{SOURCE12} configure build install
  239. %{l_prefix}/bin/perl-openpkg -d %{SOURCE13} configure build install
  240. %{l_prefix}/bin/perl-openpkg -d %{SOURCE14} configure build install
  241. %{l_prefix}/bin/perl-openpkg -d %{SOURCE15} configure build install
  242. %{l_prefix}/bin/perl-openpkg -d %{SOURCE16} configure build install
  243. %{l_prefix}/bin/perl-openpkg -d %{SOURCE17} configure build install
  244. %{l_prefix}/bin/perl-openpkg -d %{SOURCE18} configure build install
  245. %{l_prefix}/bin/perl-openpkg -d %{SOURCE19} configure build install
  246. %{l_prefix}/bin/perl-openpkg -d %{SOURCE20} configure build install
  247. %{l_prefix}/bin/perl-openpkg -d %{SOURCE21} configure build install
  248. %{l_prefix}/bin/perl-openpkg -d %{SOURCE22} configure build install
  249. %{l_prefix}/bin/perl-openpkg -d %{SOURCE23} configure build install
  250. %{l_prefix}/bin/perl-openpkg -d %{SOURCE24} configure build install
  251. %{l_prefix}/bin/perl-openpkg -d %{SOURCE25} configure build install
  252. %if "%{with_libxml}" == "yes"
  253. %{l_prefix}/bin/perl-openpkg -d %{SOURCE26} --args XMLPREFIX=%{l_prefix} configure build install
  254. %{l_prefix}/bin/perl-openpkg -d %{SOURCE27} --args XMLPREFIX=%{l_prefix} configure build install
  255. %{l_prefix}/bin/perl-openpkg -d %{SOURCE28} configure build install
  256. %{l_prefix}/bin/perl-openpkg -d %{SOURCE29} configure build install
  257. %{l_prefix}/bin/perl-openpkg -d %{SOURCE30} --args XMLPREFIX=%{l_prefix} configure build install
  258. %endif
  259. %if "%{with_libxslt}" == "yes"
  260. %{l_prefix}/bin/perl-openpkg -d %{SOURCE31} --args XMLPREFIX=%{l_prefix} configure build install
  261. %{l_prefix}/bin/perl-openpkg -d %{SOURCE32} configure build install
  262. %endif
  263. %if "%{with_libgdome}" == "yes"
  264. %{l_prefix}/bin/perl-openpkg -d %{SOURCE33} configure build install
  265. %endif
  266. # pre-activate the XML::SAX parsers
  267. eval `%{l_prefix}/bin/perl -V:installvendorlib`
  268. ( echo "[XML::SAX::PurePerl]"
  269. echo "http://xml.org/sax/features/namespaces = 1"
  270. echo "http://xml.org/sax/features/validation = 0"
  271. echo ""
  272. echo "[XML::SAX::Expat]"
  273. echo "http://xml.org/sax/features/namespaces = 1"
  274. echo "http://xml.org/sax/features/validation = 0"
  275. ) >$RPM_BUILD_ROOT$installvendorlib/XML/SAX/ParserDetails.ini
  276. %{l_prefix}/bin/perl-openpkg -F perl-openpkg-files fixate cleanup
  277. %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} `cat perl-openpkg-files`
  278. %files -f files
  279. %clean
  280. rm -rf $RPM_BUILD_ROOT