2003-10-07 03:17:49 +02:00
|
|
|
# New ports collection makefile for: dbmail
|
|
|
|
# Date created: 07/26/2003
|
|
|
|
# Whom: Clement Laforet <sheepkiller@cultdeadsheep.org>
|
|
|
|
#
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
|
|
|
|
PORTNAME= dbmail
|
2005-06-18 23:34:54 +02:00
|
|
|
PORTVERSION= 2.0.4
|
2003-10-07 03:17:49 +02:00
|
|
|
CATEGORIES= mail
|
2004-07-13 15:44:15 +02:00
|
|
|
MASTER_SITES= http://www.dbmail.org/download/
|
2003-10-07 03:17:49 +02:00
|
|
|
PKGNAMESUFFIX= -${DATABASE}
|
|
|
|
EXTRACT_SUFX= .tgz
|
|
|
|
|
2004-10-24 02:23:04 +02:00
|
|
|
MAINTAINER= seanc@FreeBSD.org
|
2003-10-07 03:17:49 +02:00
|
|
|
COMMENT= An SQL database-based mail system (POP3 and IMAP)
|
|
|
|
|
|
|
|
USE_REINPLACE= YES
|
|
|
|
GNU_CONFIGURE= YES
|
|
|
|
CONFIGURE_ARGS= --prefix=${PREFIX}
|
|
|
|
USE_GMAKE= YES
|
2003-10-14 01:57:18 +02:00
|
|
|
USE_OPENSSL= YES
|
2003-10-07 03:17:49 +02:00
|
|
|
|
2004-10-28 00:29:19 +02:00
|
|
|
CFLAGS += -fPIC
|
2004-11-10 10:21:45 +01:00
|
|
|
|
|
|
|
SED_SCRIPT+= -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \
|
|
|
|
-e 's|%%PREFIX%%|${PREFIX}|g' \
|
|
|
|
-e 's|%%RC_DIR%%|${RC_DIR}|g' \
|
|
|
|
-e 's|%%RC_SUFX%%|${RC_SUFX}|g'
|
|
|
|
|
2004-06-02 12:27:53 +02:00
|
|
|
.if defined(WITH_POSTGRESQL)
|
2003-10-07 03:17:49 +02:00
|
|
|
CONFIGURE_ARGS+= --with-pgsql
|
2005-01-31 01:35:55 +01:00
|
|
|
USE_PGSQL= yes
|
2003-10-07 03:17:49 +02:00
|
|
|
DATABASE= postgresql
|
|
|
|
PLIST_SUB+= PGSQL=""
|
|
|
|
PLIST_SUB+= MYSQL="@comment "
|
2003-10-14 01:57:18 +02:00
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib/
|
2003-10-07 03:17:49 +02:00
|
|
|
.else
|
|
|
|
USE_MYSQL= YES
|
|
|
|
CONFIGURE_ARGS+= --with-mysql
|
|
|
|
DATABASE= mysql
|
|
|
|
PLIST_SUB+= MYSQL=""
|
|
|
|
PLIST_SUB+= PGSQL="@comment "
|
2003-10-14 01:57:18 +02:00
|
|
|
CFLAGS+= -I${LOCALBASE}/include/mysql
|
|
|
|
LDFLAGS+= -L${LOCALBASE}/lib/mysql
|
2003-10-07 03:17:49 +02:00
|
|
|
.endif
|
|
|
|
|
2003-10-14 01:57:18 +02:00
|
|
|
CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" LOCALBASE=${LOCALBASE}
|
2004-06-29 19:24:15 +02:00
|
|
|
PORTDOCS= INSTALL README EXTRAS
|
2003-12-19 10:54:18 +01:00
|
|
|
|
2004-10-24 02:23:04 +02:00
|
|
|
MAN1= dbmail-smtp.1
|
|
|
|
MAN8= dbmail-imapd.8 dbmail-lmtpd.8 dbmail-pop3d.8 \
|
|
|
|
dbmail-users.8 dbmail-util.8
|
2003-12-19 10:54:18 +01:00
|
|
|
MANCOMPRESSED= no
|
2003-10-07 03:17:49 +02:00
|
|
|
|
|
|
|
pre-everything::
|
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} "You may use the following build options:"
|
|
|
|
@${ECHO} " By default dbmail uses MySQL backend database."
|
|
|
|
@${ECHO} " To build dbmail with PostgreSQL as backend database,"
|
2004-06-02 12:27:53 +02:00
|
|
|
@${ECHO} " define WITH_POSTGRESQL"
|
2003-10-07 03:17:49 +02:00
|
|
|
@${ECHO} ""
|
|
|
|
|
2004-02-03 11:28:57 +01:00
|
|
|
post-patch:
|
2005-06-18 23:34:54 +02:00
|
|
|
@${FIND} ${WRKSRC} -name CVS -type d | ${XARGS} ${RM} -fr
|
2004-02-03 11:28:57 +01:00
|
|
|
|
2003-10-07 03:17:49 +02:00
|
|
|
post-configure:
|
|
|
|
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
|
2004-01-16 02:48:12 +01:00
|
|
|
${WRKSRC}/dbmail.h
|
2003-10-07 03:17:49 +02:00
|
|
|
|
2004-11-10 10:21:45 +01:00
|
|
|
post-build:
|
|
|
|
.for f in imap lmtp pop3
|
|
|
|
@${SED} ${SED_SCRIPT} ${FILESDIR}/dbmail-${f}d.sh > ${WRKDIR}/dbmail-${f}d.sh
|
|
|
|
.endfor
|
|
|
|
|
2003-10-07 03:17:49 +02:00
|
|
|
post-install:
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
|
2004-11-10 10:21:45 +01:00
|
|
|
.for f in imap lmtp pop3
|
|
|
|
@${INSTALL_SCRIPT} ${WRKDIR}/dbmail-${f}d.sh ${DESTDIR}${PREFIX}/etc/rc.d/dbmail-${f}d.sh
|
|
|
|
.endfor
|
2003-10-07 03:17:49 +02:00
|
|
|
@${MKDIR} ${DATADIR}/sql
|
|
|
|
@${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
|
2003-12-19 10:54:18 +01:00
|
|
|
@cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
|
2003-10-08 18:24:22 +02:00
|
|
|
.if !defined(NOPORTDOCS)
|
2003-10-07 03:17:49 +02:00
|
|
|
@${MKDIR} ${DOCSDIR}
|
2003-12-19 10:54:18 +01:00
|
|
|
@cd ${WRKSRC} && ${INSTALL_DATA} ${PORTDOCS} ${DOCSDIR}
|
2003-10-07 03:17:49 +02:00
|
|
|
.endif
|
2004-10-24 02:23:04 +02:00
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} "IMPORTANT NOTE FOR ADMINS UPGRADING FROM 1.X->2.X!!!"
|
|
|
|
@${ECHO} ""
|
|
|
|
@${ECHO} " *) Don't forget to update the database using a script from"
|
|
|
|
@${ECHO} " ${DATADIR}/sql/"
|
|
|
|
@${ECHO} " *) Many programs have been renamed and their arguments changed."
|
|
|
|
@${ECHO} " *) Read the upgrading notes."
|
|
|
|
@${ECHO} " *) Don't be careless with this upgrade or mail will be lost!"
|
2004-11-10 10:21:45 +01:00
|
|
|
@${ECHO} " *) dbmail can be controled by setting dbmail_imapd_enable,"
|
|
|
|
@${ECHO} " dbmail_lmtpd_enable, and/or dbmail_pop3d_enable in"
|
|
|
|
@${ECHO} " /etc/rc.conf."
|
|
|
|
@${ECHO} ""
|
|
|
|
|
2003-10-07 03:17:49 +02:00
|
|
|
.include <bsd.port.mk>
|