diff options
author | seanc <seanc@FreeBSD.org> | 2004-11-10 17:21:45 +0800 |
---|---|---|
committer | seanc <seanc@FreeBSD.org> | 2004-11-10 17:21:45 +0800 |
commit | 0c962949505e05a0700f3e4b597b12a924b7b4c1 (patch) | |
tree | ad6de444760ce29b70c64997f2a9f0472debafd8 | |
parent | a59ffb470ceb17b9acbbbd0f04319473e894ae97 (diff) | |
download | freebsd-ports-gnome-0c962949505e05a0700f3e4b597b12a924b7b4c1.tar.gz freebsd-ports-gnome-0c962949505e05a0700f3e4b597b12a924b7b4c1.tar.zst freebsd-ports-gnome-0c962949505e05a0700f3e4b597b12a924b7b4c1.zip |
Add rcNG startup scripts for dbmail. Bump port version.
25 files changed, 595 insertions, 5 deletions
diff --git a/mail/dbmail-devel/Makefile b/mail/dbmail-devel/Makefile index 718bae35f22e..caadfceefbeb 100644 --- a/mail/dbmail-devel/Makefile +++ b/mail/dbmail-devel/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/dbmail-devel/files/dbmail-imapd.sh b/mail/dbmail-devel/files/dbmail-imapd.sh new file mode 100644 index 000000000000..82505e96d9b0 --- /dev/null +++ b/mail/dbmail-devel/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/dbmail-devel/files/dbmail-lmtpd.sh b/mail/dbmail-devel/files/dbmail-lmtpd.sh new file mode 100644 index 000000000000..f1133f43a70e --- /dev/null +++ b/mail/dbmail-devel/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/dbmail-devel/files/dbmail-pop3d.sh b/mail/dbmail-devel/files/dbmail-pop3d.sh new file mode 100644 index 000000000000..21bc97377b8b --- /dev/null +++ b/mail/dbmail-devel/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/dbmail-devel/pkg-plist b/mail/dbmail-devel/pkg-plist index 66d3c8a85d05..33804890cba2 100644 --- a/mail/dbmail-devel/pkg-plist +++ b/mail/dbmail-devel/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 diff --git a/mail/dbmail/Makefile b/mail/dbmail/Makefile index 718bae35f22e..caadfceefbeb 100644 --- a/mail/dbmail/Makefile +++ b/mail/dbmail/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/dbmail/files/dbmail-imapd.sh b/mail/dbmail/files/dbmail-imapd.sh new file mode 100644 index 000000000000..82505e96d9b0 --- /dev/null +++ b/mail/dbmail/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/dbmail/files/dbmail-lmtpd.sh b/mail/dbmail/files/dbmail-lmtpd.sh new file mode 100644 index 000000000000..f1133f43a70e --- /dev/null +++ b/mail/dbmail/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/dbmail/files/dbmail-pop3d.sh b/mail/dbmail/files/dbmail-pop3d.sh new file mode 100644 index 000000000000..21bc97377b8b --- /dev/null +++ b/mail/dbmail/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/dbmail/pkg-plist b/mail/dbmail/pkg-plist index 66d3c8a85d05..33804890cba2 100644 --- a/mail/dbmail/pkg-plist +++ b/mail/dbmail/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 diff --git a/mail/dbmail20/Makefile b/mail/dbmail20/Makefile index 718bae35f22e..caadfceefbeb 100644 --- a/mail/dbmail20/Makefile +++ b/mail/dbmail20/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/dbmail20/files/dbmail-imapd.sh b/mail/dbmail20/files/dbmail-imapd.sh new file mode 100644 index 000000000000..82505e96d9b0 --- /dev/null +++ b/mail/dbmail20/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/dbmail20/files/dbmail-lmtpd.sh b/mail/dbmail20/files/dbmail-lmtpd.sh new file mode 100644 index 000000000000..f1133f43a70e --- /dev/null +++ b/mail/dbmail20/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/dbmail20/files/dbmail-pop3d.sh b/mail/dbmail20/files/dbmail-pop3d.sh new file mode 100644 index 000000000000..21bc97377b8b --- /dev/null +++ b/mail/dbmail20/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/dbmail20/pkg-plist b/mail/dbmail20/pkg-plist index 66d3c8a85d05..33804890cba2 100644 --- a/mail/dbmail20/pkg-plist +++ b/mail/dbmail20/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 diff --git a/mail/dbmail21/Makefile b/mail/dbmail21/Makefile index 718bae35f22e..caadfceefbeb 100644 --- a/mail/dbmail21/Makefile +++ b/mail/dbmail21/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/dbmail21/files/dbmail-imapd.sh b/mail/dbmail21/files/dbmail-imapd.sh new file mode 100644 index 000000000000..82505e96d9b0 --- /dev/null +++ b/mail/dbmail21/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/dbmail21/files/dbmail-lmtpd.sh b/mail/dbmail21/files/dbmail-lmtpd.sh new file mode 100644 index 000000000000..f1133f43a70e --- /dev/null +++ b/mail/dbmail21/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/dbmail21/files/dbmail-pop3d.sh b/mail/dbmail21/files/dbmail-pop3d.sh new file mode 100644 index 000000000000..21bc97377b8b --- /dev/null +++ b/mail/dbmail21/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/dbmail21/pkg-plist b/mail/dbmail21/pkg-plist index 66d3c8a85d05..33804890cba2 100644 --- a/mail/dbmail21/pkg-plist +++ b/mail/dbmail21/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 diff --git a/mail/dbmail22/Makefile b/mail/dbmail22/Makefile index 718bae35f22e..caadfceefbeb 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 000000000000..82505e96d9b0 --- /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 000000000000..f1133f43a70e --- /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 000000000000..21bc97377b8b --- /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 66d3c8a85d05..33804890cba2 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 |