1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-02 06:03:50 +00:00
freebsd-ports/mail/courier-imap/Makefile

187 lines
4.9 KiB
Makefile
Raw Normal View History

# New ports collection makefile for: courierimap
# Date created: 19 Feb 2000
# Whom: Neil Blakey-Milner
#
# $FreeBSD$
#
2000-04-13 20:01:08 +00:00
PORTNAME= courier-imap
PORTVERSION= 2.0.0
PORTREVISION= 0
CATEGORIES= mail ipv6
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= courier
MAINTAINER= nbm@FreeBSD.org
COMMENT= IMAP (and POP3) server that provides access to Maildir mailboxes
USE_BZIP2= yes
USE_REINPLACE= yes
USE_PERL5= yes
GNU_CONFIGURE= YES
USE_GMAKE= YES
#
# options available:
#
# WITHOUT_OPENSSL: Don't build in TLS support
# WITHOUT_PAM: Don't build in PAM support
# WITH_CRAM: Build in CRAM-MD5 authentication support
# WITH_VPOPMAIL: Build in vpopmail support
# WITH_MYSQL: Build in mysql support
# WITH_POSTGRESQL: Build in postgresql support
# 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
# WITH_LDAP1: Build in ldap support with openldap 1.x
# WITH_FAM: Build in fam support for IDLE command
#
CONFDIR?= ${PREFIX}/etc/${PORTNAME}
RCDIR?= ${PREFIX}/etc/rc.d
USERDB?= ${PREFIX}/etc/userdb
LIBEXECDIR?= ${PREFIX}/libexec/${PORTNAME}
VPOPMAILDIR?= ${LOCALBASE}/vpopmail
PLIST_SUB= CONFDIR=${CONFDIR:S,^${PREFIX}/,,} \
RCDIR=${RCDIR:S,^${PREFIX}/,,} \
USERDB=${USERDB:S,^${PREFIX}/,,} \
LIBEXECDIR=${LIBEXECDIR:S,^${PREFIX}/,,}
.if !defined(WITHOUT_OPENSSL)
USE_OPENSSL= YES
PLIST_SUB+= OPENSSLFLAG=
.else
PLIST_SUB+= OPENSSLFLAG="@comment "
.endif
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
CONFIGURE_ARGS= --without-authshadow \
--sysconfdir=${CONFDIR} \
--with-userdb=${USERDB} \
--datadir=${DATADIR} \
--libexecdir=${LIBEXECDIR} \
--enable-workarounds-for-imap-client-bugs \
--enable-unicode \
2000-07-31 11:05:39 +00:00
--disable-root-check
2001-05-24 14:43:37 +00:00
.if !defined(WITH_VPOPMAIL)
CONFIGURE_ARGS+= --without-authvchkpw
2001-05-24 14:43:37 +00:00
.else
CONFIGURE_ARGS+= --with-authvchkpw
BUILD_DEPENDS+= ${VPOPMAILDIR}/lib/libvpopmail.a:${PORTSDIR}/mail/vpopmail
2001-05-24 14:43:37 +00:00
.endif
.if defined(WITH_LDAP)
WITH_LDAP21= yes
.endif
.if !defined(WITH_LDAP1) && !defined(WITH_LDAP20) && !defined(WITH_LDAP21)
CONFIGURE_ARGS+= --without-authldap
PLIST_SUB+= LDAPFLAG="@comment "
.else
CONFIGURE_ARGS+= --with-authldap
PLIST_SUB+= LDAPFLAG=""
.if defined(WITH_LDAP21)
LIB_DEPENDS= ldap.2:${PORTSDIR}/net/openldap21 \
lber.2:${PORTSDIR}/net/openldap21
.elseif defined(WITH_LDAP20)
LIB_DEPENDS= ldap.2:${PORTSDIR}/net/openldap20 \
lber.2:${PORTSDIR}/net/openldap20
.else
LIB_DEPENDS= ldap.1:${PORTSDIR}/net/openldap12 \
lber.1:${PORTSDIR}/net/openldap12
.endif
.endif
.if !defined(WITH_MYSQL)
CONFIGURE_ARGS+= --without-authmysql
PLIST_SUB+= MYSQLFLAG="@comment "
.else
CONFIGURE_ARGS+=--with-authmysql \
--with-mysql-libs=${LOCALBASE}/lib/mysql \
--with-mysql-includes=${LOCALBASE}/include/mysql
LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client
PLIST_SUB+= MYSQLFLAG=""
.endif
.if !defined(WITH_POSTGRESQL)
CONFIGURE_ARGS+= --without-authpgsql
PLIST_SUB+= PGSQLFLAG="@comment "
.else
POSTGRESQL_PORT?= databases/postgresql7
LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
PLIST_SUB+= PGSQLFLAG=""
.endif
.if !defined(WITHOUT_PAM)
CONFIGURE_ARGS+= --with-authpam
.else
CONFIGURE_ARGS+= --without-authpam
.endif
.if !defined(WITH_CRAM)
CONFIGURE_ARGS+= --without-authcram
.else
CONFIGURE_ARGS+= --with-authcram
.endif
.if defined(WITH_FAM)
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
LIB_DEPENDS+= fam.0:${PORTSDIR}/devel/fam
.endif
MAN1= couriertcpd.1 maildirmake.1
MAN7= authlib.7
MAN8= makeuserdb.8 userdb.8 userdbpw.8 \
deliverquota.8 imapd.8 mkimapdcert.8 mkpop3dcert.8
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 \
makeuserdb.8 pw2userdb.8 \
makeuserdb.8 vchkpw2userdb.8
EXTRA_DOCS= README INSTALL AUTHORS imap/ChangeLog
.include <bsd.port.pre.mk>
post-patch:
@${REINPLACE_CMD} -Ee \
'/^ imapd.cnf pop3d.cnf/s/(imapd.cnf|pop3d.cnf)//g' \
2001-01-03 15:44:16 +00:00
${WRKSRC}/Makefile.in
post-install:
${INSTALL_PROGRAM} ${WRKSRC}/authlib/authtest ${PREFIX}/bin/
${INSTALL_PROGRAM} ${WRKSRC}/authlib/authuserdb \
${PREFIX}/libexec/courier-imap/authlib
.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
${LN} -s ${LIBEXECDIR}/${i}-ssl.rc ${RCDIR}/${PORTNAME}-${i}-ssl.sh.sample
.endfor
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
.for a in ${EXTRA_DOCS}
${INSTALL_DATA} ${WRKSRC}/${a} ${DOCSDIR}
.endfor
.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} ""
.include <bsd.port.post.mk>