# We don't really need ExtUtils::MakeMaker > 6.31 %global old_eumm %(%{__perl} -MExtUtils::MakeMaker -e 'printf "%d\\n", $ExtUtils::MakeMaker::VERSION < 6.31 ? 1 : 0;' 2>/dev/null || echo 0) # We need to patch the test suite if we have an old version of Test::More %global old_test_more %(%{__perl} -MTest::More -e 'printf "%d\\n", $Test::More::VERSION < 0.88 ? 1 : 0;' 2>/dev/null || echo 0) # Test::Kwalitee and Test::Requires not available in EPEL < 6 %global extra_tests_available %(expr 0%{?fedora} + 0%{?rhel} '>' 5) Name: perl-Package-DeprecationManager Version: 0.10 Release: 2%{?dist} Summary: Manage deprecation warnings for your distribution Group: Development/Libraries License: Artistic 2.0 URL: http://search.cpan.org/dist/Package-DeprecationManager/ Source0: http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Package-DeprecationManager-%{version}.tar.gz Patch0: Package-DeprecationManager-0.08-old-EU::MM.patch Patch1: Package-DeprecationManager-0.10-old-Test::More.patch Patch2: Package-DeprecationManager-0.10-no-Test::Requires.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: perl(Carp) BuildRequires: perl(List::MoreUtils) BuildRequires: perl(Params::Util) BuildRequires: perl(Sub::Install) BuildRequires: perl(Test::EOL) BuildRequires: perl(Test::Fatal) BuildRequires: perl(Test::More) BuildRequires: perl(Test::NoTabs) BuildRequires: perl(Test::Output) BuildRequires: perl(Test::Pod) BuildRequires: perl(Test::Pod::Coverage) # Pod::Coverage::TrustPod not yet in EPEL-4 %if 0%{?rhel} > 4 BuildRequires: perl(Pod::Coverage::TrustPod) %endif %if %{extra_tests_available} BuildRequires: perl(Test::Kwalitee) BuildRequires: perl(Test::Requires) %endif Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) %description This module allows you to manage a set of deprecations for one or more modules. When you import Package::DeprecationManager, you must provide a set of -deprecations as a hash ref. The keys are "feature" names, and the values are the version when that feature was deprecated. %prep %setup -q -n Package-DeprecationManager-%{version} # We don't really need ExtUtils::MakeMaker > 6.31 %if %{old_eumm} %patch0 -p1 %endif # Fix tests for Test::More prior to 0.88 %if %{old_test_more} %patch1 -p1 %endif # If we don't have Test::Requires, we need to patch it out of the test suite %if ! %{extra_tests_available} %patch2 -p1 %endif %build perl Makefile.PL INSTALLDIRS=vendor make %{?_smp_mflags} %install rm -rf %{buildroot} make pure_install DESTDIR=%{buildroot} find %{buildroot} -type f -name .packlist -exec rm -f {} \; find %{buildroot} -depth -type d -exec rmdir {} \; 2>/dev/null %{_fixperms} %{buildroot} %check make test RELEASE_TESTING=1 %clean rm -rf %{buildroot} %files %defattr(-,root,root,-) %doc Changes LICENSE README %{perl_vendorlib}/Package/ %{_mandir}/man3/Package::DeprecationManager.3pm* %changelog * Sat Jan 08 2011 Paul Howarth - 0.10-2 - Update patches for old Test::More and no Test::Requires - perl(Pod::Coverage::TrustPod) now available everywhere except EPEL-4 * Sat Jan 08 2011 Iain Arnell - 0.10-1 - Update to 0.10: - Test suite uses Test::Fatal instead of Test::Exception * Mon Oct 18 2010 Paul Howarth - 0.09-1 - Update to 0.09: - Added a compilation test * Fri Oct 15 2010 Paul Howarth - 0.08-1 - Update to 0.08: - The use of regular expressions in ignores didn't really work in 0.06 - Added missing deps on List::MoreUtils and Test::Requires - Replaced Test::Warn with Test::Output in the tests - Made the tests actually test what they should be testing - BR: Test::Output rather than Test::Warn - Update patches * Fri Oct 15 2010 Paul Howarth - 0.06-1 - Update to 0.06: - Removed hard dep on Test::Warn for the benefit of Moose - Fixed what looked like a bug in -ignore handling - The -ignore parameter now accepts regexes as well as package names - Update compatibility patches - BR: List::MoreUtils - BR: Test::Requires where possible, patch it out elsewhere * Tue Jul 27 2010 Paul Howarth - 0.04-2 - Clean up for Fedora submission * Mon Jul 26 2010 Paul Howarth - 0.04-1 - Initial RPM version