1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-26 00:55:14 +00:00

Rework to use the newer USE_RC_SUBR method

PR:		119873
Submitted by:	ade
Approved by:	oliver (maintainer)
This commit is contained in:
Ade Lovett 2008-01-27 00:04:46 +00:00
parent 4d0bfa30e4
commit 9a2d43fbcb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=206272
6 changed files with 4 additions and 198 deletions

View File

@ -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}

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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