From 46dff427a93beaa05dc6ca5213a70b05d3f5463c Mon Sep 17 00:00:00 2001 From: Edwin Groothuis Date: Sat, 1 Apr 2006 13:32:03 +0000 Subject: [PATCH] Use SUB_FILES for pkg-message --- french/plgrenouille/Makefile | 17 +++-------- .../{pkg-message => files/pkg-message.in} | 0 french/plgrenouille/files/plgrenouille.sh.in | 30 +++++++++++++++++++ 3 files changed, 34 insertions(+), 13 deletions(-) rename french/plgrenouille/{pkg-message => files/pkg-message.in} (100%) create mode 100644 french/plgrenouille/files/plgrenouille.sh.in diff --git a/french/plgrenouille/Makefile b/french/plgrenouille/Makefile index 68ddaaa9a85f..88ad66a85cb3 100644 --- a/french/plgrenouille/Makefile +++ b/french/plgrenouille/Makefile @@ -36,8 +36,6 @@ USE_REINPLACE= yes USE_RC_SUBR= yes SCRIPTS_ENV= PKG_PREFIX=${PREFIX} WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION:R} -MSG_FILE= ${PKGDIR}/pkg-message -PKGMESSAGE= ${WRKDIR}/pkg-message PKGDEINSTALL= ${PKGINSTALL} PLIST_SUB= LBIN_DIR="${LBIN_DIR:S,^${PREFIX}/,,}" \ CONF_DIR="${CONF_DIR:S,^${PREFIX}/,,}" \ @@ -46,8 +44,9 @@ REINPLACE_SUB= PREFIX=${PREFIX} PERL=${PERL} \ LBIN_DIR=${LBIN_DIR} CONF_DIR=${CONF_DIR} \ RUN_DIR=${RUN_DIR} LOG_DIR=${LOG_DIR} \ SPOOL_DIR=${SPOOL_DIR} SPOOL_USER=${SPOOL_USER} -RCSCRIPTS_SUB= ${REINPLACE_SUB} RC_SUBR=${RC_SUBR} -PKGMESSAGE_SUB= PREFIX=${PREFIX} +SUB_FILES= pkg-message plgrenouille.sh +SUB_LIST= LBIN_DIR=${LBIN_DIR} RUN_DIR=${RUN_DIR} LOG_DIR=${LOG_DIR} +PKGMESSAGE= ${WRKDIR}/pkg-message MAN1= plgrenouille.1 DOC_FILES= FAQ README @@ -60,7 +59,7 @@ LOG_DIR= /var/log SPOOL_DIR= /var/spool/${PORTNAME} SPOOL_USER= daemon -post-patch: patch-script patch-lib patch-rc patch-pkgmessage +post-patch: patch-script patch-lib patch-script: @${REINPLACE_CMD} ${REINPLACE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ @@ -70,14 +69,6 @@ patch-lib: @${REINPLACE_CMD} 's!swap_privileges!Grenouille::System::&!g' \ ${WRKSRC}/Grenouille/Log.pm ${WRKSRC}/Grenouille/Preferences.pm -patch-rc: - @${SED} ${RCSCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${FILESDIR}/plgrenouille.sh > ${WRKDIR}/plgrenouille.sh - -patch-pkgmessage: - @${SED} ${PKGMESSAGE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${MSG_FILE} > ${PKGMESSAGE} - do-install: install-script install-lib install-man \ install-data install-doc install-rc diff --git a/french/plgrenouille/pkg-message b/french/plgrenouille/files/pkg-message.in similarity index 100% rename from french/plgrenouille/pkg-message rename to french/plgrenouille/files/pkg-message.in diff --git a/french/plgrenouille/files/plgrenouille.sh.in b/french/plgrenouille/files/plgrenouille.sh.in new file mode 100644 index 000000000000..4bfe6d0fc377 --- /dev/null +++ b/french/plgrenouille/files/plgrenouille.sh.in @@ -0,0 +1,30 @@ +#! /bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/french/plgrenouille/files/Attic/plgrenouille.sh.in,v 1.1 2006-04-01 13:32:03 edwin Exp $ +# +# PROVIDE: plgrenouille +# REQUIRE: DAEMON +# +# Add the following line to /etc/rc.conf to enable upclient: +# +# plgrenouille_enable="YES" +# + +plgrenouille_enable=NO +plgrenouille_flags=-b + +. %%RC_SUBR%% + +name=plgrenouille +rcvar=$(set_rcvar) + +command=%%LBIN_DIR%%/${name} +command_interpreter=%%PERL%% +pidfile=%%RUN_DIR%%/${name}.pid +logfile=%%LOG_DIR%%/${name}.log +required_files=%%CONF_DIR%%/grenouillerc +extra_commands=configure +configure_cmd="${command} -c" + +load_rc_config ${name} +run_rc_command "$1"