perl-Module-Implementation-vl.spec 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. # We need to patch the test suite if we have an old version of Test::More
  2. %global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION < 0.88) ? 1 : 0);' 2>/dev/null || echo 0)
  3. # Test::CPAN::Changes isn't available in EPEL < 7, due to requirement of perl(version) ≥ 0.79
  4. #TODO: BR: Test::Pod::No404s when available
  5. #TODO: BR: Test::Pod::LinkCheck when available
  6. Name: perl-Module-Implementation
  7. Version: 0.07
  8. Release: 1%{?_dist_release}
  9. Summary: Loads one of several alternate underlying implementations for a module
  10. Group: Development/Libraries
  11. License: Artistic 2.0
  12. URL: http://search.cpan.org/dist/perl-Module-Implementation/
  13. Source0: http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Module-Implementation-%{version}.tar.gz
  14. Patch1: Module-Implementation-0.05-old-Test::More.patch
  15. BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
  16. BuildArch: noarch
  17. # ===================================================================
  18. # Build requirements
  19. # ===================================================================
  20. BuildRequires: perl(ExtUtils::MakeMaker)
  21. # ===================================================================
  22. # Module requirements
  23. # ===================================================================
  24. BuildRequires: perl(Module::Runtime) >= 0.012
  25. # ===================================================================
  26. # Test suite requirements
  27. # ===================================================================
  28. BuildRequires: perl(Test::Fatal)
  29. BuildRequires: perl(Test::Requires)
  30. # ===================================================================
  31. # Runtime requirements
  32. # ===================================================================
  33. Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
  34. #Requires: perl(Carp)
  35. %description
  36. This module abstracts out the process of choosing one of several underlying
  37. implementations for a module. This can be used to provide XS and pure Perl
  38. implementations of a module, or it could be used to load an implementation
  39. for a given OS or any other case of needing to provide multiple
  40. implementations.
  41. This module is only useful when you know all the implementations ahead of
  42. time. If you want to load arbitrary implementations then you probably want
  43. something like a plugin system, not this module.
  44. %prep
  45. %setup -q -n Module-Implementation-%{version}
  46. # We have to patch the test suite if we have an old Test::More
  47. %if %{old_test_more}
  48. %patch1 -p1
  49. %endif
  50. %build
  51. perl Makefile.PL INSTALLDIRS=vendor
  52. make %{?_smp_mflags}
  53. %install
  54. rm -rf %{buildroot}
  55. make pure_install DESTDIR=%{buildroot}
  56. find %{buildroot} -type f -name .packlist -exec rm -f {} \;
  57. find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null
  58. %{_fixperms} %{buildroot}
  59. %check
  60. #make test RELEASE_TESTING=1
  61. make test
  62. %clean
  63. rm -rf %{buildroot}
  64. %files
  65. %defattr(-,root,root,-)
  66. %doc Changes LICENSE README
  67. %{perl_vendorlib}/Module/
  68. %{_mandir}/man3/Module::Implementation.3pm*
  69. %changelog
  70. * Mon Jun 30 2014 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> 0.07-1
  71. - new upstream release.
  72. * Mon Mar 05 2012 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 0.06-1
  73. - initial build for Vine Linux
  74. * Sun Feb 12 2012 Paul Howarth <paul@city-fan.org> - 0.06-1
  75. - Update to 0.06
  76. - Require Module::Runtime 0.012, which has a number of useful bug fixes
  77. * Fri Feb 10 2012 Paul Howarth <paul@city-fan.org> - 0.05-1
  78. - Update to 0.05
  79. - Make Test::Taint an optional dependency; it requires XS, and requiring a
  80. compiler for Module::Implementation defeats its purpose (CPAN RT#74817)
  81. - BR: perl(Test::Requires)
  82. - Update patch for building with old Test::More versions
  83. * Thu Feb 9 2012 Paul Howarth <paul@city-fan.org> - 0.04-1
  84. - Update to 0.04
  85. - This module no longer installs an _implementation() subroutine in callers;
  86. instead, you can call Module::Implementation::implementation_for($package)
  87. to get the implementation used for a given package
  88. - Update patch for building with old Test::More versions
  89. * Wed Feb 8 2012 Paul Howarth <paul@city-fan.org> - 0.03-3
  90. - Incorporate feedback from package review (#788258)
  91. - Correct License tag, which should be Artistic 2.0
  92. - BR: perl(lib) for test suite
  93. - Explicitly require perl(Carp), not automatically detected
  94. * Tue Feb 7 2012 Paul Howarth <paul@city-fan.org> - 0.03-2
  95. - Sanitize for Fedora submission
  96. * Tue Feb 7 2012 Paul Howarth <paul@city-fan.org> - 0.03-1
  97. - Initial RPM version