2eef050
Name:           perl-Test-MockTime
2eef050
Version:        0.09
2eef050
Release:        1%{?dist}
2eef050
Summary:        Replaces actual time with simulated time
2eef050
License:        GPL+ or Artistic
2eef050
Group:          Development/Libraries
2eef050
URL:            http://search.cpan.org/dist/Test-MockTime/
2eef050
Source0:        http://www.cpan.org/authors/id/D/DD/DDICK/Test-MockTime-%{version}.tar.gz
2eef050
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2eef050
BuildArch:      noarch
2eef050
BuildRequires:  perl(ExtUtils::MakeMaker)
2eef050
BuildRequires:  perl(Test::More)
2eef050
BuildRequires:  perl(Time::Piece) >= 1.08
2eef050
2eef050
# for improved tests
2eef050
BuildRequires:  perl(Test::Pod) >= 1.00
2eef050
2eef050
Requires:       perl(Time::Piece) >= 1.08
2eef050
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
2eef050
2eef050
%description
2eef050
This module was created to enable test suites to test code at specific
2eef050
points in time. Specifically it overrides localtime, gmtime and time at
2eef050
compile time and then relies on the user supplying a mock time via
2eef050
set_relative_time, set_absolute_time or set_fixed_time to alter future
2eef050
calls to gmtime,time or localtime.
2eef050
2eef050
%prep
2eef050
%setup -q -n Test-MockTime-%{version}
2eef050
2eef050
# fix up broken permissions
2eef050
chmod -x lib/Test/MockTime.pm t/test.t
2eef050
2eef050
%build
2eef050
%{__perl} Makefile.PL INSTALLDIRS=vendor
2eef050
make %{?_smp_mflags}
2eef050
2eef050
%install
2eef050
rm -rf $RPM_BUILD_ROOT
2eef050
2eef050
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
2eef050
2eef050
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
2eef050
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
2eef050
2eef050
%{_fixperms} $RPM_BUILD_ROOT/*
2eef050
2eef050
%check
2eef050
make test
2eef050
2eef050
%clean
2eef050
rm -rf $RPM_BUILD_ROOT
2eef050
2eef050
%files
2eef050
%defattr(-,root,root,-)
2eef050
%doc Changes
2eef050
%{perl_vendorlib}/*
2eef050
%{_mandir}/man3/*
2eef050
2eef050
%changelog
2eef050
* Mon Sep 22 2008 Ralf Cors├ępius <corsepiu@fedoraproject.org> 0.09-1
2eef050
- Cleanup spec file.
2eef050
- Specfile autogenerated by cpanspec 1.77.