93 lines
2.6 KiB
Makefile
93 lines
2.6 KiB
Makefile
# $OpenBSD: Makefile,v 1.24 2001/11/11 13:48:16 espie Exp $
|
|
|
|
MULTI_PACKAGES= -pop3
|
|
|
|
COMMENT= "imap server for maildir format mailboxes"
|
|
COMMENT-pop3= "pop3 server for maildir format mailboxes"
|
|
|
|
COURIERVER= 1.3.11
|
|
DISTNAME= courier-imap-${COURIERVER}
|
|
PKGNAME-pop3= courier-pop3-${COURIERVER}
|
|
|
|
CATEGORIES= mail
|
|
NEED_VERSION= 1.474
|
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
|
MASTER_SITE_SUBDIR= courier
|
|
|
|
MAINTAINER= Anil Madhavapeddy <avsm@openbsd.org>
|
|
HOMEPAGE= http://www.inter7.com/courierimap/
|
|
|
|
# GPL
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
PERMIT_DISTFILES_FTP= Yes
|
|
|
|
FLAVORS= mysql ldap
|
|
FLAVOR?=
|
|
|
|
SEPARATE_BUILD= concurrent
|
|
COURIERCONF= ${SYSCONFDIR}/courier-imap
|
|
COURIERSTATE= /var/run/courier-imap
|
|
SUBST_VARS= COURIERSTATE COURIERCONF COURIERVER
|
|
EXAMPLE_DIR= ${PREFIX}/share/examples/courier-imap
|
|
USE_GMAKE= Yes
|
|
|
|
LIB_DEPENDS= gdbm.2::databases/gdbm
|
|
|
|
CONFIGURE_STYLE= gnu old
|
|
CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" \
|
|
CXXFLAGS="${CFLAGS} -I${LOCALBASE}/include" \
|
|
CPPFLAGS="${CFLAGS} -I${LOCALBASE}/include"
|
|
CONFIGURE_ARGS= --disable-root-check --datadir=${PREFIX}/sbin \
|
|
--with-userdb=${SYSCONFDIR}/userdb --with-authuserdb \
|
|
--sysconfdir=${COURIERCONF} --with-authdaemon \
|
|
--with-authdaemonvar=${COURIERSTATE} \
|
|
--enable-workarounds-for-imap-client-bugs \
|
|
--with-db=gdbm
|
|
|
|
.if ${FLAVOR:L:Mmysql} && ${FLAVOR:L:Mldap}
|
|
ERRORS+= "Fatal: Conflicting flavor: You must choose either ldap or mysql."
|
|
.endif
|
|
|
|
.if ${FLAVOR:L:Mmysql}
|
|
CONFIGURE_ARGS+= --with-authmysql \
|
|
--with-mysql-libs=${LOCALBASE}/lib/mysql \
|
|
--with-mysql-includes=${LOCALBASE}/include/mysql
|
|
LIB_DEPENDS+= lib/mysql/mysqlclient.10:mysql-client-3.23.*:databases/mysql
|
|
.else
|
|
CONFIGURE_ARGS+= --without-authmysql
|
|
.endif
|
|
|
|
.if ${FLAVOR:L:Mldap}
|
|
CONFIGURE_ARGS+= --with-authldap
|
|
LIB_DEPENDS+= ldap.2,lber.2:openldap-client-2.*:databases/openldap
|
|
.else
|
|
CONFIGURE_ARGS+= --without-authldap
|
|
.endif
|
|
|
|
post-install:
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/courier-imap
|
|
.for i in pop3d-ssl imapd-ssl pop3d imapd
|
|
${INSTALL_DATA} ${WRKINST}${COURIERCONF}/$i.dist ${EXAMPLE_DIR}/$i
|
|
.endfor
|
|
.for i in imapd.cnf pop3d.cnf quotawarnmsg.example
|
|
${INSTALL_DATA} ${WRKINST}${COURIERCONF}/$i ${EXAMPLE_DIR}
|
|
.endfor
|
|
.if ${FLAVOR:L:Mmysql}
|
|
${INSTALL_DATA} ${WRKINST}${COURIERCONF}/authmysqlrc.dist \
|
|
${EXAMPLE_DIR}/authmysqlrc
|
|
.endif
|
|
.if ${FLAVOR:L:Mldap}
|
|
${INSTALL_DATA} ${WRKINST}${COURIERCONF}/authldaprc.dist \
|
|
${EXAMPLE_DIR}/authldaprc
|
|
.endif
|
|
${INSTALL_DATA} ${WRKINST}${COURIERCONF}/authdaemonrc.dist ${EXAMPLE_DIR}/authdaemonrc
|
|
|
|
.include <bsd.port.mk>
|
|
|
|
.if ${SUBPACKAGE} == "-pop3"
|
|
RUN_DEPENDS+= ${LOCALBASE}/bin/imapd:courier-imap-${COURIERVER}:mail/courier-imap
|
|
.endif
|