2011-03-26 06:05:24 -04:00
|
|
|
# $OpenBSD: Makefile,v 1.162 2011/03/26 10:05:24 sthen Exp $
|
2006-12-02 05:34:30 -05:00
|
|
|
|
|
|
|
SHARED_ONLY= Yes
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2007-09-01 16:11:21 -04:00
|
|
|
COMMENT-server= compact IMAP/POP3 server
|
2008-09-04 04:35:43 -04:00
|
|
|
COMMENT-sieve= Sieve mail filtering for Dovecot
|
2004-05-27 12:38:30 -04:00
|
|
|
|
2010-03-23 17:32:07 -04:00
|
|
|
V_MAJOR= 1.2
|
2010-11-09 09:35:46 -05:00
|
|
|
V_DOVECOT= 1.2.16
|
2010-10-15 11:32:17 -04:00
|
|
|
V_SIEVE= 0.1.18
|
|
|
|
V_MANAGESIEVE= 0.11.12
|
2006-12-01 18:30:49 -05:00
|
|
|
|
2009-11-10 18:20:22 -05:00
|
|
|
PKGNAME= dovecot-${V_DOVECOT}
|
2010-07-20 19:49:18 -04:00
|
|
|
PKGNAME-server= dovecot-${V_DOVECOT}
|
2011-03-05 15:41:19 -05:00
|
|
|
REVISION-server=4
|
2010-07-24 05:51:12 -04:00
|
|
|
FULLPKGNAME-sieve= dovecot-sieve-${V_SIEVE}
|
2010-11-09 09:35:46 -05:00
|
|
|
REVISION-sieve= 0
|
2010-07-24 05:51:12 -04:00
|
|
|
EPOCH-sieve= 0
|
2010-02-14 15:01:00 -05:00
|
|
|
FULLPKGPATH-sieve= ${PKGPATH},-sieve
|
2006-12-01 18:30:49 -05:00
|
|
|
|
|
|
|
DISTNAME= dovecot-${V_DOVECOT}
|
2003-07-14 19:44:28 -04:00
|
|
|
CATEGORIES= mail
|
2007-09-08 04:44:39 -04:00
|
|
|
MASTER_SITES= ${HOMEPAGE}releases/${V_MAJOR}/
|
2010-03-23 17:32:07 -04:00
|
|
|
MASTER_SITES0= http://www.rename-it.nl/dovecot/${V_MAJOR}/
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2007-09-08 04:44:39 -04:00
|
|
|
DISTFILES= dovecot-${V_DOVECOT}.tar.gz \
|
2010-03-23 17:32:07 -04:00
|
|
|
dovecot-${V_MAJOR}-sieve-${V_SIEVE}.tar.gz:0 \
|
|
|
|
dovecot-${V_MAJOR}-managesieve-${V_MANAGESIEVE}.tar.gz:0 \
|
|
|
|
${DIST_MANAGESIEVE}:0
|
|
|
|
|
2010-11-13 16:28:09 -05:00
|
|
|
DIST_MANAGESIEVE= dovecot-${V_DOVECOT}-managesieve-${V_MANAGESIEVE}.diff.gz
|
2006-12-01 18:30:49 -05:00
|
|
|
|
|
|
|
HOMEPAGE= http://www.dovecot.org/
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2007-09-01 16:11:21 -04:00
|
|
|
MAINTAINER= Brad Smith <brad@comstyle.com>
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2009-01-26 09:47:02 -05:00
|
|
|
# MIT/LGPLv2.1
|
2003-07-14 19:44:28 -04:00
|
|
|
PERMIT_PACKAGE_CDROM= Yes
|
|
|
|
PERMIT_PACKAGE_FTP= Yes
|
|
|
|
PERMIT_DISTFILES_CDROM= Yes
|
|
|
|
PERMIT_DISTFILES_FTP= Yes
|
2006-12-01 18:30:49 -05:00
|
|
|
|
2010-11-06 06:18:38 -04:00
|
|
|
WANTLIB-server= ${MODLIBICONV_WANTLIB} bz2 c crypto gssapi krb5 ssl z
|
|
|
|
WANTLIB-sieve= ${MODLIBICONV_WANTLIB} c crypto ssl
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2004-08-10 05:14:47 -04:00
|
|
|
MODULES= converters/libiconv
|
2010-11-19 02:23:05 -05:00
|
|
|
LIB_DEPENDS+= archivers/bzip2
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2006-12-01 18:30:49 -05:00
|
|
|
MULTI_PACKAGES= -server
|
2006-12-01 18:57:28 -05:00
|
|
|
SUBPACKAGE?= -server
|
2006-12-01 18:30:49 -05:00
|
|
|
|
|
|
|
PSEUDO_FLAVORS= no_sieve
|
2009-01-26 09:47:02 -05:00
|
|
|
FLAVORS= bdb ldap mysql postgresql sqlite
|
2005-02-13 13:42:46 -05:00
|
|
|
FLAVOR?=
|
|
|
|
|
2008-08-19 22:07:04 -04:00
|
|
|
CFLAGS+= -I/usr/include/kerberosV -I${LOCALBASE}/include
|
|
|
|
|
2006-12-01 18:30:49 -05:00
|
|
|
USE_LIBTOOL= Yes
|
2011-03-26 06:05:24 -04:00
|
|
|
AUTOCONF_VERSION= 2.65
|
2008-04-28 05:46:07 -04:00
|
|
|
CONFIGURE_STYLE= autoconf
|
2006-12-01 18:30:49 -05:00
|
|
|
CONFIGURE_ARGS+= --localstatedir=/var \
|
2008-04-28 05:46:07 -04:00
|
|
|
--with-gssapi \
|
2008-08-19 22:07:04 -04:00
|
|
|
--with-pam=no \
|
|
|
|
--with-shadow=no \
|
|
|
|
--with-vpopmail=no
|
|
|
|
CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib"
|
2006-12-01 18:30:49 -05:00
|
|
|
|
|
|
|
.if !${FLAVOR:L:Mno_sieve}
|
2010-08-08 18:21:55 -04:00
|
|
|
# XXX The produced dovecot-sieve package ends up linked to any
|
|
|
|
# other library (database/ldap) used in the build thus producing
|
|
|
|
# bad packages in bulk build. Temporarily work around this in a
|
|
|
|
# nasty way by knocking out the sieve subpackage if another
|
|
|
|
# flavor is used. This means you have to build without FLAVORS
|
|
|
|
# to get the -sieve subpackage.
|
|
|
|
.if ${FLAVOR} == ""
|
2006-12-01 18:30:49 -05:00
|
|
|
MULTI_PACKAGES+= -sieve
|
2010-08-08 18:21:55 -04:00
|
|
|
.endif
|
2010-03-23 17:32:07 -04:00
|
|
|
SIEVE_DIR= ${WRKDIR}/dovecot-${V_MAJOR}-sieve-${V_SIEVE}
|
|
|
|
MANAGESIEVE_DIR= ${WRKDIR}/dovecot-${V_MAJOR}-managesieve-${V_MANAGESIEVE}
|
|
|
|
AUTOCONF_DIR+= ${WRKSRC} ${MANAGESIEVE_DIR}
|
2010-11-19 02:23:05 -05:00
|
|
|
RUN_DEPENDS-sieve= ${PKGPATH}
|
2006-12-07 16:49:01 -05:00
|
|
|
LIB_DEPENDS-sieve= ${MODLIBICONV_LIB_DEPENDS}
|
2010-03-23 17:32:07 -04:00
|
|
|
PATCH_LIST= patch-* managesieve-patch-*
|
|
|
|
.else
|
|
|
|
PATCH_LIST= patch-* nosieve-patch-*
|
2006-12-01 18:30:49 -05:00
|
|
|
.endif
|
|
|
|
|
2009-01-26 09:47:02 -05:00
|
|
|
.if ${FLAVOR:L:Mbdb}
|
|
|
|
CONFIGURE_ARGS+= --with-db
|
2010-11-19 02:23:05 -05:00
|
|
|
LIB_DEPENDS+= databases/db/v4
|
|
|
|
WANTLIB-server+= db>=5
|
2009-01-26 09:47:02 -05:00
|
|
|
CFLAGS+= -I${LOCALBASE}/include/db4
|
|
|
|
.endif
|
|
|
|
|
2005-10-06 13:03:21 -04:00
|
|
|
.if ${FLAVOR:L:Mldap}
|
|
|
|
CONFIGURE_ARGS+= --with-ldap
|
2010-11-19 02:23:05 -05:00
|
|
|
LIB_DEPENDS+= databases/openldap
|
2010-07-24 05:51:12 -04:00
|
|
|
WANTLIB-server+= lber ldap sasl2 asn1 com_err
|
2005-10-06 13:03:21 -04:00
|
|
|
.endif
|
|
|
|
|
2005-02-13 13:42:46 -05:00
|
|
|
.if ${FLAVOR:L:Mmysql}
|
|
|
|
CONFIGURE_ARGS+= --with-mysql
|
2010-11-19 02:23:05 -05:00
|
|
|
LIB_DEPENDS+= databases/mysql
|
|
|
|
WANTLIB-server+= m lib/mysql/mysqlclient>=10
|
2005-02-13 13:42:46 -05:00
|
|
|
.endif
|
|
|
|
|
2005-07-23 15:34:22 -04:00
|
|
|
.if ${FLAVOR:L:Mpostgresql}
|
|
|
|
CONFIGURE_ARGS+= --with-pgsql
|
2010-11-19 02:23:05 -05:00
|
|
|
LIB_DEPENDS+= databases/postgresql
|
|
|
|
WANTLIB-server+= pq>=4
|
2005-07-23 15:34:22 -04:00
|
|
|
.endif
|
|
|
|
|
2007-03-22 02:59:13 -04:00
|
|
|
.if ${FLAVOR:L:Msqlite}
|
|
|
|
CONFIGURE_ARGS+= --with-sqlite
|
2010-11-19 02:23:05 -05:00
|
|
|
LIB_DEPENDS+= databases/sqlite3
|
2010-07-24 05:51:12 -04:00
|
|
|
WANTLIB-server+= sqlite3
|
2007-03-22 02:59:13 -04:00
|
|
|
.endif
|
|
|
|
|
2006-12-01 18:30:49 -05:00
|
|
|
.if !${FLAVOR:L:Mno_sieve}
|
2010-03-23 17:32:07 -04:00
|
|
|
pre-patch:
|
2010-06-20 09:53:56 -04:00
|
|
|
@cd ${WRKSRC} && \
|
2010-03-23 17:55:38 -04:00
|
|
|
gunzip -c ${DISTDIR}/${DIST_MANAGESIEVE} | \
|
|
|
|
patch -z.managesieve.orig -p1 2> /dev/null
|
2010-03-23 17:32:07 -04:00
|
|
|
|
2006-12-01 18:30:49 -05:00
|
|
|
post-configure:
|
2010-06-20 09:53:56 -04:00
|
|
|
@(cd ${WRKSRC}; ${MAKE_PROGRAM} dovecot-config)
|
|
|
|
@(cd ${SIEVE_DIR}; ${SETENV} ${CONFIGURE_ENV} \
|
2010-03-23 17:32:07 -04:00
|
|
|
./configure --with-dovecot=${WRKSRC} \
|
2010-04-30 10:40:58 -04:00
|
|
|
--mandir=${PREFIX}/man --docdir=${PREFIX}/share/doc/)
|
2010-06-20 09:53:56 -04:00
|
|
|
@(cd ${MANAGESIEVE_DIR}; ${SETENV} ${CONFIGURE_ENV} \
|
2010-03-23 17:32:07 -04:00
|
|
|
./configure --with-dovecot=${WRKSRC} \
|
|
|
|
--with-dovecot-sieve=${SIEVE_DIR})
|
2006-12-01 18:30:49 -05:00
|
|
|
.endif
|
2005-09-04 14:22:30 -04:00
|
|
|
|
|
|
|
pre-build:
|
2008-08-19 22:07:04 -04:00
|
|
|
@${SUBST_CMD} ${WRKSRC}/dovecot-example.conf
|
2003-07-14 19:44:28 -04:00
|
|
|
|
2006-12-01 18:30:49 -05:00
|
|
|
.if !${FLAVOR:L:Mno_sieve}
|
|
|
|
post-build:
|
|
|
|
(cd ${SIEVE_DIR}; ${MAKE_PROGRAM} ${MAKE_FLAGS})
|
2010-03-23 17:32:07 -04:00
|
|
|
(cd ${MANAGESIEVE_DIR}; ${MAKE_PROGRAM} ${MAKE_FLAGS})
|
2006-12-01 18:30:49 -05:00
|
|
|
.endif
|
|
|
|
|
2003-07-14 19:44:28 -04:00
|
|
|
post-install:
|
|
|
|
${INSTALL_DATA_DIR} ${PREFIX}/share/examples/dovecot
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/doc/dovecot-openssl.cnf \
|
2007-03-24 03:29:01 -04:00
|
|
|
${WRKSRC}/doc/dovecot-sql-example.conf \
|
|
|
|
${WRKSRC}/doc/dovecot-ldap-example.conf \
|
2010-03-23 17:32:07 -04:00
|
|
|
${WRKSRC}/doc/dovecot-db-example.conf \
|
2005-09-04 14:22:30 -04:00
|
|
|
${WRKSRC}/dovecot-example.conf \
|
2010-03-23 17:32:07 -04:00
|
|
|
${WRKSRC}/doc/dovecot-dict-sql-example.conf \
|
2005-07-23 16:38:17 -04:00
|
|
|
${PREFIX}/share/examples/dovecot
|
2003-07-14 19:44:28 -04:00
|
|
|
${INSTALL_SCRIPT} ${WRKSRC}/doc/mkcert.sh \
|
|
|
|
${PREFIX}/sbin/dovecot-mkcert.sh
|
2006-12-01 18:30:49 -05:00
|
|
|
.if !${FLAVOR:L:Mno_sieve}
|
2010-03-23 17:32:07 -04:00
|
|
|
cd ${SIEVE_DIR} && env -i ${MAKE_ENV} \
|
|
|
|
PREFIX=${WRKINST}${PREFIX} ${DESTDIRNAME}=${WRKINST} \
|
|
|
|
TRUEPREFIX=${PREFIX} \
|
|
|
|
${MAKE_PROGRAM} ${ALL_FAKE_FLAGS} -f ${MAKE_FILE} ${FAKE_TARGET}
|
|
|
|
cd ${MANAGESIEVE_DIR} && env -i ${MAKE_ENV} \
|
|
|
|
PREFIX=${WRKINST}${PREFIX} ${DESTDIRNAME}=${WRKINST} \
|
|
|
|
TRUEPREFIX=${PREFIX} \
|
|
|
|
${MAKE_PROGRAM} ${ALL_FAKE_FLAGS} -f ${MAKE_FILE} ${FAKE_TARGET}
|
2006-12-01 18:30:49 -05:00
|
|
|
.endif
|
2003-07-14 19:44:28 -04:00
|
|
|
|
|
|
|
.include <bsd.port.mk>
|