From 07e88b1d68b36d55634e8f48a55a0afe1613d741 Mon Sep 17 00:00:00 2001 From: tdb Date: Sun, 26 Jul 2009 11:25:14 +0000 Subject: Stop using USE_RC_SUBR=yes. PR: ports/136842 Submitted by: pgollucci --- misc/proxyper/Makefile | 11 +++-------- misc/proxyper/files/proxyper.in | 28 ++++++++++++++++++++++++++++ misc/proxyper/files/proxyper.sh | 28 ---------------------------- misc/proxyper/pkg-plist | 1 - 4 files changed, 31 insertions(+), 37 deletions(-) create mode 100644 misc/proxyper/files/proxyper.in delete mode 100644 misc/proxyper/files/proxyper.sh (limited to 'misc') diff --git a/misc/proxyper/Makefile b/misc/proxyper/Makefile index 4570706a7ce5..7c241790fc65 100644 --- a/misc/proxyper/Makefile +++ b/misc/proxyper/Makefile @@ -7,6 +7,7 @@ PORTNAME= proxyper PORTVERSION= 343 +PORTREVISION= 1 CATEGORIES= misc MASTER_SITES= ftp://ftp.distributed.net/pub/dcti/proxyper/ \ http://http.distributed.net/pub/dcti/proxyper/ @@ -16,10 +17,11 @@ COMMENT= The official distributed.net v2 personal proxy ONLY_FOR_ARCHS= i386 -USE_RC_SUBR= yes +USE_RC_SUBR= ${PORTNAME} NO_BUILD= yes BINDIR= ${PREFIX}/distributed.net/proxy +SUB_LIST+= BINDIR=${BINDIR} PROXYUSER= nobody PROXYGROUP= daemon @@ -36,11 +38,6 @@ DISTNAME= proxyper${PORTVERSION}-freebsd7-x86 DISTNAME= proxyper${PORTVERSION}-freebsd4-x86 .endif -post-extract: - @${SED} -e 's#%%BINDIR%%#${BINDIR}#'g \ - -e 's#%%RC_SUBR%%#${RC_SUBR}#g' \ - ${FILESDIR}/proxyper.sh > ${WRKDIR}/proxyper.sh - do-install: if [ ! -d ${BINDIR} ]; then \ ${MKDIR} ${BINDIR}; \ @@ -53,8 +50,6 @@ do-install: ${INSTALL_MAN} ${WRKSRC}/ChangeLog.txt ${BINDIR} ${INSTALL_MAN} ${WRKSRC}/manual.html ${BINDIR} - ${INSTALL_SCRIPT} ${WRKDIR}/proxyper.sh ${PREFIX}/etc/rc.d/proxyper.sh - ${INSTALL_DATA} ${WRKSRC}/proxyper.ini ${BINDIR}/proxyper.ini.sample .if !exists(${BINDIR}/proxyper.ini) ${INSTALL_DATA} ${WRKSRC}/proxyper.ini ${BINDIR}/proxyper.ini diff --git a/misc/proxyper/files/proxyper.in b/misc/proxyper/files/proxyper.in new file mode 100644 index 000000000000..5ef19aab648a --- /dev/null +++ b/misc/proxyper/files/proxyper.in @@ -0,0 +1,28 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# PROVIDE: proxyper +# REQUIRE: LOGIN +# KEYWORD: shutdown + +proxyper_enable=${proxyper_enable:-"NO"} + +dir="%%BINDIR%%" +user="nobody" + +. %%RC_SUBR%% + +name="proxyper" +rcvar=`set_rcvar` + +pidfile=${dir}/rc5desproxy.pid +required_files=${dir}/${name}.ini + +proxyper_user=${user} + +command=${dir}/${name} +command_args=">/dev/null 2>&1 &" + +load_rc_config $name +run_rc_command "$1" diff --git a/misc/proxyper/files/proxyper.sh b/misc/proxyper/files/proxyper.sh deleted file mode 100644 index 5ef19aab648a..000000000000 --- a/misc/proxyper/files/proxyper.sh +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# -# $FreeBSD$ -# -# PROVIDE: proxyper -# REQUIRE: LOGIN -# KEYWORD: shutdown - -proxyper_enable=${proxyper_enable:-"NO"} - -dir="%%BINDIR%%" -user="nobody" - -. %%RC_SUBR%% - -name="proxyper" -rcvar=`set_rcvar` - -pidfile=${dir}/rc5desproxy.pid -required_files=${dir}/${name}.ini - -proxyper_user=${user} - -command=${dir}/${name} -command_args=">/dev/null 2>&1 &" - -load_rc_config $name -run_rc_command "$1" diff --git a/misc/proxyper/pkg-plist b/misc/proxyper/pkg-plist index de53c256b953..e1154ffcc7ec 100644 --- a/misc/proxyper/pkg-plist +++ b/misc/proxyper/pkg-plist @@ -4,6 +4,5 @@ distributed.net/proxy/proxyper @unexec if cmp -s %D/distributed.net/proxy/proxyper.ini %D/distributed.net/proxy/proxyper.ini.sample; then rm -f %D/distributed.net/proxy/proxyper.ini; fi distributed.net/proxy/proxyper.ini.sample @exec [ -f %B/proxyper.ini ] || cp %B/%f %B/proxyper.ini -etc/rc.d/proxyper.sh @dirrm distributed.net/proxy @dirrmtry distributed.net -- cgit