# $Id: Portfile 50572 2009-05-04 19:19:09Z jeremyhu@macports.org $
PortSystem 1.0

name		procmail
version		3.22
revision        2
categories	mail
maintainers	nomaintainer
description	A local mail delivery agent
long_description	The procmail mail processing program can be used \
			to create mail-servers, mailing lists, sort your \
			incoming mail into separate folders/files (real \
			convenient when subscribing to one or more \
			mailing lists or for prioritising your mail), \
			preprocess your mail, start any programs upon \
			mail arrival (e.g. to generate different chimes \
			on your workstation for different types of mail) \
			or selectively forward certain incoming mail \
			automatically to someone. \
			Procmail can be used: \
			- and installed by an unprivileged user (for \
			  himself only). \
			- as a drop in replacement for the local \
			  delivery agent /bin/mail (with biff/comsat \
			  support). \
			- as a general mailfilter for whole groups of \
			  messages (e.g. when called from within \
			  sendmail.cf rules). \
			The accompanying formail program enables you to \
			generate autoreplies, split up digests/mailboxes \
			into the original messages, do some very simple \
			header-munging/extraction, or force mail into \
			mail-format (with leading From line).
homepage	http://www.procmail.org/
master_sites	ftp://ftp.procmail.org/pub/procmail/ \
		ftp://ftp.psg.com/pub/unix/procmail/ \
		ftp://ftp.ucsb.edu/pub/mirrors/procmail/ \
		ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/ \
		ftp://ftp.fu-berlin.de/pub/unix/mail/procmail/ \
		ftp://ftp.net.ohio-state.edu/pub/networking/mail/procmail/ \
		ftp://ftp.fdt.net/pub/unix/packages/procmail/ \
		ftp://ftp.tamu.edu/pub/mirrors/procmail/ \
		ftp://ftp.kfki.hu/pub/packages/mail/procmail/ \
		ftp://giswitch.sggw.waw.pl/pub/unix/procmail/ \
		ftp://ftp.solarisguide.com/pub/procmail/ \
		ftp://ftp.win.ne.jp/pub/network/mail/procmail/ \
		http://www.ring.gr.jp/archives/net/mail/procmail/ \
		ftp://ftp.ring.gr.jp/pub/net/mail/procmail/ \
		ftp://ftp.ayamura.org/pub/procmail/ \
		ftp://sunsite.cnlab-switch.ch/mirror/procmail/ \
		ftp://ftp.gigabell.net/pub/procmail/ \
		ftp://ftp.linja.net/pub/mirrors/procmail/ \
		ftp://ftp.stealth.net/pub/mirrors/ftp.procmail.org/pub/procmail/ \
		ftp://ftp.mirror.ac.uk/sites/ftp.procmail.org/pub/procmail/
checksums	md5 1678ea99b973eb77eda4ecf6acae53f1
platforms	darwin

configure	{
		  system "cd ${worksrcpath} && mv INSTALL INSTALL.README"
		  reinplace "s%^/\\*\\(#define\[ \t\]*DEF\[S\]*PATH\[ \t\]*\".*\\)\".*$%\\1:${prefix}/bin\"%" ${worksrcpath}/config.h
		  reinplace "s%/etc/procmailrc%${prefix}/etc/procmailrc%" ${worksrcpath}/config.h
		  reinplace "s%/usr/local%${prefix}%g" ${worksrcpath}/Makefile
		  reinplace "s%(BASENAME)/man%(BASENAME)/share/man%" ${worksrcpath}/Makefile }

build.args	BASENAME=${destroot}${prefix} LOCKINGTEST=/tmp
destroot.args	BASENAME=${destroot}${prefix} LOCKINGTEST=/tmp install-suid
