3 %bcond_without tests # do not perform "make test"
7 %include /usr/lib/rpm/macros.perl
8 Summary: Mail::Procmail - Procmail-like facility for creating easy mail filters
9 Name: perl-%{pdir}-%{pnam}
12 License: GPL v1+ or Artistic
13 Group: Development/Languages/Perl
14 Source0: http://www.cpan.org/modules/by-module/%{pdir}/%{pdir}-%{pnam}-%{version}.tar.gz
15 # Source0-md5: 4a8d3c3d90553a98f702c851c27be320
16 Patch0: %{name}-modify_headers.patch
17 URL: http://search.cpan.org/dist/%{pdir}-%{pnam}/
18 BuildRequires: perl-devel >= 1:5.8.0
19 BuildRequires: rpm-perlprov >= 4.1-13
21 BuildRequires: perl-LockFile-Simple
22 BuildRequires: perl-MailTools
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 procmail is a great mail filter program, but it has weird recipe
29 format. It's pattern matching capabilities are basic and often
30 insufficient. I wanted something flexible whereby I could filter my
31 mail using the power of Perl.
33 I've been considering to write a procmail replacement in Perl for a
34 while, but it was Simon Cozen's Mail::Audit module, and his article in
35 The Perl Journal #18, that set it off.
37 I first started using Simon's great module, and then decided to write
38 my own since I liked certain things to be done differently. And I
39 couldn't wait for his updates.
41 Mail::Procmail allows a piece of email to be logged, examined,
42 delivered into a mailbox, filtered, resent elsewhere, rejected, and so
43 on. It is designed to allow you to easily create filter programs to
44 stick in a .forward or .procmailrc file, or similar.
47 %setup -q -n %{pdir}-%{pnam}-%{version}
51 %{__perl} Makefile.PL \
55 %{?with_tests:%{__make} test}
58 rm -rf $RPM_BUILD_ROOT
60 %{__make} pure_install \
61 DESTDIR=$RPM_BUILD_ROOT
63 install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
64 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
67 rm -rf $RPM_BUILD_ROOT
70 %defattr(644,root,root,755)
72 %{perl_vendorlib}/%{pdir}/*.pm
74 %{_examplesdir}/%{name}-%{version}