summaryrefslogtreecommitdiff
path: root/mail/dbmail
diff options
context:
space:
mode:
authorobache <obache@pkgsrc.org>2007-11-03 11:39:49 +0000
committerobache <obache@pkgsrc.org>2007-11-03 11:39:49 +0000
commit6a00ced837edb1ba760ee01df339cb5dc462f367 (patch)
tree5843f43d2a48b26fa19c4b40238b222da9e73841 /mail/dbmail
parent171c4b82b880af28c9fc63c4a54b2615cb36adfd (diff)
downloadpkgsrc-6a00ced837edb1ba760ee01df339cb5dc462f367.tar.gz
Merge with wip/dbmail.
* Honor PKG_SYSCONFDIR and VARBASE. * Added sqlite and ldap option. * Fixes PLIST when db driver != mysql. * Install more documentation. * Install initial create tables sql script files. * Rename timsieved's rc script to similar name with other scripts. Bump PKGREVISION.
Diffstat (limited to 'mail/dbmail')
-rw-r--r--mail/dbmail/DESCR2
-rw-r--r--mail/dbmail/MESSAGE12
-rw-r--r--mail/dbmail/Makefile40
-rw-r--r--mail/dbmail/PLIST58
-rw-r--r--mail/dbmail/PLIST.sieve5
-rw-r--r--mail/dbmail/distinfo2
-rw-r--r--mail/dbmail/files/dbmail.sh4
-rw-r--r--mail/dbmail/files/dbmailimapd.sh4
-rw-r--r--mail/dbmail/files/dbmaillmtpd.sh4
-rw-r--r--mail/dbmail/files/dbmailpop3d.sh4
-rw-r--r--mail/dbmail/files/dbmailtimsieved.sh (renamed from mail/dbmail/files/dbmail-timsieved.sh)8
-rw-r--r--mail/dbmail/options.mk68
12 files changed, 158 insertions, 53 deletions
diff --git a/mail/dbmail/DESCR b/mail/dbmail/DESCR
index 3142ce39496..52d8d9ab461 100644
--- a/mail/dbmail/DESCR
+++ b/mail/dbmail/DESCR
@@ -1,6 +1,6 @@
Dbmail is the name of a group of programs that enable the possibility
of storing and retrieving mail messages from a database. Currently
-MySQL and PostgreSQL can be used as database backends.
+MySQL, PostgreSQL and SQLite can be used as database backends.
DBMail is made up of several components. A normal MTA (Postfix,
SendMail, QMail, Exim) is used for accepting messages. The MTA
diff --git a/mail/dbmail/MESSAGE b/mail/dbmail/MESSAGE
new file mode 100644
index 00000000000..41628c2b79f
--- /dev/null
+++ b/mail/dbmail/MESSAGE
@@ -0,0 +1,12 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2007/11/03 11:39:49 obache Exp $
+
+Anyone upgrading from an earlier version of the dbmail should read:
+
+ ${DOCSDIR}/UPGRADING
+
+Here are migration scripts:
+
+ ${DATADIR}/sql
+
+===========================================================================
diff --git a/mail/dbmail/Makefile b/mail/dbmail/Makefile
index c0946eafae0..18f8478a7b9 100644
--- a/mail/dbmail/Makefile
+++ b/mail/dbmail/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.14 2007/10/30 22:52:42 shannonjr Exp $
+# $NetBSD: Makefile,v 1.15 2007/11/03 11:39:49 obache Exp $
#
DISTNAME= dbmail-2.2.7
+PKGREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://www.dbmail.org/download/2.2/
@@ -10,37 +11,50 @@ HOMEPAGE= http://www.dbmail.org/
COMMENT= Store and retrieve mail messages in a database
GNU_CONFIGURE= yes
-CONFIGURE_ARGS+= --with-${SQLDB}
-CONFIGURE_ARGS+= --with-pkglibdir=${PREFIX}/lib/dbmail
-USE_TOOLS+= gmake
+CONFIGURE_ARGS+= --with-logdir=${VARBASE:Q}/log
+CONFIGURE_ARGS+= --with-pkglibdir=${PREFIX:Q}/lib/dbmail
+CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR:Q}
+CONFIGURE_ARGS+= --localstatedir=${VARBASE:Q}/run
+USE_TOOLS+= gmake pkg-config
USE_LIBTOOL= yes
USE_PKGLOCALEDIR= yes
EGDIR= ${PREFIX}/share/examples/dbmail
CONF_FILES= ${EGDIR}/dbmail.conf ${PKG_SYSCONFDIR}/dbmail.conf
-RCD_SCRIPTS= dbmail dbmailimapd dbmaillmtpd dbmailpop3d dbmail-timsieved
-
-PLIST_SUBST+= SQLDB=${SQLDB:Q}
+RCD_SCRIPTS= dbmail dbmailimapd dbmaillmtpd dbmailpop3d
+DATADIR= ${PREFIX}/share/dbmail
+DOCSDIR= ${PREFIX}/share/doc/dbmail
+DOCS= AUTHORS BUGS COPYING INSTALL NEWS README
+DOCS+= README.aliases README.exim README.ldap
+DOCS+= README.postfix README.qmail README.sieve
+DOCS+= README.smtp README.solaris README.usermap
+DOCS+= THANKS UPGRADING
+
+MESSAGE_SUBST+= DOCSDIR=${DOCSDIR}
+MESSAGE_SUBST+= DATADIR=${DATADIR}
SUBST_CLASSES+= sysconf
SUBST_STAGE.sysconf= do-configure
SUBST_FILES.sysconf= man/dbmail-imapd.8 man/dbmail-lmtpd.8 man/dbmail-pop3d.8
SUBST_FILES.sysconf+= man/dbmail-smtp.1 man/dbmail-users.8 man/dbmail-util.8
-SUBST_FILES.sysconf+= dbmail.h
+SUBST_FILES.sysconf+= man/dbmail.1 man/dbmail.conf.5 man/dbmail-export.8
+SUBST_FILES.sysconf+= man/dbmail-sievecmd.8 mail/dbmail-timsieved.8
SUBST_SED.sysconf= -e 's|/etc/dbmail\.conf|${PKG_SYSCONFDIR}/dbmail.conf|g'
SUBST_MESSAGE.sysconf= Fixing sysconf paths.
-INSTALLATION_DIRS= lib man ${PKGMANDIR}/man1 ${PKGMANDIR}/man8 sbin share/examples/dbmail
+INSTALLATION_DIRS= lib ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 ${PKGMANDIR}/man8 sbin ${DOCSDIR} ${EGDIR} ${DATADIR}/sql
post-install:
${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${EGDIR}
- ${INSTALL_DATA} ${WRKSRC}/sql/mysql/migrate_from_2.0_to_2.2.mysql ${EGDIR}
- ${INSTALL_DATA} ${WRKSRC}/sql/postgresql/migrate_from_2.0_to_2.2.pgsql ${EGDIR}
-
+.for f in ${DOCS}
+ ${INSTALL_DATA} ${WRKSRC}/$f ${DOCSDIR}
+.endfor
.include "options.mk"
-.include "../../mk/pthread.buildlink3.mk"
.include "../../devel/glib2/buildlink3.mk"
+BUILDLINK_API_DEPENDS.glib2+= glib2>=2.8.0
.include "../../mail/gmime/buildlink3.mk"
+BUILDLINK_API_DEPENDS.gmime+= gmime>=2.1.19
+.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/dbmail/PLIST b/mail/dbmail/PLIST
index 8c982b29211..ad69172f102 100644
--- a/mail/dbmail/PLIST
+++ b/mail/dbmail/PLIST
@@ -1,31 +1,69 @@
-@comment $NetBSD: PLIST,v 1.5 2007/10/30 22:52:43 shannonjr Exp $
+@comment $NetBSD: PLIST,v 1.6 2007/11/03 11:39:49 obache Exp $
+${MYSQL}lib/dbmail/libmysql.la
+${PGSQL}lib/dbmail/libpgsql.la
+${SQLITE}lib/dbmail/libsqlite.la
+${LDAP}lib/dbmail/libauth_ldap.la
lib/dbmail/libauth_sql.la
lib/dbmail/libdbmail.la
-lib/dbmail/libmysql.la
+${SIEVE}lib/dbmail/libsort_sieve.la
+man/man1/dbmail.1
man/man1/dbmail-smtp.1
+man/man5/dbmail.conf.5
+man/man8/dbmail-export.8
man/man8/dbmail-imapd.8
man/man8/dbmail-lmtpd.8
man/man8/dbmail-pop3d.8
-man/man8/dbmail-users.8
-man/man8/dbmail-util.8
-man/man1/dbmail.1
-man/man5/dbmail.conf.5
-man/man8/dbmail-export.8
man/man8/dbmail-sievecmd.8
man/man8/dbmail-timsieved.8
+man/man8/dbmail-users.8
+man/man8/dbmail-util.8
+sbin/dbmail-export
sbin/dbmail-imapd
sbin/dbmail-lmtpd
sbin/dbmail-pop3d
+${SIEVE}sbin/dbmail-sievecmd
sbin/dbmail-smtp
+${SIEVE}sbin/dbmail-timsieved
sbin/dbmail-users
sbin/dbmail-util
+share/doc/dbmail/AUTHORS
+share/doc/dbmail/BUGS
+share/doc/dbmail/COPYING
+share/doc/dbmail/INSTALL
+share/doc/dbmail/NEWS
+share/doc/dbmail/README
+share/doc/dbmail/README.aliases
+share/doc/dbmail/README.exim
+share/doc/dbmail/README.ldap
+share/doc/dbmail/README.postfix
+share/doc/dbmail/README.qmail
+share/doc/dbmail/README.sieve
+share/doc/dbmail/README.smtp
+share/doc/dbmail/README.solaris
+share/doc/dbmail/README.usermap
+share/doc/dbmail/THANKS
+share/doc/dbmail/UPGRADING
share/examples/dbmail/dbmail.conf
-share/examples/dbmail/migrate_from_2.0_to_2.2.mysql
-share/examples/dbmail/migrate_from_2.0_to_2.2.pgsql
+${MYSQL}share/dbmail/sql/mysql/2_1_7-2_2_0.mysql
+${MYSQL}share/dbmail/sql/mysql/create_tables.mysql
+${MYSQL}share/dbmail/sql/mysql/migrate_from_1.x_to_2.0_innodb.mysql
+${MYSQL}share/dbmail/sql/mysql/migrate_from_2.0_to_2.2.mysql
+${MYSQL}share/dbmail/sql/mysql/update_headervalue_01.mysql
+${PGSQL}share/dbmail/sql/postgresql/2_1_7-2_2_0.pgsql
+${PGSQL}share/dbmail/sql/postgresql/create_tables.pgsql
+${PGSQL}share/dbmail/sql/postgresql/migrate_from_1.x_to_2.0.pgsql
+${PGSQL}share/dbmail/sql/postgresql/migrate_from_2.0_to_2.2.pgsql
+${SQLITE}share/dbmail/sql/sqlite/2_1_7-2_2_0.sqlite
+${SQLITE}share/dbmail/sql/sqlite/create_tables.sqlite
share/examples/rc.d/dbmail
share/examples/rc.d/dbmailimapd
share/examples/rc.d/dbmaillmtpd
share/examples/rc.d/dbmailpop3d
-share/examples/rc.d/dbmail-timsieved
+${SIEVE}share/examples/rc.d/dbmailtimsieved
@dirrm share/examples/dbmail
+${SQLITE}@dirrm share/dbmail/sql/sqlite
+${PGSQL}@dirrm share/dbmail/sql/pgsql
+${MYSQL}@dirrm share/dbmail/sql/mysql
+@dirrm share/dbmail/sql
+@dirrm share/doc/dbmail
@dirrm lib/dbmail
diff --git a/mail/dbmail/PLIST.sieve b/mail/dbmail/PLIST.sieve
deleted file mode 100644
index 079998dd31d..00000000000
--- a/mail/dbmail/PLIST.sieve
+++ /dev/null
@@ -1,5 +0,0 @@
-@comment $NetBSD: PLIST.sieve,v 1.1 2007/10/30 22:52:43 shannonjr Exp $
-lib/dbmail/libsort_sieve.la
-sbin/dbmail-export
-sbin/dbmail-sievecmd
-sbin/dbmail-timsieved
diff --git a/mail/dbmail/distinfo b/mail/dbmail/distinfo
index 456ee3570e8..fdff03482b2 100644
--- a/mail/dbmail/distinfo
+++ b/mail/dbmail/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2007/10/30 22:52:43 shannonjr Exp $
+$NetBSD: distinfo,v 1.6 2007/11/03 11:39:49 obache Exp $
SHA1 (dbmail-2.2.7.tar.gz) = 15d3bbd945ee09fdc36da6f988f2b4723bd1cc28
RMD160 (dbmail-2.2.7.tar.gz) = aac1d5a7d049b7384455b37e8380d4e57eae5164
diff --git a/mail/dbmail/files/dbmail.sh b/mail/dbmail/files/dbmail.sh
index 2c35fde03d5..1e2d8690c9a 100644
--- a/mail/dbmail/files/dbmail.sh
+++ b/mail/dbmail/files/dbmail.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: dbmail.sh,v 1.1 2005/01/09 04:17:39 schmonz Exp $
+# $NetBSD: dbmail.sh,v 1.2 2007/11/03 11:39:50 obache Exp $
#
# KEYWORD: nostart
@@ -44,7 +44,7 @@ dbmailrcd()
done
}
-COMMAND_LIST="dbmailimapd dbmailpop3d dbmaillmtpd"
+COMMAND_LIST="dbmailimapd dbmailpop3d dbmaillmtpd @TIMSIEVED@"
name="dbmail"
start_cmd="forward_commands"
diff --git a/mail/dbmail/files/dbmailimapd.sh b/mail/dbmail/files/dbmailimapd.sh
index a460a2c0886..f6fab19d67c 100644
--- a/mail/dbmail/files/dbmailimapd.sh
+++ b/mail/dbmail/files/dbmailimapd.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: dbmailimapd.sh,v 1.1 2005/01/09 04:17:39 schmonz Exp $
+# $NetBSD: dbmailimapd.sh,v 1.2 2007/11/03 11:39:50 obache Exp $
#
# PROVIDE: dbmailimap mail
@@ -12,7 +12,7 @@ name="dbmailimapd"
rcvar=${name}
required_files="@PKG_SYSCONFDIR@/dbmail.conf"
command="@PREFIX@/sbin/dbmail-imapd"
-pidfile="/var/run/dbmail-imapd.pid"
+pidfile="@VARBASE@/run/dbmail-imapd.pid"
load_rc_config $name
run_rc_command "$1"
diff --git a/mail/dbmail/files/dbmaillmtpd.sh b/mail/dbmail/files/dbmaillmtpd.sh
index e3b0d7e3e93..adfe0de14df 100644
--- a/mail/dbmail/files/dbmaillmtpd.sh
+++ b/mail/dbmail/files/dbmaillmtpd.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: dbmaillmtpd.sh,v 1.1 2005/01/09 04:17:39 schmonz Exp $
+# $NetBSD: dbmaillmtpd.sh,v 1.2 2007/11/03 11:39:50 obache Exp $
#
# PROVIDE: dbmaillmtp mail
@@ -12,7 +12,7 @@ name="dbmaillmtpd"
rcvar=${name}
required_files="@PKG_SYSCONFDIR@/dbmail.conf"
command="@PREFIX@/sbin/dbmail-lmtpd"
-pidfile="/var/run/dbmail-lmtpd.pid"
+pidfile="@VARBASE@/run/dbmail-lmtpd.pid"
load_rc_config $name
run_rc_command "$1"
diff --git a/mail/dbmail/files/dbmailpop3d.sh b/mail/dbmail/files/dbmailpop3d.sh
index c53b2985024..317a145b337 100644
--- a/mail/dbmail/files/dbmailpop3d.sh
+++ b/mail/dbmail/files/dbmailpop3d.sh
@@ -1,6 +1,6 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: dbmailpop3d.sh,v 1.1 2005/01/09 04:17:39 schmonz Exp $
+# $NetBSD: dbmailpop3d.sh,v 1.2 2007/11/03 11:39:50 obache Exp $
#
# PROVIDE: dbmailpop3 mail
@@ -12,7 +12,7 @@ name="dbmailpop3d"
rcvar=${name}
required_files="@PKG_SYSCONFDIR@/dbmail.conf"
command="@PREFIX@/sbin/dbmail-pop3d"
-pidfile="/var/run/dbmail-pop3d.pid"
+pidfile="@VARBASE@/run/dbmail-pop3d.pid"
load_rc_config $name
run_rc_command "$1"
diff --git a/mail/dbmail/files/dbmail-timsieved.sh b/mail/dbmail/files/dbmailtimsieved.sh
index 4775776806d..c3f145df579 100644
--- a/mail/dbmail/files/dbmail-timsieved.sh
+++ b/mail/dbmail/files/dbmailtimsieved.sh
@@ -1,18 +1,18 @@
#!@RCD_SCRIPTS_SHELL@
#
-# $NetBSD: dbmail-timsieved.sh,v 1.1 2007/10/30 22:52:44 shannonjr Exp $
+# $NetBSD: dbmailtimsieved.sh,v 1.1 2007/11/03 11:39:50 obache Exp $
#
-# PROVIDE: timsieved
+# PROVIDE: dbmailtimsieved mail
# REQUIRE:
. /etc/rc.subr
-name="timsieved"
+name="dbmailtimsieved"
rcvar=${name}
required_files="@PKG_SYSCONFDIR@/dbmail.conf"
command="@PREFIX@/sbin/dbmail-timsieved"
-pidfile="/var/run/dbmail-timsieved.pid"
+pidfile="@VARBASE@/run/dbmail-timsieved.pid"
load_rc_config $name
run_rc_command "$1"
diff --git a/mail/dbmail/options.mk b/mail/dbmail/options.mk
index 4d0d5100bef..2b0f34495b8 100644
--- a/mail/dbmail/options.mk
+++ b/mail/dbmail/options.mk
@@ -1,10 +1,10 @@
-# $NetBSD: options.mk,v 1.5 2007/10/30 22:52:44 shannonjr Exp $
+# $NetBSD: options.mk,v 1.6 2007/11/03 11:39:50 obache Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.dbmail
-PKG_SUPPORTED_OPTIONS= sieve
+PKG_SUPPORTED_OPTIONS= ldap sieve
PKG_OPTIONS_REQUIRED_GROUPS= sql
-PKG_OPTIONS_GROUP.sql= mysql pgsql
-PKG_SUGGESTED_OPTIONS= mysql
+PKG_OPTIONS_GROUP.sql= mysql pgsql sqlite
+PKG_SUGGESTED_OPTIONS= mysql sieve
.include "../../mk/bsd.options.mk"
@@ -13,7 +13,11 @@ PKG_SUGGESTED_OPTIONS= mysql
###
.if !empty(PKG_OPTIONS:Mmysql)
.include "../../mk/mysql.buildlink3.mk"
-SQLDB= mysql
+CONFIGURE_ARGS+= --with-mysql
+PLIST_SUBST+= MYSQL=""
+INSTALLATION_DIRS+= ${DATADIR:Q}/sql/mysql
+.else
+PLIST_SUBST+= MYSQL="@comment "
.endif
###
@@ -21,16 +25,58 @@ SQLDB= mysql
###
.if !empty(PKG_OPTIONS:Mpgsql)
.include "../../mk/pgsql.buildlink3.mk"
-SQLDB= pgsql
+CONFIGURE_ARGS+= --with-pgsql
+PLIST_SUBST+= PGSQL=""
+INSTALLATION_DIRS+= ${DATADIR:Q}/sql/pgsql
+.else
+PLIST_SUBST+= PGSQL="@comment "
.endif
###
-### libsieve support
+### SQLite database support
+###
+.if !empty(PKG_OPTIONS:Msqlite)
+.include "../../databases/sqlite3/buildlink3.mk"
+CONFIGURE_ARGS+= --with-sqlite
+PLIST_SUBST+= SQLITE=""
+INSTALLATION_DIRS+= ${DATADIR:Q}/sql/sqlite
+.else
+PLIST_SUBST+= SQLITE="@comment "
+.endif
+
+###
+### Sieve support
###
-PLIST_SRC= ${.CURDIR}/PLIST
.if !empty(PKG_OPTIONS:Msieve)
-CONFIGURE_ARGS+= --with-sieve=${BUILDLINK_PREFIX.libsieve}
-PLIST_SRC+= ${.CURDIR}/PLIST.sieve
.include "../../mail/libsieve/buildlink3.mk"
-.include "../../mail/gmime/buildlink3.mk"
+CONFIGURE_ARGS+= --with-sieve=${BUILDLINK_PREFIX.libsieve:Q}
+PLIST_SUBST+= SIEVE=""
+FILES_SUBST+= TIMSIEVED="dbmailtimsieved"
+RCD_SCRIPTS+= dbmailtimsieved
+.else
+PLIST_SUBST+= SIEVE="@comment "
+FILES_SUBST+= TIMSIEVED=""
+.endif
+
+###
+### LDAP support
+###
+.if !empty(PKG_OPTIONS:Mldap)
+.include "../../databases/openldap-client/buildlink3.mk"
+CONFIGURE_ARGS+= --with-ldap=${BUILDLINK_PREFIX.openldap-client:Q}
+PLIST_SUBST+= LDAP=""
+.else
+PLIST_SUBST+= LDAP="@comment "
.endif
+
+###
+### Migration scripts
+###
+post-install: dbmail-install-scripts
+
+dbmail-install-scripts:
+.for d in ${PKG_OPTIONS_GROUP.sql}
+. if !empty(PKG_OPTIONS:M${d})
+ ${INSTALL_DATA} ${WRKSRC:Q}/sql/$d/* ${DATADIR:Q}/sql/$d
+. endif
+.endfor