Blob Blame History Raw
# 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.94 ? 1 : 0;' 2>/dev/null || echo 0)
%global older_test_more %(perl -MTest::More -e 'printf "%d\\n", $Test::More::VERSION < 0.88 ? 1 : 0;' 2>/dev/null || echo 0)
%global even_older_test_more %(perl -MTest::More -e 'printf "%d\\n", $Test::More::VERSION < 0.82 ? 1 : 0;' 2>/dev/null || echo 0)

# noarch, but to avoid debug* files interfering with manifest test:
%global debug_package %{nil}

Name:		perl-Pod-Wordlist-hanekomu
Version:	1.110090
Release:	3%{?dist}
Summary:	Add words for spell checking POD
Group:		Development/Libraries
License:	GPL+ or Artistic
URL:		http://search.cpan.org/dist/perl-Pod-Wordlist-hanekomu/
Source0:	http://search.cpan.org/CPAN/authors/id/M/MA/MARCEL/Pod-Wordlist-hanekomu-%{version}.tar.gz
Patch0:		Pod-Wordlist-hanekomu-1.110090-old-eu::mm.patch
Patch1:		Pod-Wordlist-hanekomu-1.110090-Test::More-version.patch
Patch2:		Pod-Wordlist-hanekomu-1.110090-Test::More-done_testing.patch
Patch3:		Pod-Wordlist-hanekomu-1.110090-Test::More-note.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch:	noarch
# ===================================================================
# Module requirements
# ===================================================================
BuildRequires:	aspell-en
BuildRequires:	perl(Carp)
BuildRequires:	perl(English)
BuildRequires:	perl(ExtUtils::MakeMaker)
BuildRequires:	perl(File::Find)
BuildRequires:	perl(File::Temp)
BuildRequires:	perl(Scalar::Util)
BuildRequires:	perl(Test::More)
BuildRequires:	perl(Test::Spelling)
BuildRequires:	perl(utf8)
# ===================================================================
# Author/Release test requirements
#
# Don't run these tests or include their requirements if we're
# bootstrapping, as many of these modules require each other for
# their author/release tests.
# ===================================================================
%if 0%{!?perl_bootstrap:1}
BuildRequires:	perl(Pod::Coverage::TrustPod)
BuildRequires:	perl(Test::HasVersion)
BuildRequires:	perl(Test::CheckChanges)
BuildRequires:	perl(Test::CPAN::Meta)
BuildRequires:	perl(Test::DistManifest)
BuildRequires:	perl(Test::EOL)
BuildRequires:	perl(Test::NoTabs)
BuildRequires:	perl(Test::Pod::Coverage)
BuildRequires:	perl(Test::Pod)
BuildRequires:	perl(Test::Portability::Files)
# Modules only available from EL-5
%if 0%{?fedora} || 0%{?rhel} > 4
BuildRequires:	perl(Test::Perl::Critic)
BuildRequires:	perl(Test::Synopsis)
%endif
# Modules only available from EL-6
%if 0%{?fedora} || 0%{?rhel} > 5
BuildRequires:	perl(Test::Kwalitee)
BuildRequires:	perl(Test::MinimumVersion)
BuildRequires:	perl(Test::Vars)
%endif
%endif
# ===================================================================
# Runtime requirements
# ===================================================================
Requires:	perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))

%description
This module, when loaded, adds stopwords for POD spell checking, that is,
words that should be ignored by the spell check.

%prep
%setup -q -n Pod-Wordlist-hanekomu-%{version}

# We don't really need ExtUtils::MakeMaker ≥ 6.31
%if %{old_eumm}
%patch0 -p1
%endif

# We have to patch the test suite if we have an old Test::More
#
# Don't really need Test::More ≥ 0.94
%if %{old_test_more}
%patch1 -p1
%endif
# done_testing requires Test::More ≥ 0.88
%if %{older_test_more}
%patch2 -p1
%endif
# note() requires Test::More ≥ 0.82
%if %{even_older_test_more}
%patch3 -p1
%endif

# MANIFEST.SKIP should include MYMETA.yml
echo MYMETA.yml >> MANIFEST.SKIP

%build
perl Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make pure_install PERL_INSTALL_ROOT=%{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 %{!?perl_bootstrap:AUTHOR_TESTING=1 RELEASE_TESTING=1}

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc Changes LICENSE README
%{perl_vendorlib}/Pod/
%{_mandir}/man3/Pod::Wordlist::hanekomu.3pm*

%changelog
* Tue Aug  9 2011 Paul Howarth <paul@city-fan.org> - 1.110090-3
- Sanitize for Fedora/EPEL submission

* Tue Aug  9 2011 Paul Howarth <paul@city-fan.org> - 1.110090-2
- BR: perl(Test::HasVersion) and perl(Test::Vars) for full release test
  coverage

* Sun Aug  7 2011 Paul Howarth <paul@city-fan.org> - 1.110090-1
- Initial RPM version