aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoredwin <edwin@FreeBSD.org>2006-04-14 14:10:26 +0800
committeredwin <edwin@FreeBSD.org>2006-04-14 14:10:26 +0800
commit1ff95d635367725bd55f69dd8461056ffcdcbb14 (patch)
treee0f633ed567571962e955e0423fcd4497129a986 /net
parent0457bd39403aca16611fd17bca415e442cbc0de9 (diff)
downloadfreebsd-ports-gnome-1ff95d635367725bd55f69dd8461056ffcdcbb14.tar.gz
freebsd-ports-gnome-1ff95d635367725bd55f69dd8461056ffcdcbb14.tar.zst
freebsd-ports-gnome-1ff95d635367725bd55f69dd8461056ffcdcbb14.zip
[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
Diffstat (limited to 'net')
-rw-r--r--net/dictd/Makefile11
-rw-r--r--net/dictd/files/dictd.sh.in21
-rw-r--r--net/dictd/files/pkg-message.in15
-rw-r--r--net/dictd/pkg-message15
-rw-r--r--net/dictd/pkg-plist1
5 files changed, 41 insertions, 22 deletions
diff --git a/net/dictd/Makefile b/net/dictd/Makefile
index cf083d389d87..ae7a8ca4a385 100644
--- a/net/dictd/Makefile
+++ b/net/dictd/Makefile
@@ -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>
diff --git a/net/dictd/files/dictd.sh.in b/net/dictd/files/dictd.sh.in
new file mode 100644
index 000000000000..1d154591f0fd
--- /dev/null
+++ b/net/dictd/files/dictd.sh.in
@@ -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"
diff --git a/net/dictd/files/pkg-message.in b/net/dictd/files/pkg-message.in
new file mode 100644
index 000000000000..d1194f35f6f6
--- /dev/null
+++ b/net/dictd/files/pkg-message.in
@@ -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.
+
+==================================================================
diff --git a/net/dictd/pkg-message b/net/dictd/pkg-message
index 68ec5f0a8a00..e69de29bb2d1 100644
--- a/net/dictd/pkg-message
+++ b/net/dictd/pkg-message
@@ -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.
-
-==================================================================
diff --git a/net/dictd/pkg-plist b/net/dictd/pkg-plist
index efecc2caf95d..1a8eee2d8274 100644
--- a/net/dictd/pkg-plist
+++ b/net/dictd/pkg-plist
@@ -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