perl-XML-SAX-vl.spec 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. Summary: SAX(Simple API for XML) for Perl
  2. Name: perl-XML-SAX
  3. Version: 0.16
  4. Release: 3%{?_dist_release}
  5. License: distributable
  6. Group: Development/Libraries
  7. Source0: http://www.cpan.org/authors/id/M/MS/MSERGEANT/XML-SAX-%{version}.tar.gz
  8. Source1: filter-requires-XML-SAX.sh
  9. Source2: filter-provides-XML-SAX.sh
  10. URL: http://search.cpan.org/search?dist=XML-SAX
  11. BuildRoot: %{_tmppath}/%{name}-%{version}-root
  12. BuildArch: noarch
  13. BuildRequires: perl >= 5.8.2
  14. BuildRequires: perl-XML-NamespaceSupport
  15. Requires: perl >= 5.8.2
  16. Requires: perl-XML-NamespaceSupport
  17. #Requires(post): perl-XML-LibXML
  18. #Requires(preun): perl-XML-LibXML
  19. %if %{?_dist_release} == "vl5" || %{?_dist_release} == "vl4"
  20. # Filter unwanted Requires: perl-XML-SAX has some poorly-structured
  21. # packages that confuse RPM.
  22. %define __find_requires %{SOURCE1}
  23. # Filter unwanted Provides: perl-XML-SAX should not Provide an
  24. # unversioned perl(XML::SAX) along with the
  25. # versioned one
  26. %define __find_provides %{SOURCE2}
  27. %else
  28. %define __perl_requires %{SOURCE1}
  29. %endif
  30. %description
  31. XML::SAX consists of several framework classes for using and building
  32. Perl SAX2 XML parsers, filters, and drivers. It is designed around the
  33. need to be able to "plug in" different SAX parsers to an application
  34. without requiring programmer intervention. Those of you familiar with
  35. the DBI will be right at home. Some of the designs come from the Java
  36. JAXP specification (SAX part), only without the javaness.
  37. %prep
  38. %setup -q -n XML-SAX-%{version}
  39. %build
  40. %{__perl} Makefile.PL INSTALLDIRS=vendor <<_OPTION_
  41. N
  42. _OPTION_
  43. make OPTIMIZE="$RPM_OPT_FLAGS"
  44. %check
  45. make test
  46. %clean
  47. rm -rf $RPM_BUILD_ROOT
  48. %install
  49. rm -rf $RPM_BUILD_ROOT
  50. make pure_install DESTDIR=$RPM_BUILD_ROOT
  51. find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
  52. find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
  53. chmod -R u+w $RPM_BUILD_ROOT/*
  54. touch $RPM_BUILD_ROOT%{perl_vendorlib}/XML/SAX/ParserDetails.ini
  55. [ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
  56. #find $RPM_BUILD_ROOT%{_prefix} -type f -print |
  57. # sed "s@^$RPM_BUILD_ROOT@@g" |
  58. # grep -v ^%{_mandir} |
  59. # grep -v perllocal.pod |
  60. # grep -v "\.packlist" > %{name}.files
  61. #if [ "$(cat %{name}.files)X" = "X" ] ; then
  62. # echo "ERROR: EMPTY FILE LIST"
  63. # exit -1
  64. #fi
  65. %post
  66. perl -MXML::SAX -e \
  67. 'XML::SAX->add_parser(q(XML::SAX::PurePerl))->save_parsers()' 2>/dev/null
  68. %preun
  69. if [ $1 -eq 0 ]; then
  70. perl -MXML::SAX -e \
  71. 'XML::SAX->remove_parser(q(XML::SAX::PurePerl))->save_parsers()'
  72. fi
  73. %files
  74. %defattr(-,root,root)
  75. %doc README Changes LICENSE
  76. %dir %{perl_vendorlib}/XML
  77. %{perl_vendorlib}/XML/SAX.pm
  78. %dir %{perl_vendorlib}/XML/SAX
  79. %{perl_vendorlib}/XML/SAX/*.pm
  80. %{perl_vendorlib}/XML/SAX/*.pod
  81. %{perl_vendorlib}/XML/SAX/PurePerl
  82. %{_mandir}/man3/*3pm*
  83. %ghost %{perl_vendorlib}/XML/SAX/ParserDetails.ini
  84. %exclude %{perl_vendorlib}/XML/SAX/placeholder.pl
  85. %changelog
  86. * Sun Mar 27 2011 Yoji TOYODA <bsyamato@sea.plala.or.jp> 0.16-3
  87. - drebuild with perl-5.12.3
  88. - using __perl_requires macro for VineSeed (vl6)
  89. * Sun Jun 1 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.16-2
  90. - added Requires(post,preun): perl-XML-LibXML
  91. * Sat May 31 2008 Ryoichi INAGAKI <ryo1@bc.wakwak.com> 0.16-1
  92. - new upstream release
  93. - built with perl-5.10.0-2
  94. - added SOURCE1, 2 for avoiding unwanted dependancies
  95. * Sun Jan 2 2005 IWAI, Masaharu <iwai@alib.jp> 0.12-0vl2
  96. - build on perl-5.8.6-0vl1
  97. * Sun Oct 17 2004 Satoshi MACHINO <machino@vinelinux.org> 0.12-0vl1
  98. - new upstream version
  99. - updated patch0 to perl-XML-SAX-0.12-makefile.patch
  100. * Mon Apr 15 2002 IWAI Masaharu <iwaim@cc.mbn.or.jp> 0.10-0vl1
  101. - first build for Vine Linux