aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYen-Ming Lee <leeym@FreeBSD.org>2004-01-09 02:17:48 +0000
committerYen-Ming Lee <leeym@FreeBSD.org>2004-01-09 02:17:48 +0000
commit32d0b41294a840f70235fc1cf4720c8481a408ca (patch)
treedacde4725183f815883b148e0f4cb175e9b9211b
parent58f4362057bca2e4ac0a37874d36d79ce101aa90 (diff)
downloadports-32d0b41294a840f70235fc1cf4720c8481a408ca.tar.gz
ports-32d0b41294a840f70235fc1cf4720c8481a408ca.zip
Notes
-rw-r--r--mail/dspam-devel/Makefile31
-rw-r--r--mail/dspam-devel/files/mysql.data5
-rw-r--r--mail/dspam-devel/pkg-message11
-rw-r--r--mail/dspam-devel/pkg-plist7
-rw-r--r--mail/dspam/Makefile31
-rw-r--r--mail/dspam/files/mysql.data5
-rw-r--r--mail/dspam/pkg-message11
-rw-r--r--mail/dspam/pkg-plist7
8 files changed, 104 insertions, 4 deletions
diff --git a/mail/dspam-devel/Makefile b/mail/dspam-devel/Makefile
index 920ab1471c56..f835cd659c68 100644
--- a/mail/dspam-devel/Makefile
+++ b/mail/dspam-devel/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>
diff --git a/mail/dspam-devel/files/mysql.data b/mail/dspam-devel/files/mysql.data
new file mode 100644
index 000000000000..1a48d14863f8
--- /dev/null
+++ b/mail/dspam-devel/files/mysql.data
@@ -0,0 +1,5 @@
+/tmp/mysql.sock
+
+user
+password
+database
diff --git a/mail/dspam-devel/pkg-message b/mail/dspam-devel/pkg-message
index 685b4c7cc4d0..de633fe89ee8 100644
--- a/mail/dspam-devel/pkg-message
+++ b/mail/dspam-devel/pkg-message
@@ -1,7 +1,16 @@
--------------------------------------------------------------------
- See the file %%PREFIX%%/share/doc/dspam/README for advice about
+ See the file %%DOCSDIR%%/README for advice about
how to configure DSPAM with your MTA. Examples are provided for
sendmail, exim and other popular MTAs.
+%%MYSQL%%
+%%MYSQL%% See %%DOCSDIR%%/mysql/README
+%%MYSQL%% for instructions on how to configure MySQL
+%%MYSQL%% for use with DSPAM.
+%%MYSQL%%
+%%MYSQL%% %%EXAMPLESDIR%%/mysql.data
+%%MYSQL%% contains an example configuration for use with MySQL.
+%%MYSQL%% Edit and install as
+%%MYSQL%% %%LOCALBASE%%/etc/dspam/mysql.data
--------------------------------------------------------------------
diff --git a/mail/dspam-devel/pkg-plist b/mail/dspam-devel/pkg-plist
index f97c74c4db33..7b96a428a078 100644
--- a/mail/dspam-devel/pkg-plist
+++ b/mail/dspam-devel/pkg-plist
@@ -18,5 +18,12 @@ lib/libdspam.a
@comment lib/libdspam.la
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/CHANGE
+%%PORTDOCS%%%%MYSQL%%%%DOCSDIR%%/mysql/README
+%%PORTDOCS%%%%MYSQL%%%%DOCSDIR%%/mysql/mysql_objects.sql
+%%PORTDOCS%%%%MYSQL%%%%DOCSDIR%%/mysql/virtual_users.sql
+%%PORTDOCS%%%%MYSQL%%%%DOCSDIR%%/mysql/purge.sql
+%%PORTDOCS%%%%MYSQL%%@dirrm %%DOCSDIR%%/mysql
%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%MYSQL%%%%EXAMPLESDIR%%/mysql.data
+%%MYSQL%%@dirrm %%EXAMPLESDIR%%
@dirrm etc/dspam
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>
diff --git a/mail/dspam/files/mysql.data b/mail/dspam/files/mysql.data
new file mode 100644
index 000000000000..1a48d14863f8
--- /dev/null
+++ b/mail/dspam/files/mysql.data
@@ -0,0 +1,5 @@
+/tmp/mysql.sock
+
+user
+password
+database
diff --git a/mail/dspam/pkg-message b/mail/dspam/pkg-message
index 685b4c7cc4d0..de633fe89ee8 100644
--- a/mail/dspam/pkg-message
+++ b/mail/dspam/pkg-message
@@ -1,7 +1,16 @@
--------------------------------------------------------------------
- See the file %%PREFIX%%/share/doc/dspam/README for advice about
+ See the file %%DOCSDIR%%/README for advice about
how to configure DSPAM with your MTA. Examples are provided for
sendmail, exim and other popular MTAs.
+%%MYSQL%%
+%%MYSQL%% See %%DOCSDIR%%/mysql/README
+%%MYSQL%% for instructions on how to configure MySQL
+%%MYSQL%% for use with DSPAM.
+%%MYSQL%%
+%%MYSQL%% %%EXAMPLESDIR%%/mysql.data
+%%MYSQL%% contains an example configuration for use with MySQL.
+%%MYSQL%% Edit and install as
+%%MYSQL%% %%LOCALBASE%%/etc/dspam/mysql.data
--------------------------------------------------------------------
diff --git a/mail/dspam/pkg-plist b/mail/dspam/pkg-plist
index f97c74c4db33..7b96a428a078 100644
--- a/mail/dspam/pkg-plist
+++ b/mail/dspam/pkg-plist
@@ -18,5 +18,12 @@ lib/libdspam.a
@comment lib/libdspam.la
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%%%DOCSDIR%%/CHANGE
+%%PORTDOCS%%%%MYSQL%%%%DOCSDIR%%/mysql/README
+%%PORTDOCS%%%%MYSQL%%%%DOCSDIR%%/mysql/mysql_objects.sql
+%%PORTDOCS%%%%MYSQL%%%%DOCSDIR%%/mysql/virtual_users.sql
+%%PORTDOCS%%%%MYSQL%%%%DOCSDIR%%/mysql/purge.sql
+%%PORTDOCS%%%%MYSQL%%@dirrm %%DOCSDIR%%/mysql
%%PORTDOCS%%@dirrm %%DOCSDIR%%
+%%MYSQL%%%%EXAMPLESDIR%%/mysql.data
+%%MYSQL%%@dirrm %%EXAMPLESDIR%%
@dirrm etc/dspam