2012-09-28 19:26:54 +02:00
|
|
|
# Created by: Tom Hukins <tom@eborcom.com>
|
1999-08-25 08:51:17 +02:00
|
|
|
# $FreeBSD$
|
1998-12-24 08:27:15 +01:00
|
|
|
|
2003-03-27 04:45:21 +01:00
|
|
|
# The following compile-time options are available:
|
2006-05-03 00:54:36 +02:00
|
|
|
# WITH_AUTHLIB=yes Enable optional support for Courier Auth Library
|
|
|
|
# WITH_FAM=yes Enable optional support for File Alteration Monitor
|
2003-12-23 17:33:36 +01:00
|
|
|
# WITH_GDBM=yes Enable database extensions using GDBM (default: off)
|
2003-03-27 04:45:21 +01:00
|
|
|
# MAILDROP_SUID=<uid>,
|
|
|
|
# MAILDROP_SGID=<gid> Maildrop will be installed with suid permissions for
|
|
|
|
# MAILDROP_SUID, and sgid permissions for MAILDROP_SGID.
|
2004-07-05 00:45:03 +02:00
|
|
|
# MAILDROP_TRUSTED_USERS=<user> Specify users allowed to use the -d option
|
2003-12-23 17:33:36 +01:00
|
|
|
# NO_MAILWRAPPER=yes If defined, let configure guess which sendmail binary
|
2003-04-06 17:31:07 +02:00
|
|
|
# to use
|
2009-02-18 08:00:44 +01:00
|
|
|
# MAILDROP_LOG_COLUMNS lenght of 'File:' line in log - 8; default: 72
|
2010-06-02 19:40:40 +02:00
|
|
|
# WITH_DOVECOTAUTH=yes Enable optional support for Dovecot Authentication
|
|
|
|
# extension (http://wiki.dovecot.org/maildrop/)
|
2003-03-27 04:45:21 +01:00
|
|
|
|
2000-04-13 22:01:08 +02:00
|
|
|
PORTNAME= maildrop
|
2012-09-28 19:26:54 +02:00
|
|
|
PORTVERSION= 2.6.0
|
2013-05-07 15:12:31 +02:00
|
|
|
PORTREVISION= 3
|
1998-12-24 08:27:15 +01:00
|
|
|
CATEGORIES= mail
|
2009-08-22 02:28:34 +02:00
|
|
|
MASTER_SITES= SF/courier/${PORTNAME}/${PORTVERSION}
|
1998-12-24 08:27:15 +01:00
|
|
|
|
2012-09-28 19:26:54 +02:00
|
|
|
MAINTAINER= madpilot@FreeBSD.org
|
2003-12-23 17:33:36 +01:00
|
|
|
COMMENT= Mail delivery agent (MDA) with filtering abilities
|
1998-12-24 08:27:15 +01:00
|
|
|
|
2011-12-28 16:23:08 +01:00
|
|
|
LICENSE= GPLv3
|
|
|
|
|
2003-03-27 04:45:21 +01:00
|
|
|
USE_BZIP2= yes
|
2013-07-31 14:16:16 +02:00
|
|
|
USES= iconv shebangfix perl5
|
2013-07-08 20:44:24 +02:00
|
|
|
.if defined(.PARSEDIR)
|
|
|
|
USES+= gmake
|
|
|
|
.endif
|
2003-12-23 17:33:36 +01:00
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
CONFIGURE_ARGS= --enable-syslog=1 \
|
2005-02-21 12:31:55 +01:00
|
|
|
--enable-use-flock=1 \
|
1999-03-15 02:32:32 +01:00
|
|
|
--with-etcdir="${PREFIX}/etc" \
|
2005-02-21 12:31:55 +01:00
|
|
|
--enable-maildirquota
|
2003-12-23 17:33:36 +01:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib
|
2003-03-27 04:45:21 +01:00
|
|
|
|
2013-05-07 15:12:31 +02:00
|
|
|
SHEBANG_FILES= unicode/*.pl
|
|
|
|
|
2012-10-20 10:49:11 +02:00
|
|
|
CONFLICTS= courier-0.65*
|
2012-09-28 19:26:54 +02:00
|
|
|
|
2012-07-03 00:24:21 +02:00
|
|
|
LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
|
2005-12-26 10:40:44 +01:00
|
|
|
|
2009-02-18 08:00:44 +01:00
|
|
|
MAILDROP_LOG_COLUMNS?= 72 # lenght of 'File:' line in log
|
|
|
|
|
2012-10-20 10:49:11 +02:00
|
|
|
FIXDOCPATH= liblock/lockmail.1 maildir/deliverquota.8.in \
|
|
|
|
maildir/maildir.5 maildir/maildiracl.1.in \
|
|
|
|
maildir/maildirkw.1 maildir/maildirmake.1.in \
|
|
|
|
maildir/maildirquota.7 maildrop/mailbot.1 \
|
|
|
|
maildrop/maildrop.1.in maildrop/maildropex.7 \
|
|
|
|
maildrop/maildropfilter.7.in maildrop/maildropgdbm.7 \
|
|
|
|
maildrop/makedat.1 maildrop/reformail.1 \
|
|
|
|
rfc2045/makemime.1 rfc2045/reformime.1 \
|
|
|
|
rfc2045/rfc2045.3 rfc822/rfc822.3
|
|
|
|
|
|
|
|
MAN1+= lockmail.1 mailbot.1 maildrop-maildirmake.1 maildrop.1 makemime.1 \
|
|
|
|
reformail.1 reformime.1
|
|
|
|
MAN5= maildir.5
|
|
|
|
MAN7= maildirquota.7 maildropex.7 maildropfilter.7 maildropgdbm.7
|
|
|
|
MAN8+= maildrop-deliverquota.8
|
|
|
|
DOCS= AUTHORS INSTALL INSTALL.html README README.html README.postfix \
|
|
|
|
UPGRADE UPGRADE.html maildroptips.txt maildir/README.*
|
|
|
|
|
2005-04-26 21:22:11 +02:00
|
|
|
.if defined(WITH_AUTHLIB)
|
|
|
|
.if exists(${.CURDIR}/../../security/courier-authlib/Makefile.opt)
|
|
|
|
.include "${.CURDIR}/../../security/courier-authlib/Makefile.opt"
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2004-04-11 23:38:48 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
2003-12-23 17:33:36 +01:00
|
|
|
.if defined(WITH_GDBM)
|
2012-07-03 00:24:21 +02:00
|
|
|
LIB_DEPENDS+= gdbm:${PORTSDIR}/databases/gdbm
|
2003-12-23 17:33:36 +01:00
|
|
|
CONFIGURE_ARGS+= --with-db=gdbm
|
|
|
|
.else
|
2007-06-06 03:57:14 +02:00
|
|
|
CONFIGURE_ARGS+= --with-db=db
|
2003-12-23 17:33:36 +01:00
|
|
|
.endif
|
|
|
|
|
2005-03-14 15:36:16 +01:00
|
|
|
.if defined(MAILDROP_SUID)
|
|
|
|
CONFIGURE_ARGS+= --enable-maildrop-uid="${MAILDROP_SUID}"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(MAILDROP_SGID)
|
|
|
|
CONFIGURE_ARGS+= --enable-maildrop-gid="${MAILDROP_SGID}"
|
|
|
|
.endif
|
|
|
|
|
2003-12-23 17:33:36 +01:00
|
|
|
.if !defined(NO_MAILWRAPPER)
|
|
|
|
CONFIGURE_ARGS+= --enable-sendmail=/usr/sbin/sendmail
|
|
|
|
.endif
|
|
|
|
|
2006-05-03 00:54:36 +02:00
|
|
|
.if defined(WITH_FAM) || exists(${LOCALBASE}/lib/libfam.so.0)
|
|
|
|
USE_FAM= yes
|
2003-12-23 17:33:36 +01:00
|
|
|
.endif
|
|
|
|
|
2004-07-05 00:45:03 +02:00
|
|
|
.if defined(MAILDROP_TRUSTED_USERS)
|
|
|
|
CONFIGURE_ARGS+= --enable-trusted-users="${MAILDROP_TRUSTED_USERS}"
|
|
|
|
.endif
|
|
|
|
|
2010-06-02 19:40:40 +02:00
|
|
|
.if defined(WITH_DOVECOTAUTH)
|
|
|
|
PATCH_SITES+= http://www.max.rs/ozone/
|
|
|
|
PATCHFILES+= maildrop-2.3.0-dovecotauth.patch.txt
|
|
|
|
PATCH_DIST_STRIP= -p1
|
|
|
|
PLIST_SUB+= DOVECOTAUTH=""
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= DOVECOTAUTH="@comment "
|
|
|
|
.endif
|
|
|
|
|
2009-02-18 08:00:44 +01:00
|
|
|
post-patch:
|
|
|
|
@${REINPLACE_CMD} -e "s/l= 72 - szbuf.Length();/l= ${MAILDROP_LOG_COLUMNS} - szbuf.Length();/" \
|
|
|
|
${WRKSRC}/maildrop/log.C
|
2012-10-20 10:49:11 +02:00
|
|
|
.for f in ${FIXDOCPATH}
|
|
|
|
@${REINPLACE_CMD} -e "s|\\\%\[set \$$man\.base\.url\.for\.relative\.links\]|${DOCSDIR}|" \
|
|
|
|
-e "s/\(maildirmake.html\)/maildrop-\1/" \
|
|
|
|
-e "s/\(deliverquota.html\)/maildrop-\1/" ${WRKSRC}/${f}
|
|
|
|
.endfor
|
2005-02-21 12:31:55 +01:00
|
|
|
.if defined(WITH_AUTHLIB)
|
2009-02-25 12:31:20 +01:00
|
|
|
@${REINPLACE_CMD} -e 's|@LIBS@|@LIBS@ -rpath=:${LOCALBASE}/lib/courier-authlib|' \
|
|
|
|
${WRKSRC}/maildrop/Makefile.in
|
2005-04-26 21:22:11 +02:00
|
|
|
.if exists(${.CURDIR}/../../security/courier-authlib/Makefile.dep)
|
|
|
|
.include "${.CURDIR}/../../security/courier-authlib/Makefile.dep"
|
|
|
|
.endif
|
2009-02-18 08:00:44 +01:00
|
|
|
BUILD_DEPENDS+= courierauthconfig:${PORTSDIR}/security/courier-authlib-base
|
|
|
|
RUN_DEPENDS+= courierauthconfig:${PORTSDIR}/security/courier-authlib-base
|
|
|
|
CONFIGURE_ARGS+= --enable-authlib
|
2005-02-21 12:31:55 +01:00
|
|
|
.else
|
|
|
|
CONFIGURE_ARGS+= --disable-authlib
|
2003-12-23 17:33:36 +01:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(NOPORTDOCS)
|
2001-05-23 19:04:52 +02:00
|
|
|
# Just install the binary and man pages, no extra documentation
|
2005-02-21 12:31:55 +01:00
|
|
|
INSTALL_TARGET= install-maildrop install-deliverquota install-man
|
2003-12-23 17:33:36 +01:00
|
|
|
.else
|
|
|
|
INSTALL_TARGET= install-strip
|
2001-05-23 19:04:52 +02:00
|
|
|
.endif
|
|
|
|
|
2003-03-27 04:45:21 +01:00
|
|
|
post-install:
|
2006-05-03 00:54:36 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/maildir/quotawarnmsg \
|
|
|
|
${PREFIX}/etc/quotawarnmsg.sample
|
2005-03-14 15:36:16 +01:00
|
|
|
.if !defined(NOPORTDOCS)
|
2003-12-21 21:37:54 +01:00
|
|
|
cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${DOCSDIR}
|
2010-06-02 19:40:40 +02:00
|
|
|
.if defined(WITH_DOVECOTAUTH)
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/README.dovecotauth ${DOCSDIR}
|
|
|
|
.endif
|
1999-03-15 02:32:32 +01:00
|
|
|
.endif
|
2005-03-14 15:36:16 +01:00
|
|
|
.if defined(MAILDROP_SUID)
|
|
|
|
${CHMOD} u+s ${PREFIX}/bin/maildrop
|
|
|
|
.endif
|
|
|
|
.if defined(MAILDROP_SGID)
|
|
|
|
${CHMOD} g+s ${PREFIX}/bin/maildrop
|
|
|
|
.endif
|
1998-12-24 08:27:15 +01:00
|
|
|
|
2004-04-11 23:38:48 +02:00
|
|
|
.include <bsd.port.post.mk>
|