summaryrefslogtreecommitdiffstats
path: root/mail/dbmail22
diff options
context:
space:
mode:
authorseanc <seanc@FreeBSD.org>2004-11-10 09:21:45 +0000
committerseanc <seanc@FreeBSD.org>2004-11-10 09:21:45 +0000
commit0c962949505e05a0700f3e4b597b12a924b7b4c1 (patch)
treead6de444760ce29b70c64997f2a9f0472debafd8 /mail/dbmail22
parenta59ffb470ceb17b9acbbbd0f04319473e894ae97 (diff)
downloadFreeBSD-ports-0c962949505e05a0700f3e4b597b12a924b7b4c1.zip
FreeBSD-ports-0c962949505e05a0700f3e4b597b12a924b7b4c1.tar.gz
Add rcNG startup scripts for dbmail. Bump port version.
Diffstat (limited to 'mail/dbmail22')
-rw-r--r--mail/dbmail22/Makefile21
-rw-r--r--mail/dbmail22/files/dbmail-imapd.sh32
-rw-r--r--mail/dbmail22/files/dbmail-lmtpd.sh32
-rw-r--r--mail/dbmail22/files/dbmail-pop3d.sh32
-rw-r--r--mail/dbmail22/pkg-plist3
5 files changed, 119 insertions, 1 deletions
diff --git a/mail/dbmail22/Makefile b/mail/dbmail22/Makefile
index 718bae3..caadfce 100644
--- a/mail/dbmail22/Makefile
+++ b/mail/dbmail22/Makefile
@@ -7,7 +7,7 @@
PORTNAME= dbmail
PORTVERSION= 2.0.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= mail
MASTER_SITES= http://www.dbmail.org/download/
PKGNAMESUFFIX= -${DATABASE}
@@ -23,6 +23,12 @@ USE_GMAKE= YES
USE_OPENSSL= YES
CFLAGS += -fPIC
+
+SED_SCRIPT+= -e 's|%%RC_SUBR%%|${RC_SUBR}|g' \
+ -e 's|%%PREFIX%%|${PREFIX}|g' \
+ -e 's|%%RC_DIR%%|${RC_DIR}|g' \
+ -e 's|%%RC_SUFX%%|${RC_SUFX}|g'
+
.if defined(WITH_POSTGRESQL)
CONFIGURE_ARGS+= --with-pgsql
LIB_DEPENDS+= pq:${PORTSDIR}/databases/postgresql7
@@ -63,8 +69,16 @@ post-configure:
@${REINPLACE_CMD} -i.orig 's!/etc/dbmail.conf!${PREFIX}/etc/dbmail.conf!g' \
${WRKSRC}/dbmail.h
+post-build:
+.for f in imap lmtp pop3
+ @${SED} ${SED_SCRIPT} ${FILESDIR}/dbmail-${f}d.sh > ${WRKDIR}/dbmail-${f}d.sh
+.endfor
+
post-install:
@${INSTALL_DATA} ${WRKSRC}/dbmail.conf ${PREFIX}/etc/dbmail.conf-dist
+.for f in imap lmtp pop3
+ @${INSTALL_SCRIPT} ${WRKDIR}/dbmail-${f}d.sh ${DESTDIR}${PREFIX}/etc/rc.d/dbmail-${f}d.sh
+.endfor
@${MKDIR} ${DATADIR}/sql
@${INSTALL_DATA} ${WRKSRC}/sql/${DATABASE}/* ${DATADIR}/sql
@cd ${WRKSRC}/man && ${INSTALL_MAN} ${MAN1} ${MAN1PREFIX}/man/man1
@@ -80,5 +94,10 @@ post-install:
@${ECHO} " *) Many programs have been renamed and their arguments changed."
@${ECHO} " *) Read the upgrading notes."
@${ECHO} " *) Don't be careless with this upgrade or mail will be lost!"
+ @${ECHO} " *) dbmail can be controled by setting dbmail_imapd_enable,"
+ @${ECHO} " dbmail_lmtpd_enable, and/or dbmail_pop3d_enable in"
+ @${ECHO} " /etc/rc.conf."
+ @${ECHO} ""
+
.include <bsd.port.mk>
diff --git a/mail/dbmail22/files/dbmail-imapd.sh b/mail/dbmail22/files/dbmail-imapd.sh
new file mode 100644
index 0000000..82505e9
--- /dev/null
+++ b/mail/dbmail22/files/dbmail-imapd.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: dbmail-imapd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable dbmail-imapd:
+#
+#dbmail_imapd_enable="YES"
+#
+# See dbmail-imapd(8) for flags
+#
+
+. %%RC_SUBR%%
+
+name=dbmail_imapd
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/dbmail-imapd
+pidfile=/var/run/dbmail-imapd.pid
+required_files=%%PREFIX%%/etc/dbmail.conf
+
+# read settings, set default values
+load_rc_config "$name"
+: ${dbmail_imapd_enable="NO"}
+: ${dbmail_imapd_flags=""}
+
+run_rc_command "$1"
diff --git a/mail/dbmail22/files/dbmail-lmtpd.sh b/mail/dbmail22/files/dbmail-lmtpd.sh
new file mode 100644
index 0000000..f1133f4
--- /dev/null
+++ b/mail/dbmail22/files/dbmail-lmtpd.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: dbmail-lmtpd
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable dbmail-lmtpd:
+#
+#dbmail_lmtpd_enable="YES"
+#
+# See dbmail-lmtpd(8) for flags
+#
+
+. %%RC_SUBR%%
+
+name=dbmail_lmtpd
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/dbmail-lmtpd
+pidfile=/var/run/dbmail-lmtpd.pid
+required_files=%%PREFIX%%/etc/dbmail.conf
+
+# read settings, set default values
+load_rc_config "$name"
+: ${dbmail_lmtpd_enable="NO"}
+: ${dbmail_lmtpd_flags=""}
+
+run_rc_command "$1"
diff --git a/mail/dbmail22/files/dbmail-pop3d.sh b/mail/dbmail22/files/dbmail-pop3d.sh
new file mode 100644
index 0000000..21bc973
--- /dev/null
+++ b/mail/dbmail22/files/dbmail-pop3d.sh
@@ -0,0 +1,32 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: dbmail-pop3d
+# REQUIRE: DAEMON
+# KEYWORD: shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable dbmail-pop3d:
+#
+#dbmail_pop3d_enable="YES"
+#
+# See dbmail-pop3d(8) for flags
+#
+
+. %%RC_SUBR%%
+
+name=dbmail_pop3d
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/sbin/dbmail-pop3d
+pidfile=/var/run/dbmail-pop3d.pid
+required_files=%%PREFIX%%/etc/dbmail.conf
+
+# read settings, set default values
+load_rc_config "$name"
+: ${dbmail_pop3d_enable="NO"}
+: ${dbmail_pop3d_flags=""}
+
+run_rc_command "$1"
diff --git a/mail/dbmail22/pkg-plist b/mail/dbmail22/pkg-plist
index 66d3c8a..3380489 100644
--- a/mail/dbmail22/pkg-plist
+++ b/mail/dbmail22/pkg-plist
@@ -1,4 +1,7 @@
etc/dbmail.conf-dist
+etc/rc.d/dbmail-imapd.sh
+etc/rc.d/dbmail-lmtpd.sh
+etc/rc.d/dbmail-pop3d.sh
lib/dbmail/libauthdbmail.0
lib/dbmail/libauthdbmail.a
lib/dbmail/libauthdbmail.la
OpenPOWER on IntegriCloud