Blob Blame History Raw
Name:           perl-MetaCPAN-API
Version:        0.43
Release:        1%{?dist}
Summary:        Comprehensive, DWIM-featured API to MetaCPAN
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/MetaCPAN-API/
Source0:        http://www.cpan.org/authors/id/X/XS/XSAWYERX/MetaCPAN-API-%{version}.tar.gz
BuildArch:      noarch
BuildRequires:  perl(Any::Moose)
BuildRequires:  perl(Carp)
BuildRequires:  perl(English)
BuildRequires:  perl(File::Find)
BuildRequires:  perl(File::Temp)
BuildRequires:  perl(HTTP::Tiny)
BuildRequires:  perl(JSON)
BuildRequires:  perl(Module::Build)
BuildRequires:  perl(Pod::Coverage::TrustPod)
BuildRequires:  perl(Test::Fatal)
BuildRequires:  perl(Test::More)
BuildRequires:  perl(Test::Perl::Critic)
BuildRequires:  perl(Test::Pod)
BuildRequires:  perl(Test::Pod::Coverage)
BuildRequires:  perl(Test::TinyMocker)
BuildRequires:  perl(Try::Tiny)
BuildRequires:  perl(URI::Escape)
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%{?perl_default_filter}

# skip tests that require network access in koji
# rpmbuild --with network-tests to re-enable
%bcond_with network_tests

%description
This is a hopefully-complete API-compliant interface to MetaCPAN
(https://metacpan.org) with DWIM capabilities, to make your life easier.

%prep
%setup -q -n MetaCPAN-API-%{version}

# remove tests that require network access in koji
%if !%{with network_tests}
rm -f t/author.t t/module.t t/pod.t t/release.t t/source.t
%endif

%build
%{__perl} Build.PL installdirs=vendor
./Build

%install
./Build install destdir=%{buildroot} create_packlist=0

%{_fixperms} %{buildroot}/*

%check
AUTHOR_TESTING=1 RELEASE_TESTING=1 ./Build test

%files
%doc Changes LICENSE README
%{perl_vendorlib}/*
%{_mandir}/man3/*

%changelog
* Thu Apr 19 2012 Iain Arnell <iarnell@gmail.com> 0.43-1
- update to latest upstream version
- enable author/release tests

* Sun Apr 01 2012 Iain Arnell <iarnell@gmail.com> 0.42-1
- Specfile autogenerated by cpanspec 1.79.
- skip tests that require network access in koji