2012-10-17 19:54:34 +02:00
|
|
|
# Created by: Clement Laforet <sheepkiller@cultdeadsheep.org>
|
2003-10-07 03:17:49 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= dbmail
|
2013-09-14 08:51:08 +02:00
|
|
|
PORTVERSION= 3.1.6
|
2003-10-07 03:17:49 +02:00
|
|
|
CATEGORIES= mail
|
2013-07-25 21:58:17 +02:00
|
|
|
MASTER_SITES= http://www.dbmail.org/download/3.1/
|
2003-10-07 03:17:49 +02:00
|
|
|
|
2012-03-18 20:17:12 +01:00
|
|
|
MAINTAINER= ahicks@p-o.co.uk
|
2013-07-25 21:58:17 +02:00
|
|
|
COMMENT= SQL database-based mail system (POP3 and IMAP)
|
2003-10-07 03:17:49 +02:00
|
|
|
|
2012-03-18 20:17:12 +01:00
|
|
|
LICENSE= GPLv2
|
2006-11-23 17:05:39 +01:00
|
|
|
|
2013-08-24 00:10:03 +02:00
|
|
|
LIB_DEPENDS= libgmime-2.6.so:${PORTSDIR}/mail/gmime26 \
|
|
|
|
libzdb.so:${PORTSDIR}/databases/libzdb \
|
|
|
|
libmhash.so:${PORTSDIR}/security/mhash \
|
|
|
|
libevent-2.0.so:${PORTSDIR}/devel/libevent2
|
|
|
|
|
|
|
|
BUILD_DEPENDS+= asciidoc:${PORTSDIR}/textproc/asciidoc \
|
|
|
|
xmlto:${PORTSDIR}/textproc/xmlto \
|
2013-09-14 08:51:08 +02:00
|
|
|
${LOCALBASE}/share/sgml/docbook/4.5/docbookx.dtd:${PORTSDIR}/textproc/docbook-450
|
2012-03-18 20:17:12 +01:00
|
|
|
|
2012-10-17 19:54:34 +02:00
|
|
|
CONFLICTS= dbmail-2.*
|
2006-11-23 17:05:39 +01:00
|
|
|
|
2012-06-04 05:01:54 +02:00
|
|
|
OPTIONS_DEFINE= LDAP SIEVE THREADS
|
|
|
|
OPTIONS_DEFAULT= THREADS
|
2012-10-17 19:54:34 +02:00
|
|
|
SIEVE_DESC= Build with support for Sieve mail sorting language
|
2006-11-23 17:05:39 +01:00
|
|
|
|
2013-07-25 21:58:17 +02:00
|
|
|
USE_AUTOTOOLS= libtool autoheader autoconf
|
2006-11-23 17:05:39 +01:00
|
|
|
USE_LDCONFIG= ${PREFIX}/lib/dbmail
|
2012-03-18 20:17:12 +01:00
|
|
|
USE_RC_SUBR= dbmail-pop3d dbmail-lmtpd dbmail-imapd dbmail-timsieved
|
|
|
|
USE_OPENSSL= yes
|
2013-09-02 22:02:01 +02:00
|
|
|
USES= gmake shebangfix pkgconfig
|
2013-05-25 20:57:44 +02:00
|
|
|
SHEBANG_FILES= man/fixsp.pl
|
2006-11-23 17:05:39 +01:00
|
|
|
|
2013-08-24 00:10:03 +02:00
|
|
|
CFLAGS+= -fPIC ${PTHREAD_CFLAGS}
|
2012-06-04 05:01:54 +02:00
|
|
|
CPPFLAGS+= -I${LOCALBASE}/include
|
2006-11-23 17:05:39 +01:00
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib ${PTHREAD_LIBS}
|
2012-03-18 20:17:12 +01:00
|
|
|
CONFIGURE_ARGS+= --with-zdb=${LOCALBASE} --sysconfdir=${LOCALBASE}/etc
|
2007-07-23 11:36:51 +02:00
|
|
|
MAKE_ARGS+= mandir=${MANPREFIX}/man
|
2003-10-07 03:17:49 +02:00
|
|
|
|
2012-03-18 20:17:12 +01:00
|
|
|
PORTDOCS= AUTHORS BUGS INSTALL THANKS UPGRADING
|
2013-09-02 22:02:01 +02:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2012-10-17 19:54:34 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2012-03-18 20:17:12 +01:00
|
|
|
MAN1= dbmail-deliver.1 dbmail.1
|
2006-11-23 17:05:39 +01:00
|
|
|
MAN5= dbmail.conf.5
|
2012-03-18 20:17:12 +01:00
|
|
|
MAN8= dbmail-export.8 dbmail-httpd.8 dbmail-imapd.8 \
|
|
|
|
dbmail-lmtpd.8 dbmail-pop3d.8 dbmail-sievecmd.8 \
|
|
|
|
dbmail-timsieved.8 dbmail-users.8 dbmail-util.8
|
|
|
|
.endif
|
|
|
|
|
|
|
|
DBMAIL_USER?= mailnull
|
|
|
|
DBMAIL_GROUP?= mail
|
|
|
|
PIDDIR?= /var/run/dbmail
|
|
|
|
|
|
|
|
PLIST_SUB+= DBMAIL_USER="${DBMAIL_USER}" \
|
|
|
|
DBMAIL_GROUP="${DBMAIL_GROUP}" \
|
|
|
|
PIDDIR="${PIDDIR}"
|
2006-11-23 17:05:39 +01:00
|
|
|
|
2012-10-17 19:54:34 +02:00
|
|
|
.if empty(PORT_OPTIONS:MDOCS)
|
2006-11-23 17:05:39 +01:00
|
|
|
PLIST_SUB+= PORTDOCS="@comment "
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= PORTDOCS=""
|
|
|
|
.endif
|
|
|
|
|
2012-06-24 21:19:06 +02:00
|
|
|
.if ${PORT_OPTIONS:MSIEVE}
|
2012-03-18 20:17:12 +01:00
|
|
|
CONFIGURE_ARGS+=--with-sieve=${LOCALBASE}
|
2013-08-24 00:10:03 +02:00
|
|
|
LIB_DEPENDS+= libsieve.so:${PORTSDIR}/mail/libsieve
|
2006-11-23 17:05:39 +01:00
|
|
|
PLIST_SUB+= SIEVE=""
|
|
|
|
.else
|
2012-06-24 21:19:06 +02:00
|
|
|
CONFIGURE_ARGS+=--without-sieve
|
2006-11-23 17:05:39 +01:00
|
|
|
PLIST_SUB+= SIEVE="@comment "
|
|
|
|
.endif
|
2003-12-19 10:54:18 +01:00
|
|
|
|
2012-06-24 21:19:06 +02:00
|
|
|
.if ${PORT_OPTIONS:MLDAP}
|
2012-03-18 20:17:12 +01:00
|
|
|
CONFIGURE_ARGS+=--with-ldap=${LOCALBASE}
|
2006-11-23 17:05:39 +01:00
|
|
|
USE_OPENLDAP= yes
|
2007-03-16 12:23:59 +01:00
|
|
|
PLIST_SUB+= LDAP=""
|
|
|
|
.else
|
2012-06-24 21:19:06 +02:00
|
|
|
CONFIGURE_ARGS+=--without-ldap
|
2007-03-16 12:23:59 +01:00
|
|
|
PLIST_SUB+= LDAP="@comment "
|
2006-11-23 17:05:39 +01:00
|
|
|
.endif
|
2003-10-07 03:17:49 +02:00
|
|
|
|
2012-06-24 21:19:06 +02:00
|
|
|
.if ${PORT_OPTIONS:MTHREADS}
|
2012-06-04 05:01:54 +02:00
|
|
|
EXTRA_PATCHES= ${FILESDIR}/extra-patch-acinclude.m4
|
|
|
|
.endif
|
|
|
|
|
2012-10-17 19:54:34 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2012-03-18 20:17:12 +01:00
|
|
|
CONFIGURE_ARGS+= --enable-manpages
|
2006-11-23 17:05:39 +01:00
|
|
|
.endif
|
2003-10-07 03:17:49 +02:00
|
|
|
|
|
|
|
post-install:
|
2006-11-23 17:05:39 +01:00
|
|
|
@${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
|
|
|
|
@if [ ! -f ${PREFIX}/etc/dbmail.conf ] ; then \
|
2012-03-18 20:17:12 +01:00
|
|
|
${CP} -p ${PREFIX}/etc/dbmail.conf-dist ${PREFIX}/etc/dbmail.conf; \
|
2006-11-23 17:05:39 +01:00
|
|
|
fi
|
|
|
|
@${MKDIR} ${DATADIR}
|
2012-03-18 20:17:12 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/dbmail.schema ${DATADIR}
|
|
|
|
@for f in mysql oracle postgresql sqlite; do \
|
|
|
|
${MKDIR} ${DATADIR}/$$f ; \
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/sql/$$f/* ${DATADIR}/$$f; \
|
2006-11-23 17:05:39 +01:00
|
|
|
done
|
2012-03-18 20:17:12 +01:00
|
|
|
@${MKDIR} ${PIDDIR}
|
|
|
|
@${CHOWN} ${DBMAIL_USER}:${DBMAIL_GROUP} ${PIDDIR}
|
2012-10-17 19:54:34 +02:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2003-10-07 03:17:49 +02:00
|
|
|
@${MKDIR} ${DOCSDIR}
|
2006-11-23 17:05:39 +01:00
|
|
|
@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
|
2012-03-18 20:17:12 +01:00
|
|
|
@(cd ${WRKSRC}/doc && ${COPYTREE_SHARE} * ${DOCSDIR})
|
2003-10-07 03:17:49 +02:00
|
|
|
.endif
|
2006-11-23 17:05:39 +01:00
|
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
|
2012-06-24 21:19:06 +02:00
|
|
|
.include <bsd.port.mk>
|