summaryrefslogtreecommitdiff
path: root/mail/dbmail
diff options
context:
space:
mode:
authorschmonz <schmonz@pkgsrc.org>2005-01-09 04:17:39 +0000
committerschmonz <schmonz@pkgsrc.org>2005-01-09 04:17:39 +0000
commitac4530442a1d612a1f72223a16aed24eb0532080 (patch)
tree0845d923c7740ba8004816d0415efe0b1f5ab814 /mail/dbmail
parenta17000e50b6a8242f7a5cf545836b39b018f1342 (diff)
downloadpkgsrc-ac4530442a1d612a1f72223a16aed24eb0532080.tar.gz
A config file and some rc.d scripts might help. Bump PKGREVISION.
Diffstat (limited to 'mail/dbmail')
-rw-r--r--mail/dbmail/Makefile18
-rw-r--r--mail/dbmail/PLIST4
-rw-r--r--mail/dbmail/files/dbmail.sh60
-rw-r--r--mail/dbmail/files/dbmailimapd.sh18
-rw-r--r--mail/dbmail/files/dbmaillmtpd.sh18
-rw-r--r--mail/dbmail/files/dbmailpop3d.sh18
6 files changed, 131 insertions, 5 deletions
diff --git a/mail/dbmail/Makefile b/mail/dbmail/Makefile
index 4b958e70fc8..376382d6df4 100644
--- a/mail/dbmail/Makefile
+++ b/mail/dbmail/Makefile
@@ -1,20 +1,26 @@
-# $NetBSD: Makefile,v 1.1.1.1 2005/01/09 03:21:07 schmonz Exp $
+# $NetBSD: Makefile,v 1.2 2005/01/09 04:17:39 schmonz Exp $
#
DISTNAME= dbmail-2.0.1
+PKGREVISION= 1
CATEGORIES= mail
MASTER_SITES= http://www.dbmail.org/download/
EXTRACT_SUFX= .tgz
MAINTAINER= schmonz@NetBSD.org
HOMEPAGE= http://www.dbmail.org/
-COMMENT= Store and retrieve mail messages from a database
+COMMENT= Store and retrieve mail messages in a database
-USE_BUILDLINK3= yes
-USE_PKGLOCALEDIR= yes
GNU_CONFIGURE= yes
+USE_BUILDLINK3= yes
USE_GNU_TOOLS+= make
USE_LIBTOOL= yes
+USE_PKGINSTALL= yes
+USE_PKGLOCALEDIR= yes
+
+EGDIR= ${PREFIX}/share/examples/dbmail
+CONF_FILES= ${EGDIR}/dbmail.conf ${PKG_SYSCONFDIR}/dbmail.conf
+RCD_SCRIPTS= dbmail dbmailimapd dbmaillmtpd dbmailpop3d
PLIST_SUBST+= SQLDB=${SQLDB}
@@ -26,6 +32,10 @@ SUBST_FILES.sysconf+= dbmail.h
SUBST_SED.sysconf= -e 's|/etc/dbmail\.conf|${PKG_SYSCONFDIR}/dbmail.conf|g'
SUBST_MESSAGE.sysconf= "Fixing sysconf paths."
+INSTALLATION_DIRS= lib man man/man1 man/man8 sbin share/examples/dbmail
+post-install:
+ ${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${EGDIR}
+
.include "options.mk"
.include "../../mk/bsd.pkg.mk"
diff --git a/mail/dbmail/PLIST b/mail/dbmail/PLIST
index 811b7d22e59..acbd959c41d 100644
--- a/mail/dbmail/PLIST
+++ b/mail/dbmail/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2005/01/09 03:21:07 schmonz Exp $
+@comment $NetBSD: PLIST,v 1.2 2005/01/09 04:17:39 schmonz Exp $
lib/dbmail/libauthdbmail.la
lib/dbmail/lib${SQLDB}dbmail.la
lib/dbmail/libsortdbmail.la
@@ -15,4 +15,6 @@ sbin/dbmail-pop3d
sbin/dbmail-smtp
sbin/dbmail-users
sbin/dbmail-util
+share/examples/dbmail/dbmail.conf
+@dirrm share/examples/dbmail
@dirrm lib/dbmail
diff --git a/mail/dbmail/files/dbmail.sh b/mail/dbmail/files/dbmail.sh
new file mode 100644
index 00000000000..2c35fde03d5
--- /dev/null
+++ b/mail/dbmail/files/dbmail.sh
@@ -0,0 +1,60 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: dbmail.sh,v 1.1 2005/01/09 04:17:39 schmonz Exp $
+#
+
+# KEYWORD: nostart
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+rcd_dir=`@DIRNAME@ $0`
+
+# NOTE: run_rc_command sets $rc_arg
+#
+forward_commands()
+{
+ # Backward compat with NetBSD <1.6:
+ [ -z "$rc_arg" ] && rc_arg=$_arg
+
+ for file in $COMMAND_LIST; do
+ $rcd_dir/$file $rc_arg
+ done
+}
+
+reverse_commands()
+{
+ # Backward compat with NetBSD <1.6:
+ [ -z "$rc_arg" ] && rc_arg=$_arg
+
+ REVCOMMAND_LIST=
+ for file in $COMMAND_LIST; do
+ REVCOMMAND_LIST="$file $REVCOMMAND_LIST"
+ done
+ for file in $REVCOMMAND_LIST; do
+ $rcd_dir/$file $rc_arg
+ done
+}
+
+dbmailrcd()
+{
+ for service in $@; do
+ $rcd_dir/dbmail${service} $rc_arg
+ done
+}
+
+COMMAND_LIST="dbmailimapd dbmailpop3d dbmaillmtpd"
+
+name="dbmail"
+start_cmd="forward_commands"
+stop_cmd="reverse_commands"
+status_cmd="forward_commands"
+extra_commands="status"
+
+if [ -f /etc/rc.subr ]; then
+ run_rc_command "$1"
+else
+ _arg="$1"
+ ${start_cmd}
+fi
diff --git a/mail/dbmail/files/dbmailimapd.sh b/mail/dbmail/files/dbmailimapd.sh
new file mode 100644
index 00000000000..a460a2c0886
--- /dev/null
+++ b/mail/dbmail/files/dbmailimapd.sh
@@ -0,0 +1,18 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: dbmailimapd.sh,v 1.1 2005/01/09 04:17:39 schmonz Exp $
+#
+
+# PROVIDE: dbmailimap mail
+# REQUIRE:
+
+. /etc/rc.subr
+
+name="dbmailimapd"
+rcvar=${name}
+required_files="@PKG_SYSCONFDIR@/dbmail.conf"
+command="@PREFIX@/sbin/dbmail-imapd"
+pidfile="/var/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
new file mode 100644
index 00000000000..e3b0d7e3e93
--- /dev/null
+++ b/mail/dbmail/files/dbmaillmtpd.sh
@@ -0,0 +1,18 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: dbmaillmtpd.sh,v 1.1 2005/01/09 04:17:39 schmonz Exp $
+#
+
+# PROVIDE: dbmaillmtp mail
+# REQUIRE:
+
+. /etc/rc.subr
+
+name="dbmaillmtpd"
+rcvar=${name}
+required_files="@PKG_SYSCONFDIR@/dbmail.conf"
+command="@PREFIX@/sbin/dbmail-lmtpd"
+pidfile="/var/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
new file mode 100644
index 00000000000..c53b2985024
--- /dev/null
+++ b/mail/dbmail/files/dbmailpop3d.sh
@@ -0,0 +1,18 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: dbmailpop3d.sh,v 1.1 2005/01/09 04:17:39 schmonz Exp $
+#
+
+# PROVIDE: dbmailpop3 mail
+# REQUIRE:
+
+. /etc/rc.subr
+
+name="dbmailpop3d"
+rcvar=${name}
+required_files="@PKG_SYSCONFDIR@/dbmail.conf"
+command="@PREFIX@/sbin/dbmail-pop3d"
+pidfile="/var/run/dbmail-pop3d.pid"
+
+load_rc_config $name
+run_rc_command "$1"