File perl-DateTime-Precise.spec of Package perl-DateTime-Precise

#
# spec file for package perl-DateTime-Precise
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           perl-DateTime-Precise
Version:        1.05
Release:        0
%define cpan_name DateTime-Precise
Summary:        Perform common time and date operations with
License:        CHECK(GPL-1.0+ or Artistic-1.0)
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/DateTime-Precise/
Source0:        http://www.cpan.org/authors/id/B/BZ/BZAJAC/%{cpan_name}-%{version}.tar.gz
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
%{perl_requires}

%description
The purpose of this library was to replace our dependence on Unix epoch
time, which, being limited to a range of about 1970 to 2030, is inadequate
for our purposes (we have data as old as 1870). This date library
effectively handles dates from A.D. 1000 to infinity, and would probably
work all the way back to 0 (ignoring, of course, the switch-over to the
Gregorian calendar). The useful features of Unix epoch time (ease of date
difference calculation and date comparison, strict ordering) are preserved,
and elements such as human-legibility are added. The library handles
fractional seconds and some date/time manipulations used for the Global
Positioning Satellite system.

The operators +/-, <=>, cmp, stringify are overloaded. Addition handles
seconds and fractions of seconds, subtraction handles seconds or date
differences, compares work, and stringification returns the a
representation of the date.

The US Geological Survey (USGS) likes midnight to be 24:00:00 of the
previous day, not 00:00:00 of the day people expect. If
$DateTime::Precise::USGSMidnight is set, dprintf will always print midnight
as 24:00:00 and the date returned from dprintf will have the previous day's
date. Regardless, time is always stored internally as 00:00:00.

%prep
%setup -q -n %{cpan_name}-%{version}

%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
%{__make} %{?_smp_mflags}

%check
%{__make} test

%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist

%files -f %{name}.files
%defattr(-,root,root,755)
%doc CHANGES README

%changelog
openSUSE Build Service is sponsored by