2005-02-10 18:44:03 -05:00
|
|
|
# $OpenBSD: Makefile,v 1.45 2005/02/10 23:44:03 espie Exp $
|
2001-05-05 21:45:53 -04:00
|
|
|
|
|
|
|
COMMENT= "imap server for maildir format mailboxes"
|
2001-05-10 18:29:04 -04:00
|
|
|
COMMENT-pop3= "pop3 server for maildir format mailboxes"
|
2002-07-08 17:24:50 -04:00
|
|
|
COMMENT-ldap= "ldap authentication module for courier-imap"
|
|
|
|
COMMENT-mysql= "mysql authentication module for courier-imap"
|
|
|
|
COMMENT-pgsql= "pgsql authentication module for courier-imap"
|
2001-05-10 18:29:04 -04:00
|
|
|
|
2004-07-06 17:00:11 -04:00
|
|
|
MAINTAINER= David Gwynne <loki@animata.net>
|
|
|
|
|
2004-07-01 08:19:35 -04:00
|
|
|
COURIERVER= 3.0.5
|
2001-05-10 18:29:04 -04:00
|
|
|
DISTNAME= courier-imap-${COURIERVER}
|
2005-01-02 06:55:10 -05:00
|
|
|
FULLPKGNAME= courier-imap-${COURIERVER}p2
|
|
|
|
FULLPKGNAME-pop3= courier-pop3-${COURIERVER}p0
|
|
|
|
FULLPKGNAME-ldap= courier-ldap-${COURIERVER}p0
|
|
|
|
FULLPKGNAME-mysql= courier-mysql-${COURIERVER}p0
|
|
|
|
FULLPKGNAME-pgsql= courier-pgsql-${COURIERVER}p0
|
2000-07-02 23:42:55 -04:00
|
|
|
|
|
|
|
CATEGORIES= mail
|
2001-05-10 18:29:04 -04:00
|
|
|
|
2002-05-13 19:31:24 -04:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=courier/}
|
2003-02-17 11:14:34 -05:00
|
|
|
EXTRACT_SUFX= .tar.bz2
|
2000-07-02 23:42:55 -04:00
|
|
|
|
2000-08-10 17:12:48 -04:00
|
|
|
HOMEPAGE= http://www.inter7.com/courierimap/
|
2000-07-02 23:42:55 -04:00
|
|
|
|
2000-09-10 16:38:10 -04:00
|
|
|
# GPL
|
2000-07-02 23:42:55 -04:00
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
2005-01-02 06:55:10 -05:00
|
|
|
WANTLIB= c
|
2000-07-02 23:42:55 -04:00
|
|
|
|
2002-08-08 13:03:21 -04:00
|
|
|
MULTI_PACKAGES= -pop3
|
2002-04-17 12:19:39 -04:00
|
|
|
SUBPACKAGE?=
|
2002-08-08 13:03:21 -04:00
|
|
|
FLAVOR?=
|
2002-04-17 12:19:39 -04:00
|
|
|
|
2001-02-21 14:04:56 -05:00
|
|
|
COURIERCONF= ${SYSCONFDIR}/courier-imap
|
2001-03-21 22:10:48 -05:00
|
|
|
COURIERSTATE= /var/run/courier-imap
|
2001-05-10 18:29:04 -04:00
|
|
|
SUBST_VARS= COURIERSTATE COURIERCONF COURIERVER
|
2001-02-21 14:04:56 -05:00
|
|
|
EXAMPLE_DIR= ${PREFIX}/share/examples/courier-imap
|
2001-05-10 18:29:04 -04:00
|
|
|
USE_GMAKE= Yes
|
2001-02-21 14:04:56 -05:00
|
|
|
|
2005-01-02 06:55:10 -05:00
|
|
|
.if $(SUBPACKAGE) != "-pop3"
|
2001-09-30 19:15:57 -04:00
|
|
|
LIB_DEPENDS= gdbm.2::databases/gdbm
|
2005-01-02 06:55:10 -05:00
|
|
|
.endif
|
2001-09-30 19:15:57 -04:00
|
|
|
|
2001-02-21 14:04:56 -05:00
|
|
|
CONFIGURE_STYLE= gnu old
|
2001-02-27 23:55:03 -05:00
|
|
|
CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" \
|
2005-02-10 18:44:03 -05:00
|
|
|
CXXFLAGS="${CFLAGS:C/ *$//} -I${LOCALBASE}/include" \
|
|
|
|
CPPFLAGS="${CFLAGS:C/ *$//} -I${LOCALBASE}/include"
|
2001-02-01 19:22:48 -05:00
|
|
|
CONFIGURE_ARGS= --disable-root-check --datadir=${PREFIX}/sbin \
|
2001-02-27 23:55:03 -05:00
|
|
|
--with-userdb=${SYSCONFDIR}/userdb --with-authuserdb \
|
2001-03-21 22:10:48 -05:00
|
|
|
--sysconfdir=${COURIERCONF} --with-authdaemon \
|
|
|
|
--with-authdaemonvar=${COURIERSTATE} \
|
2001-09-30 19:15:57 -04:00
|
|
|
--enable-workarounds-for-imap-client-bugs \
|
2003-02-17 11:14:34 -05:00
|
|
|
--with-db=gdbm --with-authpwd \
|
2004-07-01 08:19:35 -04:00
|
|
|
--localstatedir=${COURIERSTATE}
|
2001-03-21 22:10:48 -05:00
|
|
|
|
2002-07-08 17:24:50 -04:00
|
|
|
# mysql
|
2002-08-08 13:03:21 -04:00
|
|
|
PSEUDO_FLAVORS+= no_mysql
|
|
|
|
.if ${FLAVOR:L:Mno_mysql}
|
|
|
|
CONFIGURE_ARGS+= --without-authmysql
|
|
|
|
.else
|
|
|
|
MULTI_PACKAGES+= -mysql
|
2001-10-06 18:55:48 -04:00
|
|
|
CONFIGURE_ARGS+= --with-authmysql \
|
|
|
|
--with-mysql-libs=${LOCALBASE}/lib/mysql \
|
|
|
|
--with-mysql-includes=${LOCALBASE}/include/mysql
|
2004-01-02 00:11:08 -05:00
|
|
|
MYSQL_DEPENDS+= lib/mysql/mysqlclient.10::databases/mysql
|
2005-01-02 06:55:10 -05:00
|
|
|
MYSQL_WANTLIB= crypto ssl m z
|
2002-08-08 13:03:21 -04:00
|
|
|
.endif
|
2001-03-21 22:10:48 -05:00
|
|
|
|
2002-07-08 17:24:50 -04:00
|
|
|
# openldap
|
2002-08-08 13:03:21 -04:00
|
|
|
PSEUDO_FLAVORS+= no_ldap
|
|
|
|
.if ${FLAVOR:L:Mno_ldap}
|
|
|
|
CONFIGURE_ARGS+= --without-authldap
|
|
|
|
.else
|
|
|
|
MULTI_PACKAGES+= -ldap
|
2001-05-10 18:29:04 -04:00
|
|
|
CONFIGURE_ARGS+= --with-authldap
|
2002-07-08 17:24:50 -04:00
|
|
|
LDAP_DEPENDS+= ldap.2,lber.2:openldap-client-2.*:databases/openldap
|
2002-08-08 13:03:21 -04:00
|
|
|
.endif
|
2002-07-08 17:24:50 -04:00
|
|
|
|
|
|
|
# postgresql
|
2002-08-08 13:03:21 -04:00
|
|
|
PSEUDO_FLAVORS+= no_pgsql
|
|
|
|
.if !${FLAVOR:L:Mno_pgsql}
|
|
|
|
MULTI_PACKAGES+= -pgsql
|
2002-07-08 17:24:50 -04:00
|
|
|
CONFIGURE_ARGS+= --with-pgsql-libs=${LOCALBASE}/lib \
|
|
|
|
--with-pgsql-includes=${LOCALBASE}/include/postgresql
|
2004-07-26 06:15:28 -04:00
|
|
|
PGSQL_DEPENDS+= pq.2:postgresql-client-*:databases/postgresql
|
2005-01-02 06:55:10 -05:00
|
|
|
PGSQL_WANTLIB= m
|
2002-08-08 13:03:21 -04:00
|
|
|
.endif
|
2002-07-08 17:24:50 -04:00
|
|
|
|
|
|
|
# pop3 has no dependencies
|
|
|
|
POP3_DEPENDS=
|
2001-03-21 22:10:48 -05:00
|
|
|
|
2005-01-02 06:55:10 -05:00
|
|
|
.if defined(PACKAGING)
|
|
|
|
. if !empty(SUBPACKAGE)
|
|
|
|
LIB_DEPENDS+= ${${SUBPACKAGE:U:S/-//g}_DEPENDS}
|
|
|
|
WANTLIB+= ${${SUBPACKAGE:U:S/-//g}_WANTLIB}
|
2002-07-08 17:24:50 -04:00
|
|
|
RUN_DEPENDS= :courier-imap-${COURIERVER}:mail/courier-imap
|
2005-01-02 06:55:10 -05:00
|
|
|
. else
|
|
|
|
WANTLIB+= ssl crypto
|
|
|
|
. endif
|
2002-07-08 17:24:50 -04:00
|
|
|
.else
|
|
|
|
.for i in ${MULTI_PACKAGES}
|
|
|
|
LIB_DEPENDS+= ${${i:U:S/-//g}_DEPENDS}
|
|
|
|
.endfor
|
2002-04-17 12:19:39 -04:00
|
|
|
.endif
|
|
|
|
|
2000-07-03 04:11:24 -04:00
|
|
|
post-install:
|
2000-08-10 17:12:48 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/courier-imap
|
2002-07-08 17:24:50 -04:00
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/courier-imap
|
2000-12-29 13:51:56 -05:00
|
|
|
.for i in pop3d-ssl imapd-ssl pop3d imapd
|
2001-03-21 22:10:48 -05:00
|
|
|
${INSTALL_DATA} ${WRKINST}${COURIERCONF}/$i.dist ${EXAMPLE_DIR}/$i
|
2000-12-29 13:51:56 -05:00
|
|
|
.endfor
|
2001-05-10 18:29:04 -04:00
|
|
|
.for i in imapd.cnf pop3d.cnf quotawarnmsg.example
|
2001-03-21 22:10:48 -05:00
|
|
|
${INSTALL_DATA} ${WRKINST}${COURIERCONF}/$i ${EXAMPLE_DIR}
|
2000-11-22 06:42:31 -05:00
|
|
|
.endfor
|
2002-07-08 17:24:50 -04:00
|
|
|
.for i in mysql ldap pgsql daemon
|
2002-08-19 14:54:36 -04:00
|
|
|
-${INSTALL_DATA} ${WRKINST}${COURIERCONF}/auth${i}rc.dist \
|
2002-07-08 17:24:50 -04:00
|
|
|
${EXAMPLE_DIR}/auth${i}rc
|
|
|
|
.endfor
|
|
|
|
.for i in authmysql.html authmysql.myownquery authpostgres.html ldap
|
2002-08-19 14:54:36 -04:00
|
|
|
-${INSTALL_DATA} ${WRKSRC}/authlib/README.${i} \
|
2002-07-08 17:24:50 -04:00
|
|
|
${PREFIX}/share/doc/courier-imap
|
|
|
|
.endfor
|
|
|
|
.for i in cram pwd userdb
|
|
|
|
${INSTALL_PROGRAM} ${WRKBUILD}/authlib/auth${i} \
|
|
|
|
${PREFIX}/libexec/authlib
|
|
|
|
.endfor
|
2000-07-02 23:42:55 -04:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|