Summary: Search mailboxes for a particular email
Name: grepmail
Version: 5.3034
Release: 15%{?dist}
License: GPL+
Group: Applications/Text
Url: http://search.cpan.org/dist/grepmail/
Source0: http://search.cpan.org/CPAN/authors/id/D/DC/DCOPPIT/grepmail-%{version}.tar.gz
Patch0: grepmail-5.3034-revert-recursive-test-change.patch
Patch1: grepmail-5.3034-empty-file-not-error.patch
Patch2: grepmail-5.3034-date-manip-6.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(id -nu)
BuildArch: noarch
BuildRequires: perl(Carp)
BuildRequires: perl(Date::Manip)
BuildRequires: perl(Date::Parse)
BuildRequires: perl(Digest::MD5)
BuildRequires: perl(ExtUtils::MakeMaker)
BuildRequires: perl(Mail::Mbox::MessageParser) >= 1.4001
BuildRequires: perl(Test::More)
# AutoInstall.pm should have been bundled but wasn't
# http://code.google.com/p/grepmail/issues/detail?id=1
BuildRequires: perl(Module::AutoInstall)
Requires: perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
Requires: perl(Mail::Mbox::MessageParser) >= 1.4001
# The following module requirements are optional and hence not picked up by RPM automatically.
# Adding manual deps for them improves grepmail's functionality.
Requires: perl(Date::Manip)
Requires: perl(Date::Parse)
Requires: perl(Digest::MD5)
# perl(Date::Parse) can be found in the perl-TimeDate package
%description
Grepmail searches a normal or compressed mailbox for a given regular
expression, and returns those emails that match it. Piped input is allowed,
and date and size restrictions are supported, as are searches using logical
operators.
%prep
%setup -q -n %{name}-%{version}
# Revert recursive test change in 5.3034 that breaks test suite
# http://code.google.com/p/grepmail/issues/detail?id=2
%patch0 -p1
# Empty files are not treated as errors by Mail::Mbox::MessageParser >= 1.5002
# http://code.google.com/p/grepmail/issues/detail?id=2
%patch1 -p1
# Fix incompatibilities with Date::Manip 6.x
# http://rt.cpan.org/Public/Bug/Display.html?id=54621
%patch2 -p1
%build
perl Makefile.PL INSTALLDIRS=vendor --default
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make pure_install PERL_INSTALL_ROOT=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} ';'
find %{buildroot} -depth -type d -exec rmdir {} ';' 2>/dev/null
chmod -R u+w %{buildroot}
%check
export LANG=C
export TZ=GMT0
make test
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%doc README* CHANGES LICENSE TODO
%{_bindir}/grepmail
%{_mandir}/man1/grepmail.1*
%changelog
* Thu Aug 28 2014 Jitka Plesnikova <jplesnik@redhat.com> - 5.3034-15
- Perl 5.20 rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.3034-14
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.3034-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Aug 02 2013 Petr Pisar <ppisar@redhat.com> - 5.3034-12
- Perl 5.18 rebuild
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.3034-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.3034-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Fri Jun 22 2012 Petr Pisar <ppisar@redhat.com> - 5.3034-9
- Perl 5.16 rebuild
* Sat Jan 7 2012 Paul Howarth <paul@city-fan.org> 5.3034-8
- Fedora 17 Mass Rebuild
* Sat Oct 8 2011 Paul Howarth <paul@city-fan.org> 5.3034-7
- BR/R: perl(Digest::MD5) for improved memory usage
- BR: perl(Carp)
- Nobody else likes macros for commands
* Tue Jul 19 2011 Petr Sabata <contyk@redhat.com> 5.3034-6
- Perl mass rebuild
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 5.3034-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Tue Jun 01 2010 Marcela Maslanova <mmaslano@redhat.com> 5.3034-4
- Mass rebuild with perl-5.12.0
* Mon Feb 15 2010 Paul Howarth <paul@city-fan.org> 5.3034-3
- Fix incompatibilities with Date::Manip 6.x (#564839, CPAN RT#54621)
* Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> 5.3034-2
- Rebuild against perl 5.10.1
* Wed Sep 2 2009 Paul Howarth <paul@city-fan.org> 5.3034-1
- Update to 5.3034
- fix man page year typo (Debian bug #428973)
- updated to the latest version of Module::Install
- added TODO to the distribution
- fix a bug where grepmail could abort with -L
- fix a bug in the -R test that could cause a false test failure
- fix uninitialized variable warnings for emails missing certain headers
- URLs moved back to search.cpan.org
- Buildreq perl(Test::More)
- Buildreq perl(Module::AutoInstall), should have been bundled
- Revert change to t/recursive.t from 5.3033 that causes test failure
- Patch t/nonexistent_mailbox.t to support changed behaviour of
Mail::Mbox::MessageParser >= 1.5002
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 5.3033-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 5.3033-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
* Thu Feb 7 2008 Tom "spot" Callaway <tcallawa@redhat.com> 5.3033-4
- Rebuild for new perl
* Wed Apr 18 2007 Paul Howarth <paul@city-fan.org> 5.3033-3
- Buildrequire perl(ExtUtils::MakeMaker) instead of perl-devel
* Thu Mar 8 2007 Paul Howarth <paul@city-fan.org> 5.3033-2
- Buildrequire perl-devel for Fedora 7 onwards
* Fri Mar 2 2007 Paul Howarth <paul@city-fan.org> 5.3033-1
- Update to 5.3033
- CPAN RT#24341 fixed upstream, remove patch
- Permissions fixes in %%prep no longer needed
- Changed download host from dl.sf.net to downloads.sf.net
* Tue Feb 27 2007 Paul Howarth <paul@city-fan.org> 5.3032-5
- Add patch to fix CPAN RT#24341 (test suite failures with recent
Mail::Mbox::MessageParser)
- Fix argument order for find with -depth
* Tue Aug 29 2006 Paul Howarth <paul@city-fan.org> 5.3032-4
- FE6 rebuild
* Thu Feb 16 2006 Paul Howarth <paul@city-fan.org> 5.3032-3
- Don't use macros in command paths, hardcode them instead
* Wed Oct 12 2005 Paul Howarth <paul@city-fan.org> 5.3032-2
- Remove spec file comments about package naming (#170506)
* Wed Oct 12 2005 Paul Howarth <paul@city-fan.org> 5.3032-1
- Fedora Extras submission