aboutsummaryrefslogtreecommitdiffstats
path: root/mail/dspam/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'mail/dspam/Makefile')
-rw-r--r--mail/dspam/Makefile31
1 files changed, 30 insertions, 1 deletions
diff --git a/mail/dspam/Makefile b/mail/dspam/Makefile
index 920ab1471c56..f835cd659c68 100644
--- a/mail/dspam/Makefile
+++ b/mail/dspam/Makefile
@@ -7,6 +7,7 @@
PORTNAME= dspam
PORTVERSION= 2.8.1
+PORTREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://www.nuclearelephant.com/projects/dspam/sources/
@@ -20,16 +21,24 @@ INSTALLS_SHLIB= yes
USE_LIBTOOL= yes
USE_REINPLACE= yes
+SED_SCRIPT= -e 's,%%DOCSDIR%%,${DOCSDIR},g' \
+ -e 's,%%EXAMPLESDIR%%,${EXAMPLESDIR},g' \
+ -e 's,%%LOCALBASE%%,${LOCALBASE},g'
+
.if defined(WITH_MYSQL)
USE_MYSQL= yes
CONFIGURE_ARGS+= --with-storage-driver=mysql_drv \
--with-mysql-includes=${LOCALBASE}/include/mysql \
--with-mysql-libraries=${LOCALBASE}/lib/mysql
PLIST_SUB+= DB4="@comment "
+PLIST_SUB+= MYSQL=""
+SED_SCRIPT+= -e 's,%%MYSQL%%,,g'
.else
LIB_DEPENDS= db41.1:${PORTSDIR}/databases/db41
CONFIGURE_ARGS+= --with-db4-includes=${LOCALBASE}/include/db41
PLIST_SUB+= DB4=""
+PLIST_SUB+= MYSQL="@comment "
+SED_SCRIPT+= -e '/%%MYSQL%%/D'
.endif
.if defined(WITH_MAILDROP)
@@ -42,6 +51,14 @@ RUN_DEPENDS= procmail:${PORTSDIR}/mail/procmail
CONFIGURE_ARGS+= --with-local-delivery-agent='${LOCALBASE}/bin/procmail $u'
.endif
+.if defined(WITH_QMAIL)
+CONFIGURE_ARGS+= --with-dspam-mode=4511
+.endif
+
+.if defined(ENABLE_SPAM_DELIVERY)
+CONFIGURE_ARGS+= --enable-spam-delivery
+.endif
+
post-patch:
@${REINPLACE_CMD} -e 's|%%LIBTOOLFLAGS%%|${LIBTOOLFLAGS}|g ; \
s|-ldb-4.1|-ldb41|g' ${WRKSRC}/configure
@@ -51,7 +68,19 @@ post-install:
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/README ${WRKSRC}/CHANGE \
${DOCSDIR}
+.if defined(WITH_MYSQL)
+ @${MKDIR} ${DOCSDIR}/mysql
+ @${INSTALL_DATA} ${WRKSRC}/tools.mysql_drv/README \
+ ${WRKSRC}/tools.mysql_drv/mysql_objects.sql \
+ ${WRKSRC}/tools.mysql_drv/virtual_users.sql \
+ ${WRKSRC}/tools.mysql_drv/purge.sql \
+ ${DOCSDIR}/mysql
+ @${MKDIR} ${EXAMPLESDIR}
+.endif
+.endif
+.if defined(WITH_MYSQL)
+ @${INSTALL_DATA} ${FILESDIR}/mysql.data ${EXAMPLESDIR}
.endif
- @${SED} -e 's,%%PREFIX%%,${PREFIX},g' ${PKGMESSAGE}
+ @${SED} ${SED_SCRIPT} ${PKGMESSAGE}
.include <bsd.port.mk>