summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxtraeme <xtraeme@pkgsrc.org>2005-04-14 05:32:37 +0000
committerxtraeme <xtraeme@pkgsrc.org>2005-04-14 05:32:37 +0000
commit61d2444a81fd504241d23c38d65408ad3180240e (patch)
tree85f32b02c49f2ab9c093a618dc3b187b88b0f0e0
parent786f2c42e70010f481fce38fae64a0d707bd9ebf (diff)
downloadpkgsrc-61d2444a81fd504241d23c38d65408ad3180240e.tar.gz
* Enable support for sqlite3 storage driver.
* Don't enable daemon mode globally, only for mysql/pgsql.
-rw-r--r--mail/dspam/Makefile12
-rw-r--r--mail/dspam/options.mk14
2 files changed, 20 insertions, 6 deletions
diff --git a/mail/dspam/Makefile b/mail/dspam/Makefile
index 3aaa222603b..3ae21b33796 100644
--- a/mail/dspam/Makefile
+++ b/mail/dspam/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.27 2005/04/14 04:59:14 xtraeme Exp $
+# $NetBSD: Makefile,v 1.28 2005/04/14 05:32:37 xtraeme Exp $
DISTNAME= dspam-3.4.4
CATEGORIES= mail
@@ -64,8 +64,7 @@ CONFIGURE_ARGS+= --with-dspam-home=${DSPAM_HOME} \
--with-dspam-group=${DSPAM_GROUP} \
--with-dspam-mode=${DSPAM_BINMODE} \
--with-logdir=${DSPAM_LOGDIR} \
- --sysconfdir=${PKG_SYSCONFDIR} \
- --enable-daemon
+ --sysconfdir=${PKG_SYSCONFDIR}
.include "options.mk"
.include "../../devel/pkgconfig/buildlink3.mk"
@@ -127,7 +126,7 @@ post-install:
'-s|./configure.pl.*$$||' . ${DATADIR}/${d}
.endfor
.undef d
-.for drv in mysql pgsql sqlite
+.for drv in mysql pgsql
. if !empty(DSPAM_STORAGE_DRIVER:M${drv})
${INSTALL_DATA_DIR} ${DATADIR}/${drv}
cd ${WRKSRC}/src/tools.${drv}_drv && \
@@ -135,5 +134,10 @@ post-install:
. endif
.endfor
.undef drv
+.if !empty(DSPAM_STORAGE_DRIVER:Msqlite*)
+ ${INSTALL_DATA_DIR} ${DATADIR}/sqlite
+ cd ${WRKSRC}/src/tools.sqlite_drv && \
+ ${PAX} -rwppm '-s|.*/Makefile.*$$||' . ${DATADIR}/sqlite
+.endif
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/dspam/options.mk b/mail/dspam/options.mk
index 1f4c9931e5b..62ee32be9af 100644
--- a/mail/dspam/options.mk
+++ b/mail/dspam/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.7 2005/03/21 21:35:52 xtraeme Exp $
+# $NetBSD: options.mk,v 1.8 2005/04/14 05:32:37 xtraeme Exp $
.if defined(DSPAM_DELIVERY_AGENT) && !empty(DSPAM_DELIVERY_AGENT:Mcustom)
DSPAM_DELIVERY_AGENT:= ${DSPAM_DELIVERY_AGENT_ARGS}
@@ -40,7 +40,7 @@ PKG_FAIL_REASON+= "${PKGBASE}: unknown delivery agent \`${DSPAM_DELIVERY_AGENT}'
### This is the backend database used to store the DSPAM signatures as
### well as other state information. The recommended storage driver is
### "mysql", even for small installations.
-### Possible: mysql, pgsql, bdb or sqlite
+### Possible: mysql, pgsql, bdb, sqlite or sqlite3
### Default: sqlite
###
DSPAM_STORAGE_DRIVER?= sqlite
@@ -70,10 +70,20 @@ CONFIGURE_ARGS+= --with-storage-driver=lib${BDB_TYPE}_drv
. include "../../databases/sqlite/buildlink3.mk"
CONFIGURE_ARGS+= --with-storage-driver=sqlite_drv
SQLITE_PLIST_SUBST= SQLITE=
+.elif !empty(DSPAM_STORAGE_DRIVER:Msqlite3)
+. include "../../databases/sqlite3/buildlink3.mk"
+CONFIGURE_ARGS+= --with-storage-driver=sqlite3_drv
+SQLITE_PLIST_SUBST+= SQLITE=
.else
PKG_FAIL_REASON+= "${PKGBASE}: unknown storage driver \`${DSPAM_STORAGE_DRIVER}\'"
.endif
+# daemon mode only supports MySQL and PostgreSQL
+.if !empty(DSPAM_STORAGE_DRIVER:Mmysql) || \
+ !empty(DSPAM_STORAGE_DRIVER:Mpgsql)
+CONFIGURE_ARGS+= --enable-daemon
+.endif
+
MYSQL_PLIST_SUBST?= MYSQL="@comment "
PGSQL_PLIST_SUBST?= PGSQL="@comment "
SQLITE_PLIST_SUBST?= SQLITE="@comment "