Date: Fri, 17 Jul 2009 07:13:55 GMT From: "Philip M. Gollucci" <pgollucci@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: shoesoft@gmx.net Subject: ports/136848: [PATCH] net-p2p/giFT: USE_RC_SUBR != yes Message-ID: <200907170713.n6H7DtGM042610@freefall.freebsd.org> Resent-Message-ID: <200907170720.n6H7K4EG045935@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 136848 >Category: ports >Synopsis: [PATCH] net-p2p/giFT: USE_RC_SUBR != yes >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri Jul 17 07:20:04 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Philip M. Gollucci >Release: FreeBSD 7.2-STABLE i386 >Organization: RideCharge Inc. >Environment: System: FreeBSD freefall.freebsd.org 7.2-STABLE FreeBSD 7.2-STABLE #38 r194101: Sat Jun 13 11:12:24 UTC >Description: Added file(s): - files/giftd.in Removed file(s): - files/giftd.sh Port maintainer (shoesoft@gmx.net) is cc'd. Generated with FreeBSD Port Tools 0.77 >How-To-Repeat: >Fix: --- giFT-0.11.8.1_6.patch begins here --- Index: Makefile =================================================================== RCS file: /home/pcvs/ports/net-p2p/gift/Makefile,v retrieving revision 1.29 diff -u -u -r1.29 Makefile --- Makefile 6 Jul 2009 21:25:58 -0000 1.29 +++ Makefile 17 Jul 2009 07:13:45 -0000 @@ -28,7 +28,7 @@ CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" \ LDFLAGS="${LDFLAGS}" USE_LDCONFIG= yes -USE_RC_SUBR= yes +USE_RC_SUBR= giftd MAN1= giftd.1 @@ -37,19 +37,12 @@ .include <bsd.port.pre.mk> -SED_SCRIPT+= -e 's,%%PREFIX%%,${PREFIX},g' \ - -e 's,%%RC_SUBR%%,${RC_SUBR},g' - post-patch: @${REINPLACE_CMD} -e \ 's|(libdir)/pkgconfig|(prefix)/libdata/pkgconfig|g' \ ${WRKSRC}/lib/Makefile.in -post-build: - @${SED} ${SED_SCRIPT} <${FILESDIR}/giftd.sh >${WRKDIR}/giftd.sh - post-install: - @${INSTALL_SCRIPT} ${WRKDIR}/giftd.sh ${PREFIX}/etc/rc.d/ .ifndef(NOPORTDOCS) @${MKDIR} ${DOCSDIR} .for doc in ${DOC_FILES} Index: pkg-plist =================================================================== RCS file: /home/pcvs/ports/net-p2p/gift/pkg-plist,v retrieving revision 1.7 diff -u -u -r1.7 pkg-plist --- pkg-plist 31 Jul 2008 21:18:10 -0000 1.7 +++ pkg-plist 17 Jul 2009 07:13:45 -0000 @@ -1,4 +1,3 @@ -etc/rc.d/giftd.sh bin/gift-setup bin/giftd include/libgift/array.h Index: files/giftd.in =================================================================== RCS file: files/giftd.in diff -N files/giftd.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/giftd.in 17 Jul 2009 07:13:45 -0000 @@ -0,0 +1,49 @@ +#!/bin/sh +# +# $FreeBSD: ports/net-p2p/gift/files/giftd.sh,v 1.4 2009/07/15 16:56:00 dougb Exp $ +# + +# PROVIDE: giftd +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# Define these giftd_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/giftd +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE + +giftd_enable="${giftd_enable-NO}" +giftd_flags="-d -q" +# giftd_user="" +# giftd_local_dir="" + +. %%RC_SUBR%% + +name=giftd +rcvar=`set_rcvar` +command=%%PREFIX%%/bin/giftd + +required_dirs=${giftd_local_dir} +start_precmd=giftd_check_vars + +giftd_check_vars() +{ + if [ -z ${giftd_user} ]; then + giftd_user=$(whoami) + fi + + if [ $giftd_user = 'root' ]; then + warn "You should set giftd_user to a non-root user for security reasons" + fi + + if [ -z ${giftd_local_dir} ]; then + giftd_local_dir="$(pw usershow $giftd_user | awk -F : '{ print $9 }')/.giFT" + fi + + rc_flags="${giftd_flags} --local-dir=${giftd_local_dir}" +} + +load_rc_config $name +run_rc_command "$1" Index: files/giftd.sh =================================================================== RCS file: files/giftd.sh diff -N files/giftd.sh --- files/giftd.sh 15 Jul 2009 16:56:00 -0000 1.4 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,49 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: ports/net-p2p/gift/files/giftd.sh,v 1.4 2009/07/15 16:56:00 dougb Exp $ -# - -# PROVIDE: giftd -# REQUIRE: DAEMON -# KEYWORD: shutdown - -# Define these giftd_* variables in one of these files: -# /etc/rc.conf -# /etc/rc.conf.local -# /etc/rc.conf.d/giftd -# -# DO NOT CHANGE THESE DEFAULT VALUES HERE - -giftd_enable="${giftd_enable-NO}" -giftd_flags="-d -q" -# giftd_user="" -# giftd_local_dir="" - -. "%%RC_SUBR%%" - -name="giftd" -rcvar=`set_rcvar` -command="%%PREFIX%%/bin/giftd" - -required_dirs=${giftd_local_dir} -start_precmd="giftd_check_vars" - -giftd_check_vars() -{ - if [ -z ${giftd_user} ]; then - giftd_user=$(whoami) - fi - - if [ $giftd_user = 'root' ]; then - warn "You should set giftd_user to a non-root user for security reasons" - fi - - if [ -z ${giftd_local_dir} ]; then - giftd_local_dir="$(pw usershow $giftd_user | awk -F : '{ print $9 }')/.giFT" - fi - - rc_flags="${giftd_flags} --local-dir=${giftd_local_dir}" -} - -load_rc_config $name -run_rc_command "$1" --- giFT-0.11.8.1_6.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200907170713.n6H7DtGM042610>