From 9a2d43fbcb307695e510fdffa1212df679397afc Mon Sep 17 00:00:00 2001 From: Ade Lovett Date: Sun, 27 Jan 2008 00:04:46 +0000 Subject: [PATCH] Rework to use the newer USE_RC_SUBR method PR: 119873 Submitted by: ade Approved by: oliver (maintainer) --- mail/courier-imap/Makefile | 14 ++---- .../files/courier-imap-imapd-ssl.sh | 46 ------------------- mail/courier-imap/files/courier-imap-imapd.sh | 46 ------------------- .../files/courier-imap-pop3d-ssl.sh | 46 ------------------- mail/courier-imap/files/courier-imap-pop3d.sh | 46 ------------------- mail/courier-imap/pkg-plist | 4 -- 6 files changed, 4 insertions(+), 198 deletions(-) delete mode 100644 mail/courier-imap/files/courier-imap-imapd-ssl.sh delete mode 100644 mail/courier-imap/files/courier-imap-imapd.sh delete mode 100644 mail/courier-imap/files/courier-imap-pop3d-ssl.sh delete mode 100644 mail/courier-imap/files/courier-imap-pop3d.sh diff --git a/mail/courier-imap/Makefile b/mail/courier-imap/Makefile index 70c986e5feac..4f374e5c6e05 100644 --- a/mail/courier-imap/Makefile +++ b/mail/courier-imap/Makefile @@ -7,6 +7,7 @@ PORTNAME= courier-imap PORTVERSION= 4.3.0 +PORTREVISION= 1 PORTEPOCH= 2 CATEGORIES= mail ipv6 MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} @@ -22,7 +23,9 @@ USE_BZIP2= yes USE_PERL5= yes GNU_CONFIGURE= yes USE_GMAKE= yes -USE_RC_SUBR= yes +USE_RC_SUBR= courier-imap-imapd courier-imap-imapd-ssl \ + courier-imap-pop3d courier-imap-pop3d-ssl + CPPFLAGS+= -I${LOCALBASE}/include -I${PREFIX}/include LDFLAGS+= -L${LOCALBASE}/lib -L${PREFIX}/lib @@ -49,12 +52,10 @@ OPTIONS= FAM "Build in fam support for IDLE command" off \ .endif CONFDIR?= ${PREFIX}/etc/${PORTNAME} -RCDIR?= ${PREFIX}/etc/rc.d USERDB?= ${PREFIX}/etc/userdb LIBEXECDIR?= ${PREFIX}/libexec/${PORTNAME} USE_OPENSSL= yes PLIST_SUB= CONFDIR=${CONFDIR:S,^${PREFIX}/,,} \ - RCDIR=${RCDIR:S,^${PREFIX}/,,} \ LIBEXECDIR=${LIBEXECDIR:S,^${PREFIX}/,,} CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL} @@ -101,8 +102,6 @@ CONFIGURE_ARGS+=--without-ipv6 CONFIGURE_ARGS+=--with-trashquota .endif -RC_SCRIPTS_SUB=PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} - .if defined(WITH_FAM) CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="${LDFLAGS}" @@ -140,11 +139,6 @@ post-install: .for i in imapd pop3d ${INSTALL_DATA} ${WRKSRC}/imap/${i}.cnf ${CONFDIR}/${i}.cnf.dist .endfor -.for i in imapd imapd-ssl pop3d pop3d-ssl - ${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${FILESDIR}/courier-imap-${i}.sh > ${WRKDIR}/courier-imap-${i}.sh - ${INSTALL_SCRIPT} ${WRKDIR}/courier-imap-${i}.sh ${RCDIR}/courier-imap-${i}.sh -.endfor .if !defined(NOPORTDOCS) @${MKDIR} ${DOCSDIR} .for a in ${EXTRA_DOCS} diff --git a/mail/courier-imap/files/courier-imap-imapd-ssl.sh b/mail/courier-imap/files/courier-imap-imapd-ssl.sh deleted file mode 100644 index 4da0a261fdfd..000000000000 --- a/mail/courier-imap/files/courier-imap-imapd-ssl.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# -# An rc.subr-style startup script for Courier-IMAP's IMAP over SSL service. - -# PROVIDE: courier_imap_imapd_ssl -# REQUIRE: LOGIN courier_authdaemond -# KEYWORD: shutdown - -# Define these courier_imap_imapd_ssl_* variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/courier_imap_imapd_ssl -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE - -courier_imap_imapd_ssl_enable=${courier_imap_imapd_ssl_enable-"NO"} - -. %%RC_SUBR%% - -name="courier_imap_imapd_ssl" -rcvar=`set_rcvar` -command="%%PREFIX%%/libexec/courier-imap/imapd-ssl.rc" -pidfile="/var/run/imapd-ssl.pid" -procname="%%PREFIX%%/sbin/courierlogger" - -start_cmd="imapd_ssl_cmd start" -stop_cmd="imapd_ssl_cmd stop" -restart_cmd="imapd_ssl_cmd stop && imapd_ssl_cmd start" - -load_rc_config $name - -imapd_ssl_cmd () { - case $1 in - start) - echo "Starting ${name}." - ${command} start - ;; - stop) - echo "Stopping ${name}." - ${command} stop - ;; - esac -} - -run_rc_command "$1" - diff --git a/mail/courier-imap/files/courier-imap-imapd.sh b/mail/courier-imap/files/courier-imap-imapd.sh deleted file mode 100644 index bb132e3d3c01..000000000000 --- a/mail/courier-imap/files/courier-imap-imapd.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# -# An rc.subr-style startup script for Courier-IMAP's IMAP service. - -# PROVIDE: courier_imap_imapd -# REQUIRE: LOGIN courier_authdaemond -# KEYWORD: shutdown - -# Define these courier_imap_imapd_* variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/courier_imap_imapd -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE - -courier_imap_imapd_enable=${courier_imap_imapd_enable-"NO"} - -. %%RC_SUBR%% - -name="courier_imap_imapd" -rcvar=`set_rcvar` -command="%%PREFIX%%/libexec/courier-imap/imapd.rc" -pidfile="/var/run/imapd.pid" -procname="%%PREFIX%%/sbin/courierlogger" - -start_cmd="imapd_cmd start" -stop_cmd="imapd_cmd stop" -restart_cmd="imapd_cmd stop && imapd_cmd start" - -load_rc_config $name - -imapd_cmd () { - case $1 in - start) - echo "Starting ${name}." - ${command} start - ;; - stop) - echo "Stopping ${name}." - ${command} stop - ;; - esac -} - -run_rc_command "$1" - diff --git a/mail/courier-imap/files/courier-imap-pop3d-ssl.sh b/mail/courier-imap/files/courier-imap-pop3d-ssl.sh deleted file mode 100644 index 7679a8f4a4b9..000000000000 --- a/mail/courier-imap/files/courier-imap-pop3d-ssl.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# -# An rc.subr-style startup script for Courier-IMAP's POP3 over SSL service. - -# PROVIDE: courier_imap_pop3d_ssl -# REQUIRE: LOGIN courier_authdaemond -# KEYWORD: shutdown - -# Define these courier_imap_pop3d_ssl_* variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/courier_imap_pop3d_ssl -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE - -courier_imap_pop3d_ssl_enable=${courier_imap_pop3d_ssl_enable-"NO"} - -. %%RC_SUBR%% - -name="courier_imap_pop3d_ssl" -rcvar=`set_rcvar` -command="%%PREFIX%%/libexec/courier-imap/pop3d-ssl.rc" -pidfile="/var/run/pop3d-ssl.pid" -procname="%%PREFIX%%/sbin/courierlogger" - -start_cmd="pop3d_ssl_cmd start" -stop_cmd="pop3d_ssl_cmd stop" -restart_cmd="pop3d_ssl_cmd stop && pop3d_ssl_cmd start" - -load_rc_config $name - -pop3d_ssl_cmd () { - case $1 in - start) - echo "Starting ${name}." - ${command} start - ;; - stop) - echo "Stopping ${name}." - ${command} stop - ;; - esac -} - -run_rc_command "$1" - diff --git a/mail/courier-imap/files/courier-imap-pop3d.sh b/mail/courier-imap/files/courier-imap-pop3d.sh deleted file mode 100644 index b17f465c4bba..000000000000 --- a/mail/courier-imap/files/courier-imap-pop3d.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# -# An rc.subr-style startup script for Courier-IMAP's POP3 service. - -# PROVIDE: courier_imap_pop3d -# REQUIRE: LOGIN courier_authdaemond -# KEYWORD: shutdown - -# Define these courier_imap_pop3d_* variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/courier_imap_pop3d -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE - -courier_imap_pop3d_enable=${courier_imap_pop3d_enable-"NO"} - -. %%RC_SUBR%% - -name="courier_imap_pop3d" -rcvar=`set_rcvar` -command="%%PREFIX%%/libexec/courier-imap/pop3d.rc" -pidfile="/var/run/pop3d.pid" -procname="%%PREFIX%%/sbin/courierlogger" - -start_cmd="pop3d_cmd start" -stop_cmd="pop3d_cmd stop" -restart_cmd="pop3d_cmd stop && pop3d_cmd start" - -load_rc_config $name - -pop3d_cmd () { - case $1 in - start) - echo "Starting ${name}." - ${command} start - ;; - stop) - echo "Stopping ${name}." - ${command} stop - ;; - esac -} - -run_rc_command "$1" - diff --git a/mail/courier-imap/pkg-plist b/mail/courier-imap/pkg-plist index b264012a60db..c5e03539da9d 100644 --- a/mail/courier-imap/pkg-plist +++ b/mail/courier-imap/pkg-plist @@ -22,10 +22,6 @@ bin/pop3d %%CONFDIR%%/pop3d.dist @exec %%LOCALBASE%%/share/sysconftool/sysconftool %D/%%CONFDIR%%/pop3d.dist %%CONFDIR%%/quotawarnmsg.example -%%RCDIR%%/courier-imap-imapd.sh -%%RCDIR%%/courier-imap-imapd-ssl.sh -%%RCDIR%%/courier-imap-pop3d.sh -%%RCDIR%%/courier-imap-pop3d-ssl.sh %%LIBEXECDIR%%/couriertcpd %%LIBEXECDIR%%/imapd-ssl.rc %%LIBEXECDIR%%/imapd.rc