Files
perl-DateTime-Set/perl-DateTime-Set.spec

85 lines
2.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package perl-DateTime-Set
#
# 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-Set
Version: 0.3700
Release: 0
%define cpan_name DateTime-Set
Summary: Datetime sets and set math
License: GPL-1.0+ or Artistic-1.0
Group: Development/Libraries/Perl
Url: http://search.cpan.org/dist/DateTime-Set/
Source0: http://www.cpan.org/authors/id/F/FG/FGLOCK/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(DateTime) >= 0.12
BuildRequires: perl(Module::Build)
BuildRequires: perl(Params::Validate)
BuildRequires: perl(Set::Infinite) >= 0.59
Requires: perl(DateTime) >= 0.12
Requires: perl(Params::Validate)
Requires: perl(Set::Infinite) >= 0.59
%{perl_requires}
%description
DateTime::Set is a module for datetime sets. It can be used to handle two
different types of sets.
The first is a fixed set of predefined datetime objects. For example, if we
wanted to create a set of datetimes containing the birthdays of people in
our family for the current year.
The second type of set that it can handle is one based on a recurrence,
such as "every Wednesday", or "noon on the 15th day of every month". This
type of set can have fixed starting and ending datetimes, but neither is
required. So our "every Wednesday set" could be "every Wednesday from the
beginning of time until the end of time", or "every Wednesday after
2003-03-05 until the end of time", or "every Wednesday between 2003-03-05
and 2004-01-07".
This module also supports set math operations, so you do things like create
a new set from the union or difference of two sets, check whether a
datetime is a member of a given set, etc.
This is different from a 'DateTime::Span', which handles a continuous range
as opposed to individual datetime points. There is also a module
'DateTime::SpanSet' to handle sets of spans.
%prep
%setup -q -n %{cpan_name}-%{version}
%build
%{__perl} Build.PL installdirs=vendor
./Build build flags=%{?_smp_mflags}
%check
./Build test
%install
./Build install destdir=%{buildroot} create_packlist=0
%perl_gen_filelist
%files -f %{name}.files
%defattr(-,root,root,755)
%doc Changes LICENSE README TODO
%changelog