source: projects/specs/trunk/p/perl-Module-Implementation/perl-Module-Implementation-vl.spec @ 5844

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