[PATCH] net/dictd: convert to USE_RC_SUBR=dictd.sh and small fixes

- USE_RC_SUBR= yes  -->  USE_RC_SUBR= ${PORTNAME}.sh
	- move files/dictd.sh  --> files/dictd.sh.in
	- default to NO for dictd_enable
	- Move pkg-message to files/pkg-message.in and print local path to net/dictd-database

PR:		ports/91505
Submitted by:	Ion-Mihai "IOnut" Tetcu <itetcu@gmail.com>
Reviewed by:	maintainer timeout
This commit is contained in:
Edwin Groothuis
2006-04-14 06:10:26 +00:00
parent 2310685fb3
commit a7706ec00c
5 changed files with 41 additions and 22 deletions
+5 -6
View File
@@ -18,8 +18,7 @@ COMMENT= Dict protocol (RFC 2229) server
MAN1= dictzip.1
MAN8= dictd.8
USE_RC_SUBR= yes
USE_REINPLACE= yes
USE_RC_SUBR= ${PORTNAME}.sh
USE_BISON= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --with-etcdir=${PREFIX}/etc --with-cflags="${CFLAGS}" \
@@ -27,7 +26,8 @@ CONFIGURE_ARGS= --with-etcdir=${PREFIX}/etc --with-cflags="${CFLAGS}" \
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
SUB_FILES+= pkg-message
SUB_LIST+= PORTSDIR=${PORTSDIR}
USE_GMAKE= yes
@@ -43,8 +43,7 @@ post-patch:
post-install:
@${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/${PORTNAME}.conf > ${PREFIX}/etc/${PORTNAME}.conf.sample
@[ -f ${PREFIX}/etc/${PORTNAME}.conf ] || ${CP} ${PREFIX}/etc/${PORTNAME}.conf.sample ${PREFIX}/etc/${PORTNAME}.conf
@${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} ${FILESDIR}/${PORTNAME}.sh > ${PREFIX}/etc/rc.d/${PORTNAME}.sh
@${CHMOD} +x ${PREFIX}/etc/rc.d/${PORTNAME}.sh
@${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${PKGMESSAGE}
#@${INSTALL_SCRIPT} ${WRKDIR}/${PORTNAME}.sh ${PREFIX}/etc/rc.d
@${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
+21
View File
@@ -0,0 +1,21 @@
#!/bin/sh
# $FreeBSD: /tmp/pcvs/ports/net/dictd/files/Attic/dictd.sh.in,v 1.1 2006-04-14 06:10:26 edwin Exp $
#
# PROVIDE: dictd
# REQUIRE: DAEMON
#
# Add the following line to /etc/rc.conf[.local] to enable dictd:
#
# dictd_enable="YES"
#
dictd_enable=${dictd_enable-"NO"}
. %%RC_SUBR%%
name=dictd
rcvar=`set_rcvar`
command=%%PREFIX%%/sbin/dictd
load_rc_config $name
run_rc_command "$1"
+15
View File
@@ -0,0 +1,15 @@
==================================================================
This port installs the dict daemon but does not envoke dictd
by default.
To invoke dictd on startup, put the following in /etc/rc.conf:
dictd_enable="YES"
The dict client can be found within %%PORTSDIR%%/textproc/dict
Don't forget to install %%PORTSDIR%%/net/dictd-database
to run a dictd server without pain.
==================================================================
-15
View File
@@ -1,15 +0,0 @@
==================================================================
This port installs the dict daemon but does not envoke dictd
by default.
To invoke dictd on startup, put the following in /etc/rc.conf:
dictd_enable="YES"
The dict client can be found within ports/textproc/dict.
Don't forget to install ports/net/dictd-database to run
a dictd server without pain.
==================================================================
-1
View File
@@ -3,4 +3,3 @@ sbin/dictd
@unexec if cmp -s %D/etc/dictd.conf %D/etc/dictd.conf.sample; then rm -f %D/etc/dictd.conf; fi
etc/dictd.conf.sample
@exec [ -f %B/dictd.conf ] || cp %B/%f %B/dictd.conf
etc/rc.d/dictd.sh