File grepmail.spec of Package grepmail
#
# spec file for package grepmail
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: grepmail
BuildRequires: perl
BuildRequires: perl-macros
Version: 5.3033
Release: 0
Summary: Search Mailboxes for a Particular E-Mail
License: GPL-2.0+
Group: Productivity/Networking/Email/Utilities
Url: http://grepmail.sourceforge.net/
Requires: perl(Date::Manip)
Requires: perl(Date::Parse)
Requires: perl(Inline)
Requires: perl(Mail::Mbox::MessageParser) >= 1.4001
Requires: perl(Time::Local)
## not in factory ## BuildRequires: perl(Benchmark::Timer) => 0.7100
BuildRequires: perl(Date::Manip)
BuildRequires: perl(Date::Parse)
BuildRequires: perl(Inline)
BuildRequires: perl(Mail::Mbox::MessageParser) >= 1.4001
BuildRequires: perl(Time::Local)
Source: http://prdownloads.sourceforge.net/grepmail/grepmail-%{version}.tar.bz2
Patch0: grepmail_midnight.patch
Patch1: grepmail-empty-file-not-error.patch
Patch2: grepmail-buildfix.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%{perl_requires}
%description
Grepmail searches a normal, gzipped, bzipped, or tzipped mailbox for a
given regular expression, and returns any e-mails that match that
expression. Piped input is allowed and date restrictions are supported.
%prep
%setup -q
%patch0
%patch1
%patch2
rm inc/Scalar/Util.pm
%build
PERL_EXTUTILS_AUTOINSTALL=--skip perl Makefile.PL INSTALLDIRS=site
make
%check
make test
%install
%perl_make_install
# do not perl_process_packlist (noarch)
# remove .packlist file
%{__rm} -rf $RPM_BUILD_ROOT%perl_vendorarch
# remove perllocal.pod file
%{__rm} -rf $RPM_BUILD_ROOT%perl_archlib
%perl_gen_filelist
install -m 755 anonymize_mailbox $RPM_BUILD_ROOT/usr/bin
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr (-, root, root)
%doc README CHANGES LICENSE
%doc %{_mandir}/man?/*
%{_bindir}/anonymize_mailbox
%{_bindir}/grepmail
%changelog