perl-XML-SAX-vl.spec 3.4 KB

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