#
# spec file for package perl-TimeDate
#
# Copyright (c) 2017 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-TimeDate
Version:        2.30
Release:        42.1
%define cpan_name TimeDate
Summary:        TimeDate Perl module
License:        Artistic-1.0 or GPL-1.0+
Group:          Development/Libraries/Perl
Url:            http://search.cpan.org/dist/TimeDate/
Source0:        https://cpan.metacpan.org/authors/id/G/GB/GBARR/%{cpan_name}-%{version}.tar.gz
Source1:        cpanspec.yml
BuildArch:      noarch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  perl
BuildRequires:  perl-macros
%{perl_requires}

%description
Date::Parse provides two routines for parsing date strings into time values.

str2time(DATE [, ZONE])

   str2time parses DATE and returns a unix time value, or undef upon failure.
    ZONE, if given, specifies the timezone to assume when parsing if the date
    string does not specify a timezome.

strptime(DATE [, ZONE])

   strptime takes the same arguments as str2time but returns an array of values
    ($ss,$mm,$hh,$day,$month,$year,$zone). Elements are only defined if they
    could be extracted from the date string. The $zone element is the timezone
    offset in seconds from GMT. An empty array is returned upon failure.

%prep
%setup -q -n %{cpan_name}-%{version}
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644

%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 ChangeLog README

%changelog
* Sat May  2 2015 coolo@suse.com
- updated to 2.30
  see /usr/share/doc/packages/perl-TimeDate/ChangeLog
  2.30 -- Mon Feb 18 13:31:03 CST 2013
  * Syncing distribution version number with Date::Parse, not functional changes
- remove TimeDate-deprecated_array_use.patch and TimeDate-podfile-patch
  and regenerat with cpanspec
* Tue Aug 30 2011 andrea.turrini@gmail.com
- standardized "Authors:" format in description of perl-TimeDate.spec
* Tue Mar 15 2011 cfarrell@novell.com
- license update: GPL+ or Artistic
  License is the same as Perl which expands to GPL+ or Artistic. See README, Format.pm, Parse.pm
* Wed Feb  2 2011 vcizek@novell.com
- bzipped source tarball
* Tue Nov 30 2010 coolo@novell.com
- switch to perl_requires macro
* Tue Apr 20 2010 chris@computersalat.de
- fix build
  o reworked TimeDate-deprecated_array_use.patch (was for timegm)
    removed obsolete part (timegm was replaced by timelocal)
- cleanup spec
  o add missing Url
- fix deps for perl-macros
- removed .packlist, perllocal.pod files
  > noarch package
- rpmlint
  o script-without-shebang > 644
* Mon Apr 19 2010 dmueller@suse.de
- update to 1.20:
  * Typo => s/timezome/timezone/ [yanick]
  * RT#52387 Fix %%s formating to use timelocal when no timezone is given
  * RT#51664 fix str2time('16 Oct 09') to not give a negative result
* Fri Sep 25 2009 larry+opensuse@l2g.to
- New upstream version 1.19
  * Add support for dates like Jul-13-1999 (Brett Warden)
  * Added Icelandic language (Tomas Edwardsson)
  * Added Romanian language (Doru Petrescu)
  * Added Russian language (Denis Poznyakov & Danil Pismenny)
  * Added Turkish language (Burak Gursoy)
  * Added Spanish language (Adrian Mugnolo)
  * Added Chinese language (Kang-min Liu)
  * Support parsing dates like 2002-02-26-10:37:21.141 as used by lpd
  * Support Z timezone when only the time is specified
  * Added METDST to Time::Zone
  * Added AKST/AKDT to Time::Zone
* Fri Jul 31 2009 lrupp@suse.de
- fix podfile
* Sat Jul 25 2009 chris@computersalat.de
- spec mods
  * removed ^----------
  * removed ^#---------
* Tue Jun 23 2009 chris@computersalat.de
- added perl-macros
- fixed summary, description
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Sun Jan 11 2004 adrian@suse.de
- build as user
* Fri Aug 22 2003 mjancar@suse.cz
- require the perl version we build with
* Mon Jul 21 2003 rommel@suse.de
- update to version 1.16
- using perl_vendorlib and perl_vendorarch instead of
  perl_sitearch and perl_archlib
* Wed Jun 18 2003 coolo@suse.de
- package directories
* Sun May 25 2003 ro@suse.de
- remove unpackaged files from buildroot
* Thu Jan 16 2003 rommel@suse.de
- update to version 1.14
- fixed depricated array use in timegm()
* Thu Aug  8 2002 mls@suse.de
- use sitearch macro
* Tue Jul  2 2002 mls@suse.de
- remove race in .packlist generation
* Tue Nov  7 2000 grimmer@suse.de
- added .packlist to file list and removed BuildRoot path
* Tue Nov  7 2000 grimmer@suse.de
- removed BuildRoot path from perllocal.pod
* Mon Nov  6 2000 grimmer@suse.de
- initial version (1.10)