[packages/perl-Test-Time] - initial

arekm arekm at pld-linux.org
Sun Jun 14 13:18:29 CEST 2015


commit 8c69cbebf9159421281096c7f2e98c1afbf9ff1a
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Sun Jun 14 13:18:15 2015 +0200

    - initial

 perl-Test-Time.spec | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
---
diff --git a/perl-Test-Time.spec b/perl-Test-Time.spec
new file mode 100644
index 0000000..012930f
--- /dev/null
+++ b/perl-Test-Time.spec
@@ -0,0 +1,57 @@
+#
+# Conditional build:
+%bcond_without	tests		# do not perform "make test"
+#
+%define		pdir	Test
+%define		pnam	Time
+%include	/usr/lib/rpm/macros.perl
+Summary:	Test::Time - Overrides the time() and sleep() core functions for testing
+Name:		perl-Test-Time
+Version:	0.04
+Release:	1
+# same as perl
+License:	GPL v1+ or Artistic
+Group:		Development/Languages/Perl
+Source0:	http://www.cpan.org/modules/by-module/Test/%{pdir}-%{pnam}-%{version}.tar.gz
+# Source0-md5:	006c4b2134f33d8dc98ecf545d4f8508
+URL:		http://search.cpan.org/dist/Test-Time/
+BuildRequires:	perl-devel >= 1:5.8.0
+BuildRequires:	rpm-perlprov >= 4.1-13
+BuildArch:	noarch
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Test::Time can be used to test modules that deal with time. Once you
+use this module, all references to time and sleep will be
+internalized. You can set custom time by passing time => number after
+the use statement:
+
+use Test::Time time => 1;
+
+my $now = time; # $now is equal to 1 sleep 300; # returns immediately,
+displaying a note my $then = time; # $then equals to 301
+
+%prep
+%setup -q -n %{pdir}-%{pnam}-%{version}
+
+%build
+%{__perl} Makefile.PL \
+	INSTALLDIRS=vendor
+%{__make}
+
+%{?with_tests:%{__make} test}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} pure_install \
+	DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc Changes README
+%{perl_vendorlib}/Test/*.pm
+%{_mandir}/man3/*
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/perl-Test-Time.git/commitdiff/8c69cbebf9159421281096c7f2e98c1afbf9ff1a



More information about the pld-cvs-commit mailing list