Blob Blame History Raw
Name:           perl-Test-Mock-LWP
Version:        0.05
Release:        5%{?dist}
Summary:        Easy mocking of LWP packages
License:        GPL+ or Artistic
Group:          Development/Libraries
URL:            http://search.cpan.org/dist/Test-Mock-LWP/
Source0:        http://archive.cpan.cz//authors/id/L/LU/LUKEC/Test-Mock-LWP-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch:      noarch
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(Test::MockObject) >= 1.08
BuildRequires:  perl(Test::More) >= 0.42
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%define bogusprovs 'perl(HTTP::Request)\
perl(HTTP::Response)\
perl(LWP::UserAgent)'
%global provfilt sh -c "%{__perl_provides} | %{__grep} -Fv %{bogusprovs}"
%define __perl_provides %{provfilt}


%description
This package arises from duplicating the same code to mock LWP et al in
several different modules I've written. This version is very minimalist,
but works for my needs so far. I'm very open to new suggestions and
improvements.


%prep
%setup -q -n Test-Mock-LWP-%{version}


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


%install
rm -rf $RPM_BUILD_ROOT

make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT

find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;

%{_fixperms} $RPM_BUILD_ROOT/*


%check
make test


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc Changes README
%{perl_vendorlib}/*
%{_mandir}/man3/*


%changelog
* Fri Dec  4 2009 Stepan Kasal <skasal@redhat.com> - 0.05-5
- rebuild against perl 5.10.1

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.05-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri May 22 2009 Michael Schwendt <mschwendt@fedoraproject.org> - 0.05-3
- Filter out perl(..) Provides for HTTP::Request, HTTP::Response and
  LWP::UserAgent, which come from files not stored in Perl's search
  path for modules (#472354).

* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.05-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Jun 16 2008 Lubomir Rintel (Good Data) <lubo.rintel@gooddata.com> 0.05-1
- Specfile autogenerated by cpanspec 1.75.
- Fixed dependencies
- Fixed strings