perl-TimeDate/perl-TimeDate.spec
Christian Wittmer b1e80f5250 Accepting request 38382 from home:computersalat:devel:perl
Copy from home:computersalat:devel:perl/perl-TimeDate via accept of submit request 38382 revision 4.
Request was accepted with message:
self accept

OBS-URL: https://build.opensuse.org/request/show/38382
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-TimeDate?expand=0&rev=13
2010-04-20 22:15:11 +00:00

92 lines
2.7 KiB
RPMSpec

#
# 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
Url: http://search.cpan.org/dist/TimeDate
Source: %{cpan_name}-%{version}.tar.gz
Patch1: %{cpan_name}-deprecated_array_use.patch
Patch2: %{cpan_name}-podfile-patch
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
%if 0%{?suse_version} < 1120
BuildRequires: perl-macros
%endif
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 -p1
%patch2
# script-without-shebang
find -type f -exec chmod 0644 {} \;
%build
perl Makefile.PL OPTIMIZE="$RPM_OPT_FLAGS -Wall"
%{__make} %{?jobs:-j%jobs}
%check
%{__make} test
%install
%perl_make_install
# do not perl_process_packlist (noarch)
# remove .packlist file
%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
# remove perllocal.pod file
%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib
%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 SIGNATURE
%changelog