automatic update OBS-URL: https://build.opensuse.org/request/show/347134 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Date-Manip?expand=0&rev=56
137 lines
4.3 KiB
RPMSpec
137 lines
4.3 KiB
RPMSpec
#
|
|
# spec file for package perl-Date-Manip
|
|
#
|
|
# Copyright (c) 2015 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-Date-Manip
|
|
Version: 6.52
|
|
Release: 0
|
|
%define cpan_name Date-Manip
|
|
Summary: Date manipulation routines
|
|
License: Artistic-1.0 or GPL-1.0+
|
|
Group: Development/Libraries/Perl
|
|
Url: http://search.cpan.org/dist/Date-Manip/
|
|
Source0: http://www.cpan.org/authors/id/S/SB/SBECK/%{cpan_name}-%{version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
BuildArch: noarch
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(Test::Inter)
|
|
%{perl_requires}
|
|
|
|
%description
|
|
Date::Manip is a series of modules designed to make any common date/time
|
|
operation easy to do. Operations such as comparing two times, determining a
|
|
date a given amount of time from another, or parsing international times
|
|
are all easily done. It deals with time as it is used in the Gregorian
|
|
calendar (the one currently in use) with full support for time changes due
|
|
to daylight saving time.
|
|
|
|
From the very beginning, the main focus of Date::Manip has been to be able
|
|
to do ANY desired date/time operation easily. Many other modules exist
|
|
which may do a subset of these operations quicker or more efficiently, but
|
|
no other module can do all of the operations available in Date::Manip.
|
|
|
|
Since many other date/time modules exist, some of which may do the specific
|
|
operation(s) you need faster, be sure to read Date::Manip::Misc/"SHOULD I
|
|
USE DATE::MANIP" before deciding which of the Date and Time modules from
|
|
CPAN is for you. However, if you want one module to do it all, Date::Manip
|
|
is the one to use.
|
|
|
|
Date::Manip has functionality to work with several fundamental types of
|
|
data.
|
|
|
|
* *dates*
|
|
|
|
The word date is used extensively here and is somewhat misleading. In
|
|
Date::Manip, a date consists of three pieces of information: a calendar
|
|
date, a time of day, and time zone information. Calendar dates and times
|
|
are fully handled. Time zones are handled as well, but depending on how you
|
|
use Date::Manip, there may be some limitations as discussed below.
|
|
|
|
* *delta*
|
|
|
|
A delta is an amount of time (i.e. the amount of time between two different
|
|
dates). A delta refers only to an amount of time. It includes no
|
|
information about a starting or ending date/time. Most people will think of
|
|
a delta as an amount of time, but the term 'time' is already used so much
|
|
in this module that I didn't want to use it here in order to avoid
|
|
confusion.
|
|
|
|
* *recurrence*
|
|
|
|
A recurring event is something which occurs on a regular recurring basis.
|
|
|
|
* *holidays* and *events*
|
|
|
|
Holidays and events are basically named dates or recurrences.
|
|
|
|
Among other things, Date::Manip allow you to:
|
|
|
|
* ***
|
|
|
|
Enter a date in practically any format you choose.
|
|
|
|
* ***
|
|
|
|
Compare two dates, entered in widely different formats to determine which
|
|
is earlier.
|
|
|
|
* ***
|
|
|
|
Extract any information you want from a date using a format string similar
|
|
to the Unix date command.
|
|
|
|
* ***
|
|
|
|
Determine the amount of time between two dates, or add an amount of time to
|
|
a date to get a second date.
|
|
|
|
* ***
|
|
|
|
Work with dates with dates using international formats (foreign month
|
|
names, 12/10/95 referring to October rather than December, etc.).
|
|
|
|
* ***
|
|
|
|
To find a list of dates where a recurring event happens.
|
|
|
|
Each of these tasks is trivial (one or two lines at most) with this
|
|
package.
|
|
|
|
%prep
|
|
%setup -q -n %{cpan_name}-%{version}
|
|
find . -type f -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 Changes examples LICENSE README README.first
|
|
|
|
%changelog
|