perl-XML-SAX-vl.spec 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255
  1. Summary: XML-SAX Perl module
  2. Name: perl-XML-SAX
  3. Version: 0.99
  4. Release: 1%{?_dist_release}
  5. Group: Development/Libraries
  6. License: GPL+ or Artistic
  7. URL: http://search.cpan.org/dist/XML-SAX/
  8. Source0: http://www.cpan.org/authors/id/G/GR/GRANTM/XML-SAX-%{version}.tar.gz
  9. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
  10. BuildArch: noarch
  11. BuildRequires: perl(ExtUtils::MakeMaker)
  12. BuildRequires: perl(XML::NamespaceSupport) >= 0.03
  13. # The following creates circular dependency, but they are not needed for build.
  14. #BuildRequires: perl(XML::LibXML) perl(XML::LibXML::Common)
  15. # XML::SAX::Base became independent package, BR just for test
  16. BuildRequires: perl(XML::SAX::Base)
  17. Requires: perl(:MODULE_COMPAT_%(perl -MConfig -e 'print $Config{version}'))
  18. Requires: perl(XML::LibXML) perl(XML::LibXML::Common)
  19. %description
  20. XML::SAX consists of several framework classes for using and building
  21. Perl SAX2 XML parsers, filters, and drivers. It is designed around the
  22. need to be able to "plug in" different SAX parsers to an application
  23. without requiring programmer intervention. Those of you familiar with
  24. the DBI will be right at home. Some of the designs come from the Java
  25. JAXP specification (SAX part), only without the javaness.
  26. %prep
  27. %setup -q -n XML-SAX-%{version}
  28. %if %{_dist_release} > "vl6"
  29. %{?perl_default_filter:
  30. %filter_from_provides /^perl(XML::SAX::PurePerl)$/d
  31. %filter_from_requires /^perl(XML::SAX::PurePerl::\(DTDDecls\|DocType\|EncodingDetect\|XMLDecl\|NoUnicodeExt\|UnicodeExt\|Reader::NoUnicodeExt\))/d
  32. %perl_default_filter}
  33. %global __provides_exclude %{?__requires_exclude:%__requires_exclude|}perl\\(XML::SAX::PurePerl\\)
  34. %global __requires_exclude %{?__provides_exclude:%__provides_exclude|}perl\\(XML::SAX::PurePerl::(DTDDecls|DocType|EncodingDetect|XMLDecl|NoUnicodeExt|UnicodeExt|Reader::NoUnicodeExt)\\)
  35. %{?perl_default_subpackage_tests}
  36. %else
  37. cat << \EOF > %{name}-prov
  38. #!/bin/sh
  39. %{__perl_provides} $* |\
  40. sed -e '/perl(XML::SAX::PurePerl)/d'
  41. EOF
  42. %global __perl_provides %{_builddir}/XML-SAX-%{version}/%{name}-prov
  43. chmod +x %{__perl_provides}
  44. cat << \EOF > %{name}-req
  45. #!/bin/sh
  46. %{__perl_requires} $* |\
  47. sed -e '/perl(XML::SAX::PurePerl::\(DTDDecls\|DocType\|EncodingDetect\|XMLDecl\|NoUnicodeExt\|UnicodeExt\|Reader::NoUnicodeExt\))/d'
  48. EOF
  49. %global __perl_requires %{_builddir}/XML-SAX-%{version}/%{name}-req
  50. chmod +x %{__perl_requires}
  51. %endif
  52. %build
  53. echo N | %{__perl} Makefile.PL INSTALLDIRS=vendor
  54. make %{?_smp_mflags}
  55. %install
  56. rm -rf %{buildroot}
  57. make pure_install PERL_INSTALL_ROOT=%{buildroot}
  58. find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
  59. find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null ';'
  60. chmod -R u+w %{buildroot}/*
  61. touch %{buildroot}%{perl_vendorlib}/XML/SAX/ParserDetails.ini
  62. %check
  63. make test
  64. %clean
  65. rm -rf %{buildroot}
  66. %post
  67. if [ ! -f "%{perl_vendorlib}/XML/SAX/ParserDetails.ini" ] ; then
  68. perl -MXML::SAX -e \
  69. 'XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()' 2>/dev/null || :
  70. else
  71. cp -p "%{perl_vendorlib}/XML/SAX/ParserDetails.ini" "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup"
  72. fi
  73. %triggerun -- perl-XML-LibXML < 1.58-8
  74. if [ -f "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup" ] ; then
  75. mv "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup" "%{perl_vendorlib}/XML/SAX/ParserDetails.ini"
  76. fi
  77. %preun
  78. # create backup of ParserDetails.ini, therefore user's configuration is used
  79. if [ $1 -eq 0 ] ; then
  80. perl -MXML::SAX -e \
  81. 'XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers()' || :
  82. fi
  83. [ -f "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup" ] && \
  84. rm -rf "%{perl_vendorlib}/XML/SAX/ParserDetails.ini.backup" || :
  85. %files
  86. %doc Changes LICENSE README
  87. %dir %{perl_vendorlib}/XML
  88. %{perl_vendorlib}/XML/SAX.pm
  89. %dir %{perl_vendorlib}/XML/SAX
  90. %{perl_vendorlib}/XML/SAX/*.pm
  91. %{perl_vendorlib}/XML/SAX/*.pod
  92. %{perl_vendorlib}/XML/SAX/PurePerl
  93. %{_mandir}/man3/XML::*.3pm*
  94. %ghost %{perl_vendorlib}/XML/SAX/ParserDetails.ini
  95. %changelog
  96. * Thu Mar 01 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.99-1
  97. - updated to 0.99
  98. - revamped spec in accordance with Fedora's 0.99-2
  99. - previous Vine changelogs as follows:
  100. - Sun Mar 27 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.16-3
  101. - drebuild with perl-5.12.3
  102. - using __perl_requires macro for VineSeed (vl6)
  103. - Sun Jun 1 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.16-2
  104. - added Requires(post,preun): perl-XML-LibXML
  105. - Sat May 31 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.16-1
  106. - new upstream release
  107. - built with perl-5.10.0-2
  108. - added SOURCE1, 2 for avoiding unwanted dependancies
  109. - Sun Jan 2 2005 IWAI, Masaharu <iwai@alib.jp> 0.12-0vl2
  110. - build on perl-5.8.6-0vl1
  111. - Sun Oct 17 2004 Satoshi MACHINO <machino@vinelinux.org> 0.12-0vl1
  112. - new upstream version
  113. - updated patch0 to perl-XML-SAX-0.12-makefile.patch
  114. - Mon Apr 15 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 0.10-0vl1
  115. - first build for Vine Linux
  116. * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99-2
  117. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  118. * Fri Oct 07 2011 Marcela Mašláňová <mmaslano@redhat.com> 0.99-1
  119. - update to 0.99
  120. * Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 0.96-15
  121. - Perl mass rebuild
  122. * Fri Jun 24 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-14
  123. - fix macros to work with new macros
  124. - clean spec
  125. * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96-13
  126. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  127. * Mon Jan 24 2011 Adrian Reber <adrian@lisas.de> - 0.96-12
  128. - rebuild for ppc
  129. * Thu Dec 23 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.96-11
  130. - 661697 rebuild for fixing problems with vendorach/lib
  131. * Fri May 07 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.96-10
  132. - Mass rebuild with perl-5.12.0
  133. * Fri Feb 5 2010 Stepan Kasal <skasal@redhat.com> - 0.96-9
  134. - anchor the filtering regexps
  135. * Fri Feb 5 2010 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-8
  136. - XML-LibXML use triggers for XML::SAX update. Deleting of settings in
  137. ParserDetails.ini is solved by post and preun part, which create backup.
  138. * Thu Nov 12 2009 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-7
  139. - instead of path into post used perl_vendorlib macro
  140. - rebuilt will be needed for perl-5.10.1
  141. * Thu Nov 12 2009 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-6
  142. - post scriptlet needs to check whether the file is installed. When it isn't,
  143. then it's needed call for adding PurePerl parser
  144. http://perl-xml.sourceforge.net/faq/#parserdetails.ini
  145. * Mon Oct 19 2009 Stepan Kasal <skasal@redhat.com> - 0.96-5
  146. - use the filtering macros
  147. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96-4
  148. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  149. * Tue Apr 28 2009 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-3
  150. - 478905 fix scriptlets
  151. * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96-2
  152. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  153. * Thu Dec 11 2008 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-1
  154. - update to 0.96, big leap in versioning
  155. * Sun Mar 2 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-5
  156. - Re-enable XML::LibXML BuildRequires
  157. * Wed Feb 27 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-4
  158. - Rebuild for perl 5.10 (again)
  159. * Mon Jan 28 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-3.1
  160. - temporarily disable BR against perl-XML-LibXML
  161. * Thu Jan 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-3
  162. - rebuild for new perl
  163. * Sat Jul 07 2007 Robin Norwood <rnorwood@redhat.com> - 0.16-2
  164. - Resolves: rhbz#247213
  165. - Fix provides and requires scripts.
  166. * Mon Jul 02 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.16-1
  167. - Update to 0.16.
  168. - Brings specfile closer to Fedora Perl template.
  169. - Corrects Source0 URL (upstream maintainer has changed).
  170. - Move Requires filter into spec, and add Provides filter.
  171. * Tue Feb 13 2007 Robin Norwood <rnorwood@redhat.com> - 0.15-1
  172. - New version: 0.15
  173. * Fri Jun 09 2006 Jason Vas Dias <jvdias@redhat.com> - 0.14-2
  174. - fix bug 194706: fails to build under (new!) mock
  175. * Mon Jun 05 2006 Jason Vas Dias <jvdias@redhat.com> - 0.14-1
  176. - upgrade to 0.14
  177. * Fri Feb 03 2006 Jason Vas Dias <jvdias@redhat.com> - 0.13-1.1
  178. - rebuild for new perl-5.8.8
  179. * Mon Dec 19 2005 Jason Vas Dias <jvdias@redhat.com> - 0.13-1
  180. - upgrade to 0.13
  181. * Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
  182. - rebuilt for new gcc
  183. * Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
  184. - rebuilt for new gcj
  185. * Sun Apr 18 2004 Ville Skyttä <ville.skytta at iki.fi> - 0.12-7
  186. - #121167
  187. - Handle ParserDetails.ini parser registration.
  188. - Require perl(:MODULE_COMPAT_*).
  189. - Own installed directories.
  190. * Wed Oct 22 2003 Chip Turner <cturner@redhat.com> - 0.12-1
  191. - Specfile autogenerated.