Files
perl-Email-Date/perl-Email-Date.spec
2025-08-12 18:13:49 +02:00

83 lines
2.7 KiB
RPMSpec

#
# spec file for package perl-Email-Date
#
# 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 Email-Date
Name: perl-Email-Date
Version: 1.104.0
Release: 0
# 1.104 -> normalize -> 1.104.0
%define cpan_version 1.104
License: Artistic-1.0 OR GPL-1.0-or-later
Summary: Find and Format Date Headers
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/R/RJ/RJBS/%{cpan_name}-%{cpan_version}.tar.gz
Source100: README.md
BuildArch: noarch
BuildRequires: perl
BuildRequires: perl-macros
BuildRequires: perl(Capture::Tiny)
BuildRequires: perl(Date::Parse) >= 2.27
BuildRequires: perl(Email::Abstract) >= 2.10
BuildRequires: perl(Email::Date::Format) >= 1.000
BuildRequires: perl(Test::More) >= 0.96
BuildRequires: perl(Time::Piece) >= 1.08
Requires: perl(Date::Parse) >= 2.27
Requires: perl(Email::Abstract) >= 2.10
Requires: perl(Email::Date::Format) >= 1.000
Requires: perl(Time::Piece) >= 1.08
Provides: perl(Email::Date) = %{version}
%undefine __perllib_provides
%{perl_requires}
%description
*Achtung!* Probably you'll be find just using Email::Date::Format to
produce dates or Date::Parse to parse dates. This module isn't much needed
anymore, but does provide 'find_date', described below.
RFC 2822 defines the 'Date:' header. It declares the header a required part
of an email message. The syntax for date headers is clearly laid out. Stil,
even a perfectly planned world has storms. The truth is, many programs get
it wrong. Very wrong. Or, they don't include a 'Date:' header at all. This
often forces you to look elsewhere for the date, and hoping to find
something.
For this reason, the tedious process of looking for a valid date has been
encapsulated in this software. Further, the process of creating RFC
compliant date strings is also found in this software.
%prep
%autosetup -n %{cpan_name}-%{cpan_version}
%build
perl Makefile.PL INSTALLDIRS=vendor
%make_build
%check
make test
%install
%perl_make_install
%perl_process_packlist
%perl_gen_filelist
%files -f %{name}.files
%doc Changes README
%license LICENSE
%changelog