From 53d169e4cddb80afb3fcdde753c74d247feb4c57 Mon Sep 17 00:00:00 2001 From: Cheng-Lung Sung Date: Fri, 5 Feb 2010 02:37:34 +0000 Subject: [PATCH] - use $SUB_FILES to dynamically adjust dictd.conf PR: ports/143101 Submitted by: Sevan Janiyan --- net/dictd/Makefile | 6 +++--- net/dictd/files/{dictd.conf => dictd.conf.in} | 0 net/dictd/files/{dictd.sh.in => dictd.in} | 2 +- net/dictd/files/dictd.sh | 19 ------------------- 4 files changed, 4 insertions(+), 23 deletions(-) rename net/dictd/files/{dictd.conf => dictd.conf.in} (100%) rename net/dictd/files/{dictd.sh.in => dictd.in} (74%) delete mode 100644 net/dictd/files/dictd.sh diff --git a/net/dictd/Makefile b/net/dictd/Makefile index 90ca5e234bae..d36a3e391799 100644 --- a/net/dictd/Makefile +++ b/net/dictd/Makefile @@ -19,7 +19,7 @@ LIB_DEPENDS= maa.2:${PORTSDIR}/devel/libmaa MAN1= dictzip.1 MAN8= dictd.8 -USE_RC_SUBR= ${PORTNAME}.sh +USE_RC_SUBR= ${PORTNAME} USE_BISON= build USE_AUTOTOOLS= libtool:22 GNU_CONFIGURE= yes @@ -28,7 +28,7 @@ CONFIGURE_ARGS= --with-etcdir=${PREFIX}/etc --with-cflags="${CFLAGS}" \ CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \ LDFLAGS="-L${LOCALBASE}/lib" -SUB_FILES+= pkg-message +SUB_FILES+= dictd.conf pkg-message SUB_LIST+= PORTSDIR=${PORTSDIR} USE_GMAKE= yes @@ -43,7 +43,7 @@ post-patch: @${REINPLACE_CMD} -e "s|\([\ \t(]\)T_USER|\1T_USERNAME|g" ${WRKSRC}/*.[chly] post-install: - @${SED} "s|%%PREFIX%%|${PREFIX}|g" < ${FILESDIR}/${PORTNAME}.conf > ${PREFIX}/etc/${PORTNAME}.conf.sample + @${CP} ${WRKDIR}/${PORTNAME}.conf ${PREFIX}/etc/${PORTNAME}.conf.sample @[ -f ${PREFIX}/etc/${PORTNAME}.conf ] || ${CP} ${PREFIX}/etc/${PORTNAME}.conf.sample ${PREFIX}/etc/${PORTNAME}.conf @${CAT} ${PKGMESSAGE} diff --git a/net/dictd/files/dictd.conf b/net/dictd/files/dictd.conf.in similarity index 100% rename from net/dictd/files/dictd.conf rename to net/dictd/files/dictd.conf.in diff --git a/net/dictd/files/dictd.sh.in b/net/dictd/files/dictd.in similarity index 74% rename from net/dictd/files/dictd.sh.in rename to net/dictd/files/dictd.in index 1d154591f0fd..5e8cebcd33df 100644 --- a/net/dictd/files/dictd.sh.in +++ b/net/dictd/files/dictd.in @@ -1,5 +1,5 @@ #!/bin/sh -# $FreeBSD: /tmp/pcvs/ports/net/dictd/files/Attic/dictd.sh.in,v 1.1 2006-04-14 06:10:26 edwin Exp $ +# $FreeBSD$ # # PROVIDE: dictd # REQUIRE: DAEMON diff --git a/net/dictd/files/dictd.sh b/net/dictd/files/dictd.sh deleted file mode 100644 index 3cbf5d5b210e..000000000000 --- a/net/dictd/files/dictd.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh -# $FreeBSD$ -# -# PROVIDE: dictd -# REQUIRE: DAEMON -# -# Add the following line to /etc/rc.conf to enable dictd: -# -# dictd_enable="YES" -# - -. %%RC_SUBR%% - -name=dictd -rcvar=`set_rcvar` -command=%%PREFIX%%/sbin/dictd - -load_rc_config $name -run_rc_command "$1"