2000-03-11 21:16:32 +01:00
|
|
|
# New ports collection makefile for: courierimap
|
|
|
|
# Date created: 19 Feb 2000
|
|
|
|
# Whom: Neil Blakey-Milner
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
2000-04-13 22:01:08 +02:00
|
|
|
PORTNAME= courier-imap
|
2003-07-07 11:09:48 +02:00
|
|
|
PORTVERSION= 2.0.0
|
2003-03-24 16:34:32 +01:00
|
|
|
PORTREVISION= 0
|
2000-06-21 15:36:13 +02:00
|
|
|
CATEGORIES= mail ipv6
|
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
|
|
|
MASTER_SITE_SUBDIR= courier
|
2000-03-11 21:16:32 +01:00
|
|
|
|
2003-07-08 15:32:36 +02:00
|
|
|
MAINTAINER= oliver@FreeBSD.org
|
2003-03-07 07:14:21 +01:00
|
|
|
COMMENT= IMAP (and POP3) server that provides access to Maildir mailboxes
|
2000-03-11 21:16:32 +01:00
|
|
|
|
2003-01-09 18:24:37 +01:00
|
|
|
USE_BZIP2= yes
|
2002-11-05 13:51:43 +01:00
|
|
|
USE_REINPLACE= yes
|
2002-11-05 03:49:47 +01:00
|
|
|
USE_PERL5= yes
|
2000-03-11 21:16:32 +01:00
|
|
|
GNU_CONFIGURE= YES
|
|
|
|
USE_GMAKE= YES
|
|
|
|
|
2001-11-16 10:22:36 +01:00
|
|
|
#
|
|
|
|
# options available:
|
|
|
|
#
|
|
|
|
# WITHOUT_OPENSSL: Don't build in TLS support
|
|
|
|
# WITHOUT_PAM: Don't build in PAM support
|
2003-01-09 18:24:37 +01:00
|
|
|
# WITH_CRAM: Build in CRAM-MD5 authentication support
|
2001-11-16 10:22:36 +01:00
|
|
|
# WITH_VPOPMAIL: Build in vpopmail support
|
|
|
|
# WITH_MYSQL: Build in mysql support
|
|
|
|
# WITH_POSTGRESQL: Build in postgresql support
|
2003-03-24 16:34:32 +01:00
|
|
|
# WITH_LDAP: Build in ldap support with openldap 2.1
|
|
|
|
# WITH_LDAP21: Build in ldap support with openldap 2.1
|
|
|
|
# WITH_LDAP20: Build in ldap support with openldap 2.0
|
2002-05-08 21:18:05 +02:00
|
|
|
# WITH_LDAP1: Build in ldap support with openldap 1.x
|
2003-03-24 16:34:32 +01:00
|
|
|
# WITH_FAM: Build in fam support for IDLE command
|
2001-11-16 10:22:36 +01:00
|
|
|
#
|
2000-11-09 02:00:00 +01:00
|
|
|
|
2003-01-09 18:24:37 +01:00
|
|
|
CONFDIR?= ${PREFIX}/etc/${PORTNAME}
|
|
|
|
RCDIR?= ${PREFIX}/etc/rc.d
|
|
|
|
USERDB?= ${PREFIX}/etc/userdb
|
|
|
|
LIBEXECDIR?= ${PREFIX}/libexec/${PORTNAME}
|
|
|
|
|
|
|
|
VPOPMAILDIR?= ${LOCALBASE}/vpopmail
|
|
|
|
|
2003-07-07 11:09:48 +02:00
|
|
|
PLIST_SUB= CONFDIR=${CONFDIR:S,^${PREFIX}/,,} \
|
|
|
|
RCDIR=${RCDIR:S,^${PREFIX}/,,} \
|
|
|
|
USERDB=${USERDB:S,^${PREFIX}/,,} \
|
|
|
|
LIBEXECDIR=${LIBEXECDIR:S,^${PREFIX}/,,}
|
|
|
|
|
2000-11-09 02:00:00 +01:00
|
|
|
.if !defined(WITHOUT_OPENSSL)
|
|
|
|
USE_OPENSSL= YES
|
2003-07-07 11:09:48 +02:00
|
|
|
PLIST_SUB+= OPENSSLFLAG=
|
2000-11-09 02:00:00 +01:00
|
|
|
.else
|
2003-07-07 11:09:48 +02:00
|
|
|
PLIST_SUB+= OPENSSLFLAG="@comment "
|
2000-11-09 02:00:00 +01:00
|
|
|
.endif
|
|
|
|
|
2003-01-09 18:24:37 +01:00
|
|
|
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
|
2002-05-08 21:18:05 +02:00
|
|
|
CONFIGURE_ARGS= --without-authshadow \
|
2003-01-09 18:24:37 +01:00
|
|
|
--sysconfdir=${CONFDIR} \
|
|
|
|
--with-userdb=${USERDB} \
|
|
|
|
--datadir=${DATADIR} \
|
|
|
|
--libexecdir=${LIBEXECDIR} \
|
2001-03-18 17:08:42 +01:00
|
|
|
--enable-workarounds-for-imap-client-bugs \
|
2002-08-12 21:19:54 +02:00
|
|
|
--enable-unicode \
|
2003-07-09 18:46:53 +02:00
|
|
|
--disable-root-check \
|
|
|
|
--with-locking-method=fcntl
|
2000-03-11 21:16:32 +01:00
|
|
|
|
2001-05-24 16:43:37 +02:00
|
|
|
.if !defined(WITH_VPOPMAIL)
|
2003-01-09 18:24:37 +01:00
|
|
|
CONFIGURE_ARGS+= --without-authvchkpw
|
2003-07-10 09:55:11 +02:00
|
|
|
PLIST_SUB+= VPOPMAILFLAG="@comment "
|
2001-05-24 16:43:37 +02:00
|
|
|
.else
|
2003-01-09 18:24:37 +01:00
|
|
|
CONFIGURE_ARGS+= --with-authvchkpw
|
2001-08-27 14:54:57 +02:00
|
|
|
BUILD_DEPENDS+= ${VPOPMAILDIR}/lib/libvpopmail.a:${PORTSDIR}/mail/vpopmail
|
2003-07-10 09:55:11 +02:00
|
|
|
PLIST_SUB+= VPOPMAILFLAG=""
|
2001-05-24 16:43:37 +02:00
|
|
|
.endif
|
|
|
|
|
2003-03-24 16:34:32 +01:00
|
|
|
.if defined(WITH_LDAP)
|
|
|
|
WITH_LDAP21= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !defined(WITH_LDAP1) && !defined(WITH_LDAP20) && !defined(WITH_LDAP21)
|
2003-01-09 18:24:37 +01:00
|
|
|
CONFIGURE_ARGS+= --without-authldap
|
2002-05-08 21:18:05 +02:00
|
|
|
PLIST_SUB+= LDAPFLAG="@comment "
|
|
|
|
.else
|
2003-01-09 18:24:37 +01:00
|
|
|
CONFIGURE_ARGS+= --with-authldap
|
2002-05-08 21:18:05 +02:00
|
|
|
PLIST_SUB+= LDAPFLAG=""
|
|
|
|
|
2003-03-24 16:34:32 +01:00
|
|
|
.if defined(WITH_LDAP21)
|
|
|
|
LIB_DEPENDS= ldap.2:${PORTSDIR}/net/openldap21 \
|
|
|
|
lber.2:${PORTSDIR}/net/openldap21
|
|
|
|
.elseif defined(WITH_LDAP20)
|
2003-02-24 03:56:37 +01:00
|
|
|
LIB_DEPENDS= ldap.2:${PORTSDIR}/net/openldap20 \
|
|
|
|
lber.2:${PORTSDIR}/net/openldap20
|
2002-05-08 21:18:05 +02:00
|
|
|
.else
|
2003-02-24 03:26:55 +01:00
|
|
|
LIB_DEPENDS= ldap.1:${PORTSDIR}/net/openldap12 \
|
|
|
|
lber.1:${PORTSDIR}/net/openldap12
|
2002-05-08 21:18:05 +02:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
2001-08-27 14:54:57 +02:00
|
|
|
.if !defined(WITH_MYSQL)
|
2003-01-09 18:24:37 +01:00
|
|
|
CONFIGURE_ARGS+= --without-authmysql
|
2001-08-27 14:54:57 +02:00
|
|
|
PLIST_SUB+= MYSQLFLAG="@comment "
|
|
|
|
.else
|
2003-03-24 16:34:32 +01:00
|
|
|
CONFIGURE_ARGS+=--with-authmysql \
|
|
|
|
--with-mysql-libs=${LOCALBASE}/lib/mysql \
|
|
|
|
--with-mysql-includes=${LOCALBASE}/include/mysql
|
2001-08-27 14:54:57 +02:00
|
|
|
LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
|
|
|
|
PLIST_SUB+= MYSQLFLAG=""
|
|
|
|
.endif
|
|
|
|
|
2001-11-16 10:22:36 +01:00
|
|
|
.if !defined(WITH_POSTGRESQL)
|
2003-01-09 18:24:37 +01:00
|
|
|
CONFIGURE_ARGS+= --without-authpgsql
|
2001-11-16 10:22:36 +01:00
|
|
|
PLIST_SUB+= PGSQLFLAG="@comment "
|
|
|
|
.else
|
2003-01-18 23:50:06 +01:00
|
|
|
POSTGRESQL_PORT?= databases/postgresql7
|
|
|
|
LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
|
2001-11-16 10:22:36 +01:00
|
|
|
PLIST_SUB+= PGSQLFLAG=""
|
|
|
|
.endif
|
|
|
|
|
2001-08-23 13:46:18 +02:00
|
|
|
.if !defined(WITHOUT_PAM)
|
2003-01-09 18:24:37 +01:00
|
|
|
CONFIGURE_ARGS+= --with-authpam
|
2001-08-23 13:46:18 +02:00
|
|
|
.else
|
2003-01-09 18:24:37 +01:00
|
|
|
CONFIGURE_ARGS+= --without-authpam
|
2001-08-23 13:46:18 +02:00
|
|
|
.endif
|
|
|
|
|
2002-08-04 22:52:21 +02:00
|
|
|
.if !defined(WITH_CRAM)
|
2003-01-09 18:24:37 +01:00
|
|
|
CONFIGURE_ARGS+= --without-authcram
|
2002-08-04 22:38:48 +02:00
|
|
|
.else
|
2003-01-09 18:24:37 +01:00
|
|
|
CONFIGURE_ARGS+= --with-authcram
|
2002-08-04 22:38:48 +02:00
|
|
|
.endif
|
|
|
|
|
2003-03-24 16:34:32 +01:00
|
|
|
.if defined(WITH_FAM)
|
|
|
|
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
|
|
|
|
LDFLAGS="-L${LOCALBASE}/lib"
|
|
|
|
LIB_DEPENDS+= fam.0:${PORTSDIR}/devel/fam
|
|
|
|
.endif
|
|
|
|
|
2002-05-08 21:28:10 +02:00
|
|
|
MAN1= couriertcpd.1 maildirmake.1
|
|
|
|
MAN7= authlib.7
|
|
|
|
MAN8= makeuserdb.8 userdb.8 userdbpw.8 \
|
2000-11-04 00:26:04 +01:00
|
|
|
deliverquota.8 imapd.8 mkimapdcert.8 mkpop3dcert.8
|
2000-03-11 21:16:32 +01:00
|
|
|
|
2002-03-29 10:28:48 +01:00
|
|
|
MLINKS= authlib.7 authpwd.7 \
|
|
|
|
authlib.7 authuserdb.7 \
|
|
|
|
authlib.7 authshadow.7 \
|
|
|
|
authlib.7 authpam.7 \
|
|
|
|
authlib.7 authvchkpw.7 \
|
|
|
|
authlib.7 authcram.7 \
|
|
|
|
authlib.7 authldap.7 \
|
|
|
|
authlib.7 authmysql.7 \
|
|
|
|
authlib.7 authdaemon.7 \
|
|
|
|
authlib.7 authdaemond.7 \
|
2000-06-21 15:36:13 +02:00
|
|
|
makeuserdb.8 pw2userdb.8 \
|
2000-03-11 21:16:32 +01:00
|
|
|
makeuserdb.8 vchkpw2userdb.8
|
|
|
|
|
2000-07-19 16:21:34 +02:00
|
|
|
EXTRA_DOCS= README INSTALL AUTHORS imap/ChangeLog
|
|
|
|
|
2000-07-19 14:16:04 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
post-patch:
|
2003-07-09 18:46:53 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|^case x$$lockmethod in|${TEST} \&\& &|g' \
|
|
|
|
${WRKSRC}/liblock/configure
|
|
|
|
@${REINPLACE_CMD} -e 's|$$VPOPMAILLIBS|& -lcrypt|g' \
|
|
|
|
${WRKSRC}/authlib/configure
|
2003-07-10 09:55:11 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|^@INSTALLAUTHMODULES@$$|& @AUTHMODULES@|' \
|
|
|
|
${WRKSRC}/authlib/installlist.in
|
2003-07-20 14:37:08 +02:00
|
|
|
@${REINPLACE_CMD} -e 's|%%INSTALL_MAN%%|${INSTALL_MAN}|' \
|
|
|
|
${WRKSRC}/Makefile.in ${WRKSRC}/authlib/Makefile.in
|
2000-07-19 14:16:04 +02:00
|
|
|
|
2000-07-19 16:21:34 +02:00
|
|
|
post-install:
|
2003-01-09 18:24:37 +01:00
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/authlib/authtest ${PREFIX}/bin/
|
|
|
|
.for i in imapd pop3d
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/imap/${i}.cnf ${CONFDIR}/${i}.cnf.dist
|
|
|
|
${LN} -s ${LIBEXECDIR}/${i}.rc ${RCDIR}/${PORTNAME}-${i}.sh.sample
|
2003-07-07 11:09:48 +02:00
|
|
|
${LN} -s ${LIBEXECDIR}/${i}-ssl.rc ${RCDIR}/${PORTNAME}-${i}-ssl.sh.sample
|
2003-01-09 18:24:37 +01:00
|
|
|
.endfor
|
|
|
|
.if !defined(NOPORTDOCS)
|
|
|
|
@${MKDIR} ${DOCSDIR}
|
2000-07-19 16:21:34 +02:00
|
|
|
.for a in ${EXTRA_DOCS}
|
2003-01-09 18:24:37 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/${a} ${DOCSDIR}
|
2000-07-19 16:21:34 +02:00
|
|
|
.endfor
|
2003-01-09 18:24:37 +01:00
|
|
|
.endif
|
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "You will have to run ${DATADIR}/mkimapdcert to create"
|
|
|
|
@${ECHO_MSG} "a self-signed certificate if you want to use imapd-ssl."
|
|
|
|
@${ECHO_MSG} "And you will have to copy and edit the *.dist files to *"
|
|
|
|
@${ECHO_MSG} "in ${CONFDIR}."
|
|
|
|
@${ECHO_MSG} ""
|
2000-07-19 16:21:34 +02:00
|
|
|
|
2000-07-19 14:16:04 +02:00
|
|
|
.include <bsd.port.post.mk>
|