91 lines
3.1 KiB
RPMSpec
91 lines
3.1 KiB
RPMSpec
#
|
|
# spec file for package perl-DateTime-Set
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# 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 https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define cpan_name DateTime-Set
|
|
Name: perl-DateTime-Set
|
|
Version: 0.390.0
|
|
Release: 0
|
|
# 0.3900 -> normalize -> 0.390.0
|
|
%define cpan_version 0.3900
|
|
License: Artistic-1.0 OR GPL-1.0-or-later
|
|
Summary: DateTime set objects
|
|
URL: https://metacpan.org/release/%{cpan_name}
|
|
Source0: https://cpan.metacpan.org/authors/id/F/FG/FGLOCK/%{cpan_name}-%{cpan_version}.tar.gz
|
|
Source1: cpanspec.yml
|
|
Source100: README.md
|
|
BuildArch: noarch
|
|
BuildRequires: perl
|
|
BuildRequires: perl-macros
|
|
BuildRequires: perl(DateTime) >= 0.12
|
|
BuildRequires: perl(Module::Build)
|
|
BuildRequires: perl(Params::Validate)
|
|
BuildRequires: perl(Set::Infinite) >= 0.590
|
|
Requires: perl(DateTime) >= 0.12
|
|
Requires: perl(Params::Validate)
|
|
Requires: perl(Set::Infinite) >= 0.590
|
|
Provides: perl(DateTime::Set) = %{version}
|
|
Provides: perl(DateTime::Span)
|
|
Provides: perl(DateTime::SpanSet)
|
|
Provides: perl(Set::Infinite::_recurrence)
|
|
%undefine __perllib_provides
|
|
%{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
|
|
%autosetup -n %{cpan_name}-%{cpan_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
|
|
%doc Changes README TODO
|
|
%license LICENSE
|
|
|
|
%changelog
|