perl-ExtUtils-Helpers/perl-ExtUtils-Helpers.spec
Paul Howarth efc3342f5e Initial import (perl-ExtUtils-Helpers-0.014-2)
This module provides various portable helper functions for module building
modules.
2013-04-08 16:40:17 +01:00

93 lines
2.6 KiB
RPMSpec

# We don't really need Text::ParseWords ≥ 3.24
%global old_tpw %(perl -MText::ParseWords -e 'print (($Text::ParseWords::VERSION) < 3.24 ? 1 : 0);' 2>/dev/null || echo 0)
# Test suite needs patching if we have Test::More < 0.88
%global old_test_more %(perl -MTest::More -e 'print (($Test::More::VERSION) < 0.88 ? 1 : 0);' 2>/dev/null || echo 0)
Name: perl-ExtUtils-Helpers
Version: 0.014
Release: 2%{?dist}
Summary: Various portability utilities for module builders
Group: Development/Libraries
License: GPL+ or Artistic
URL: https://metacpan.org/release/ExtUtils-Helpers
Source0: http://cpan.metacpan.org/authors/id/L/LE/LEONT/ExtUtils-Helpers-%{version}.tar.gz
Patch1: ExtUtils-Helpers-0.014-pod.patch
Patch2: ExtUtils-Helpers-0.014-old-Text::ParseWords.patch
Patch3: ExtUtils-Helpers-0.014-old-Test::More.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
# Build
BuildRequires: perl(ExtUtils::MakeMaker)
# Module
BuildRequires: perl(Config)
BuildRequires: perl(Exporter) >= 5.57
BuildRequires: perl(File::Basename)
BuildRequires: perl(File::Copy)
BuildRequires: perl(File::Spec::Functions)
BuildRequires: perl(Pod::Man)
BuildRequires: perl(Text::ParseWords) >= 3.22
# Test Suite
BuildRequires: perl(Cwd)
BuildRequires: perl(File::Find)
BuildRequires: perl(File::Temp)
BuildRequires: perl(Test::More)
# Release Tests
BuildRequires: perl(Pod::Coverage::TrustPod)
BuildRequires: perl(Test::Kwalitee)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Pod::Coverage)
# Runtime
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
%description
This module provides various portable helper functions for module building
modules.
%prep
%setup -q -n ExtUtils-Helpers-%{version}
# Specify POD encoding
%patch1
# We don't really need Text::ParseWords ≥ 3.24
%if %{old_tpw}
%patch2
%endif
# Test suite needs patching if we have Test::More < 0.88
%if %{old_test_more}
%patch3
%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 {} ';'
%{_fixperms} %{buildroot}
%check
make test AUTHOR_TESTING=1 RELEASE_TESTING=1
%clean
rm -rf %{buildroot}
%files
%doc Changes LICENSE README
%{perl_vendorlib}/ExtUtils/
%{_mandir}/man3/ExtUtils::Helpers.3pm*
%{_mandir}/man3/ExtUtils::Helpers::Unix.3pm*
%{_mandir}/man3/ExtUtils::Helpers::VMS.3pm*
%{_mandir}/man3/ExtUtils::Helpers::Windows.3pm*
%changelog
* Mon Apr 1 2013 Paul Howarth <paul@city-fan.org> - 0.014-2
- Sanitize for Fedora submission
* Sun Mar 31 2013 Paul Howarth <paul@city-fan.org> - 0.014-1
- Initial RPM version