]>
Commit | Line | Data |
---|---|---|
d18604fe | 1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # do not perform "make test" | |
4 | # | |
d18604fe | 5 | %define pdir Test |
6 | %define pnam MockTime | |
7 | Summary: Test::MockTime - Replaces actual time with simulated time | |
8 | #Summary(pl.UTF-8): | |
9 | Name: perl-Test-MockTime | |
e681bc44 | 10 | Version: 0.12 |
d18604fe | 11 | Release: 1 |
12 | # same as perl | |
13 | License: GPL v1+ or Artistic | |
14 | Group: Development/Languages/Perl | |
15 | Source0: http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz | |
e681bc44 | 16 | # Source0-md5: de726192bcdd0cef68a07ffdf11d7300 |
d18604fe | 17 | URL: http://search.cpan.org/dist/Test-MockTime/ |
18 | BuildRequires: perl-devel >= 1:5.8.0 | |
19 | BuildRequires: rpm-perlprov >= 4.1-13 | |
20 | BuildArch: noarch | |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
22 | ||
23 | %description | |
24 | This module was created to enable test suites to test code at specific | |
25 | points in time. Specifically it overrides localtime, gmtime and time at | |
26 | compile time and then relies on the user supplying a mock time via | |
27 | set_relative_time, set_absolute_time or set_fixed_time to alter future | |
28 | calls to gmtime,time or localtime. | |
29 | ||
30 | # %description -l pl.UTF-8 | |
31 | # TODO | |
32 | ||
33 | %prep | |
34 | %setup -q -n %{pdir}-%{pnam}-%{version} | |
35 | ||
36 | %build | |
37 | %{__perl} Makefile.PL \ | |
38 | INSTALLDIRS=vendor | |
39 | %{__make} | |
40 | ||
41 | %{?with_tests:%{__make} test} | |
42 | ||
43 | %install | |
44 | rm -rf $RPM_BUILD_ROOT | |
45 | ||
46 | %{__make} pure_install \ | |
47 | DESTDIR=$RPM_BUILD_ROOT | |
48 | ||
49 | %clean | |
50 | rm -rf $RPM_BUILD_ROOT | |
51 | ||
52 | %files | |
53 | %defattr(644,root,root,755) | |
54 | %doc Changes | |
55 | %{perl_vendorlib}/Test/*.pm | |
56 | %{_mandir}/man3/* |