perl-TimeDate/perl-TimeDate.spec

82 lines
2.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package perl-TimeDate (Version 1.20)
#
# Copyright (c) 2010 SUSE LINUX Products 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/
#
# norootforbuild
Name: perl-TimeDate
%define cpan_name TimeDate
Summary: Parse date strings into time values
Version: 1.20
Release: 1
License: Artistic License ..
Group: Development/Libraries/Perl
AutoReqProv: on
Source: %{cpan_name}-%{version}.tar.gz
Patch1: %{cpan_name}-deprecated_array_use.patch
Patch2: %{cpan_name}-podfile-patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
Requires: perl = %{perl_version}
Provides: %{cpan_name}
%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.
Authors: Graham Barr <gbarr@pobox.com>
%prep
%setup -q -n %{cpan_name}-%{version}
%patch1
%patch2
%build
perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
%{__make} %{?jobs:-j%jobs}
%check
%{__make} test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%clean
%{__rm} -rf $RPM_BUILD_ROOT
%files -f %{name}.files
# normally you only need to check for doc files
%defattr(-,root,root)
%doc ChangeLog README
%changelog