perl-XML-SAX-vl.spec 8.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. Summary: XML-SAX Perl module
  2. Name: perl-XML-SAX
  3. Version: 0.99
  4. Release: 2%{?_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-2
  97. - rebuild
  98. * Thu Mar 01 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.99-1
  99. - updated to 0.99
  100. - revamped spec in accordance with Fedora's 0.99-2
  101. - previous Vine changelogs as follows:
  102. - Sun Mar 27 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.16-3
  103. - drebuild with perl-5.12.3
  104. - using __perl_requires macro for VineSeed (vl6)
  105. - Sun Jun 1 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.16-2
  106. - added Requires(post,preun): perl-XML-LibXML
  107. - Sat May 31 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.16-1
  108. - new upstream release
  109. - built with perl-5.10.0-2
  110. - added SOURCE1, 2 for avoiding unwanted dependancies
  111. - Sun Jan 2 2005 IWAI, Masaharu <iwai@alib.jp> 0.12-0vl2
  112. - build on perl-5.8.6-0vl1
  113. - Sun Oct 17 2004 Satoshi MACHINO <machino@vinelinux.org> 0.12-0vl1
  114. - new upstream version
  115. - updated patch0 to perl-XML-SAX-0.12-makefile.patch
  116. - Mon Apr 15 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 0.10-0vl1
  117. - first build for Vine Linux
  118. * Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.99-2
  119. - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
  120. * Fri Oct 07 2011 Marcela Mašláňová <mmaslano@redhat.com> 0.99-1
  121. - update to 0.99
  122. * Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 0.96-15
  123. - Perl mass rebuild
  124. * Fri Jun 24 2011 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-14
  125. - fix macros to work with new macros
  126. - clean spec
  127. * Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96-13
  128. - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
  129. * Mon Jan 24 2011 Adrian Reber <adrian@lisas.de> - 0.96-12
  130. - rebuild for ppc
  131. * Thu Dec 23 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.96-11
  132. - 661697 rebuild for fixing problems with vendorach/lib
  133. * Fri May 07 2010 Marcela Maslanova <mmaslano@redhat.com> - 0.96-10
  134. - Mass rebuild with perl-5.12.0
  135. * Fri Feb 5 2010 Stepan Kasal <skasal@redhat.com> - 0.96-9
  136. - anchor the filtering regexps
  137. * Fri Feb 5 2010 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-8
  138. - XML-LibXML use triggers for XML::SAX update. Deleting of settings in
  139. ParserDetails.ini is solved by post and preun part, which create backup.
  140. * Thu Nov 12 2009 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-7
  141. - instead of path into post used perl_vendorlib macro
  142. - rebuilt will be needed for perl-5.10.1
  143. * Thu Nov 12 2009 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-6
  144. - post scriptlet needs to check whether the file is installed. When it isn't,
  145. then it's needed call for adding PurePerl parser
  146. http://perl-xml.sourceforge.net/faq/#parserdetails.ini
  147. * Mon Oct 19 2009 Stepan Kasal <skasal@redhat.com> - 0.96-5
  148. - use the filtering macros
  149. * Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96-4
  150. - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
  151. * Tue Apr 28 2009 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-3
  152. - 478905 fix scriptlets
  153. * Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.96-2
  154. - Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
  155. * Thu Dec 11 2008 Marcela Mašláňová <mmaslano@redhat.com> - 0.96-1
  156. - update to 0.96, big leap in versioning
  157. * Sun Mar 2 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-5
  158. - Re-enable XML::LibXML BuildRequires
  159. * Wed Feb 27 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-4
  160. - Rebuild for perl 5.10 (again)
  161. * Mon Jan 28 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-3.1
  162. - temporarily disable BR against perl-XML-LibXML
  163. * Thu Jan 24 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 0.16-3
  164. - rebuild for new perl
  165. * Sat Jul 07 2007 Robin Norwood <rnorwood@redhat.com> - 0.16-2
  166. - Resolves: rhbz#247213
  167. - Fix provides and requires scripts.
  168. * Mon Jul 02 2007 Jose Pedro Oliveira <jpo at di.uminho.pt> - 0.16-1
  169. - Update to 0.16.
  170. - Brings specfile closer to Fedora Perl template.
  171. - Corrects Source0 URL (upstream maintainer has changed).
  172. - Move Requires filter into spec, and add Provides filter.
  173. * Tue Feb 13 2007 Robin Norwood <rnorwood@redhat.com> - 0.15-1
  174. - New version: 0.15
  175. * Fri Jun 09 2006 Jason Vas Dias <jvdias@redhat.com> - 0.14-2
  176. - fix bug 194706: fails to build under (new!) mock
  177. * Mon Jun 05 2006 Jason Vas Dias <jvdias@redhat.com> - 0.14-1
  178. - upgrade to 0.14
  179. * Fri Feb 03 2006 Jason Vas Dias <jvdias@redhat.com> - 0.13-1.1
  180. - rebuild for new perl-5.8.8
  181. * Mon Dec 19 2005 Jason Vas Dias <jvdias@redhat.com> - 0.13-1
  182. - upgrade to 0.13
  183. * Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
  184. - rebuilt for new gcc
  185. * Fri Dec 16 2005 Jesse Keating <jkeating@redhat.com>
  186. - rebuilt for new gcj
  187. * Sun Apr 18 2004 Ville Skyttä <ville.skytta at iki.fi> - 0.12-7
  188. - #121167
  189. - Handle ParserDetails.ini parser registration.
  190. - Require perl(:MODULE_COMPAT_*).
  191. - Own installed directories.
  192. * Wed Oct 22 2003 Chip Turner <cturner@redhat.com> - 0.12-1
  193. - Specfile autogenerated.