Blob Blame History Raw
Name:           perl-Email-Date
Version:        1.103
Release:        4%{?dist}
Summary:        Find and format date headers
Group:          Development/Libraries
License:        GPL+ or Artistic
URL:            http://search.cpan.org/dist/Email-Date/
Source0:        http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Email-Date-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  perl(ExtUtils::MakeMaker), perl(Date::Parse), perl(Email::Abstract)
BuildRequires:  perl(Test::More), perl(Time::Local), perl(Time::Piece), perl(Module::Pluggable)
BuildRequires:  perl(Test::Pod), perl(Test::Pod::Coverage), perl(Email::Date::Format) >= 1.000
BuildArch:      noarch
Requires:  perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
# Bugzilla 468716
Requires:  perl(Email::Abstract)

%description
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
%setup -q -n Email-Date-%{version}

%build
sed -i '/LICENSE/ d' Makefile.PL
%{__perl} Makefile.PL INSTALLDIRS=vendor
make

%install
rm -rf $RPM_BUILD_ROOT
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
chmod -R u+w $RPM_BUILD_ROOT/*

%check
make test

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc README LICENSE
%{perl_vendorlib}/Email/
%{_mandir}/man3/*.3*

%changelog
* Tue Nov  4 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.103-4
- add Requires: perl(Email::Abstract) to fix bz 468716

* Sat Feb  2 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 1.103-3
- rebuild for new perl

* Thu Dec 20 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 1.103-2
- add BR: Module::Pluggable

* Wed Dec 19 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 1.103-1
- bump to 1.103

* Sun Aug 26 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 1.102-3
- fix license

* Tue Apr 24 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 1.102-2
- add missing BR: perl(Test::Pod), perl(Test::Pod::Coverage)
- get rid of WARNING: License

* Sun Apr  1 2007 Tom "spot" Callaway <tcallawa@redhat.com> - 1.102-1
- Initial package for Fedora