2242ae2
Summary:	Search mailboxes for a particular email
2242ae2
Name:		grepmail
542d353
Version:	5.3034
3667ed9
Release:	3%{?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
2242ae2
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
2242ae2
BuildArch:	noarch
2242ae2
Requires:	perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
2242ae2
Requires:	perl(Mail::Mbox::MessageParser) >= 1.4001
2242ae2
BuildRequires:	perl(Mail::Mbox::MessageParser) >= 1.4001, perl(Date::Parse), perl(Date::Manip)
542d353
BuildRequires:	perl(ExtUtils::MakeMaker), 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)
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.
2242ae2
Requires:	perl(Date::Parse), perl(Date::Manip)
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
2242ae2
%{__perl} Makefile.PL INSTALLDIRS=vendor --default
2242ae2
%{__make} %{?_smp_mflags}
2242ae2
2242ae2
%install
2242ae2
%{__rm} -rf %{buildroot}
2242ae2
%{__make} pure_install PERL_INSTALL_ROOT=%{buildroot}
165ef72
/usr/bin/find %{buildroot} -type f -name .packlist -exec %{__rm} -f {} ';'
542d353
/usr/bin/find %{buildroot} -depth -type d -exec /bin/rmdir {} ';' 2>/dev/null
3667ed9
%{__chmod} -R u+w %{buildroot}
2242ae2
2242ae2
%check
2242ae2
export LANG=C
2242ae2
export TZ=GMT0
2242ae2
%{__make} test
2242ae2
2242ae2
%clean
2242ae2
%{__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
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