]> git.pld-linux.org Git - SPECS.git/blob - perl-Test-Time.spec
SPECS updated Sun 1 Aug 20:28:02 CEST 2021
[SPECS.git] / perl-Test-Time.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # do not perform "make test"
4 #
5 %define         pdir    Test
6 %define         pnam    Time
7 Summary:        Test::Time - Overrides the time() and sleep() core functions for testing
8 Name:           perl-Test-Time
9 Version:        0.04
10 Release:        1
11 # same as perl
12 License:        GPL v1+ or Artistic
13 Group:          Development/Languages/Perl
14 Source0:        http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
15 # Source0-md5:  006c4b2134f33d8dc98ecf545d4f8508
16 URL:            http://search.cpan.org/dist/Test-Time/
17 BuildRequires:  perl-devel >= 1:5.8.0
18 BuildRequires:  rpm-perlprov >= 4.1-13
19 BuildArch:      noarch
20 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21
22 %description
23 Test::Time can be used to test modules that deal with time. Once you
24 use this module, all references to time and sleep will be
25 internalized. You can set custom time by passing time => number after
26 the use statement:
27
28 use Test::Time time => 1;
29
30 my $now = time; # $now is equal to 1 sleep 300; # returns immediately,
31 displaying a note my $then = time; # $then equals to 301
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 README
55 %{perl_vendorlib}/Test/*.pm
56 %{_mandir}/man3/*
This page took 0.447834 seconds and 3 git commands to generate.