Group :: Development/Other
RPM: perl-Test-MockTime
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Group: Development/Other
# BEGIN SourceDeps(oneline):
BuildRequires(pre): rpm-build-perl
BuildRequires: perl-podlators
# END SourceDeps(oneline)
# see https://bugzilla.altlinux.org/show_bug.cgi?id=10382
%define _localstatedir %{_var}
Name: perl-Test-MockTime
Version: 0.17
Release: alt1_2
Summary: Replaces actual time with simulated time
License: GPL+ or Artistic
URL: https://metacpan.org/release/Test-MockTime
Source0: https://cpan.metacpan.org/authors/id/D/DD/DDICK/Test-MockTime-%{version}.tar.gz
BuildArch: noarch
BuildRequires: %{__perl}
BuildRequires: rpm-build-perl
BuildRequires: perl(ExtUtils/MakeMaker.pm)
BuildRequires: perl(Test/More.pm)
BuildRequires: perl(Time/Local.pm)
BuildRequires: perl(Time/Piece.pm)
BuildRequires: perl(Carp.pm)
BuildRequires: perl(Exporter.pm)
BuildRequires: perl(strict.pm)
BuildRequires: perl(warnings.pm)
# for improved tests
BuildRequires: perl(Test/Pod.pm)
Requires: perl(Time/Piece.pm) >= 1.080
Source44: import.info
%description
This module was created to enable test suites to test code at specific
points in time. Specifically it overrides localtime, gmtime and time at
compile time and then relies on the user supplying a mock time via
set_relative_time, set_absolute_time or set_fixed_time to alter future
calls to gmtime,time or localtime.
%prep
%setup -q -n Test-MockTime-%{version}
# fix up broken permissions
chmod -x lib/Test/MockTime.pm t/test.t
%build
/usr/bin/perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
make %{?_smp_mflags}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
# %{_fixperms} $RPM_BUILD_ROOT/*
%check
%{__make} test
%files
%doc Changes
%{perl_vendor_privlib}/*
%changelog
…
Full changelog you can see here
# BEGIN SourceDeps(oneline):
BuildRequires(pre): rpm-build-perl
BuildRequires: perl-podlators
# END SourceDeps(oneline)
# see https://bugzilla.altlinux.org/show_bug.cgi?id=10382
%define _localstatedir %{_var}
Name: perl-Test-MockTime
Version: 0.17
Release: alt1_2
Summary: Replaces actual time with simulated time
License: GPL+ or Artistic
URL: https://metacpan.org/release/Test-MockTime
Source0: https://cpan.metacpan.org/authors/id/D/DD/DDICK/Test-MockTime-%{version}.tar.gz
BuildArch: noarch
BuildRequires: %{__perl}
BuildRequires: rpm-build-perl
BuildRequires: perl(ExtUtils/MakeMaker.pm)
BuildRequires: perl(Test/More.pm)
BuildRequires: perl(Time/Local.pm)
BuildRequires: perl(Time/Piece.pm)
BuildRequires: perl(Carp.pm)
BuildRequires: perl(Exporter.pm)
BuildRequires: perl(strict.pm)
BuildRequires: perl(warnings.pm)
# for improved tests
BuildRequires: perl(Test/Pod.pm)
Requires: perl(Time/Piece.pm) >= 1.080
Source44: import.info
%description
This module was created to enable test suites to test code at specific
points in time. Specifically it overrides localtime, gmtime and time at
compile time and then relies on the user supplying a mock time via
set_relative_time, set_absolute_time or set_fixed_time to alter future
calls to gmtime,time or localtime.
%prep
%setup -q -n Test-MockTime-%{version}
# fix up broken permissions
chmod -x lib/Test/MockTime.pm t/test.t
%build
/usr/bin/perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1
make %{?_smp_mflags}
%install
make pure_install DESTDIR=$RPM_BUILD_ROOT
# %{_fixperms} $RPM_BUILD_ROOT/*
%check
%{__make} test
%files
%doc Changes
%{perl_vendor_privlib}/*
%changelog
…
Full changelog you can see here