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