perl-Module-Implementation-vl.spec 4.5 KB

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