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