openbsd-ports/mail/courier-imap/Makefile
avsm ff3f5e6565 Update to courier-imap-1.7.1; this fixes an important assumption that
pids on openbsd can be recycled in intervals smaller than one second
(previous it assumed that they couldnt).  This prevents maildir
corruption on heavily loaded servers.

Also temporarily disable ipv6; it seems pretty broken right now.
2003-04-14 09:21:31 +00:00

121 lines
3.5 KiB
Makefile

# $OpenBSD: Makefile,v 1.34 2003/04/14 09:21:31 avsm Exp $
COMMENT= "imap server for maildir format mailboxes"
COMMENT-pop3= "pop3 server for maildir format mailboxes"
COMMENT-ldap= "ldap authentication module for courier-imap"
COMMENT-mysql= "mysql authentication module for courier-imap"
COMMENT-pgsql= "pgsql authentication module for courier-imap"
COURIERVER= 1.7.1
DISTNAME= courier-imap-${COURIERVER}
FULLPKGNAME-pop3= courier-pop3-${COURIERVER}
FULLPKGNAME-ldap= courier-ldap-${COURIERVER}
FULLPKGNAME-mysql= courier-mysql-${COURIERVER}
FULLPKGNAME-pgsql= courier-pgsql-${COURIERVER}
CATEGORIES= mail
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/}
EXTRACT_SUFX= .tar.bz2
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
MULTI_PACKAGES= -pop3
SUBPACKAGE?=
FLAVOR?=
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 --with-authpwd \
--localstatedir=${COURIERSTATE} \
--without-ipv6
# mysql
PSEUDO_FLAVORS+= no_mysql
.if ${FLAVOR:L:Mno_mysql}
CONFIGURE_ARGS+= --without-authmysql
.else
MULTI_PACKAGES+= -mysql
CONFIGURE_ARGS+= --with-authmysql \
--with-mysql-libs=${LOCALBASE}/lib/mysql \
--with-mysql-includes=${LOCALBASE}/include/mysql
MYSQL_DEPENDS+= lib/mysql/mysqlclient.10:mysql-client-3.23.*:databases/mysql
.endif
# openldap
PSEUDO_FLAVORS+= no_ldap
.if ${FLAVOR:L:Mno_ldap}
CONFIGURE_ARGS+= --without-authldap
.else
MULTI_PACKAGES+= -ldap
CONFIGURE_ARGS+= --with-authldap
LDAP_DEPENDS+= ldap.2,lber.2:openldap-client-2.*:databases/openldap
.endif
# postgresql
PSEUDO_FLAVORS+= no_pgsql
.if !${FLAVOR:L:Mno_pgsql}
MULTI_PACKAGES+= -pgsql
CONFIGURE_ARGS+= --with-pgsql-libs=${LOCALBASE}/lib \
--with-pgsql-includes=${LOCALBASE}/include/postgresql
PGSQL_DEPENDS+= pq.2::databases/postgresql
.endif
# pop3 has no dependencies
POP3_DEPENDS=
.if defined(PACKAGING) && !empty(SUBPACKAGE)
LIB_DEPENDS= ${${SUBPACKAGE:U:S/-//g}_DEPENDS}
RUN_DEPENDS= :courier-imap-${COURIERVER}:mail/courier-imap
.else
.for i in ${MULTI_PACKAGES}
LIB_DEPENDS+= ${${i:U:S/-//g}_DEPENDS}
.endfor
.endif
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/courier-imap
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/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
.for i in mysql ldap pgsql daemon
-${INSTALL_DATA} ${WRKINST}${COURIERCONF}/auth${i}rc.dist \
${EXAMPLE_DIR}/auth${i}rc
.endfor
.for i in authmysql.html authmysql.myownquery authpostgres.html ldap
-${INSTALL_DATA} ${WRKSRC}/authlib/README.${i} \
${PREFIX}/share/doc/courier-imap
.endfor
.for i in cram pwd userdb
${INSTALL_PROGRAM} ${WRKBUILD}/authlib/auth${i} \
${PREFIX}/libexec/authlib
.endfor
.include <bsd.port.mk>