diff options
author | dougb <dougb@FreeBSD.org> | 2012-08-24 04:43:07 +0800 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2012-08-24 04:43:07 +0800 |
commit | 25abb719d66d701e9a83cb921dd882b0dea6824d (patch) | |
tree | 1cf961f86dad6bb64b95d1b4da18a94434c38220 | |
parent | 88c91ddcddf4556cf7a893da07ab8babeffd3b42 (diff) | |
download | freebsd-ports-gnome-25abb719d66d701e9a83cb921dd882b0dea6824d.tar.gz freebsd-ports-gnome-25abb719d66d701e9a83cb921dd882b0dea6824d.tar.zst freebsd-ports-gnome-25abb719d66d701e9a83cb921dd882b0dea6824d.zip |
Fix post r302141: The files in USE_RC_SUBR are already included in SUB_FILES
While I'm here, reformat the rc.d script to match conventions, and remove
some cruft from the Makefile.
-rw-r--r-- | misc/upclient/Makefile | 24 | ||||
-rw-r--r-- | misc/upclient/files/upclient.in | 41 |
2 files changed, 22 insertions, 43 deletions
diff --git a/misc/upclient/Makefile b/misc/upclient/Makefile index 174dc98c010c..bc0e5a0807ca 100644 --- a/misc/upclient/Makefile +++ b/misc/upclient/Makefile @@ -14,24 +14,18 @@ MASTER_SITES= http://uptimes.hostingwired.com/files/ \ DISTNAME= ${PORTNAME}-${PORTVERSION:R}${PORTVERSION:E} MAINTAINER= ports@FreeBSD.org -COMMENT= The Uptimes project client - -# Global variables -# +COMMENT= Uptimes project client USE_GETTEXT= yes USE_RC_SUBR= upclient ALL_TARGET= bsd BUILD_WRKSRC= ${WRKSRC}/src -SUB_FILES= pkg-message upclient.sh -PKGMESSAGE= ${WRKDIR}/pkg-message upclient.sh +SUB_FILES= pkg-message +PKGMESSAGE= ${WRKDIR}/pkg-message MAN8= upclient.8 -# Local variables -# - REINPLACE_SUB= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE} DOC_FILES= AUTHORS COPYING FAQ HISTORY INSTALL README TODO @@ -40,26 +34,17 @@ DOC_FILES+= HISTORY-BETA .include <bsd.port.pre.mk> -# Post-extract -# - post-extract: rename-doc rename-doc: @${MV} ${WRKSRC}/doc/"Uptimes Protocol 5" ${WRKSRC}/doc/UptimesProtocol5 -# Post-patch -# - post-patch: @${REINPLACE_CMD} ${REINPLACE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ ${WRKSRC}/scripts/upchk ${WRKSRC}/scripts/clientchk \ ${WRKSRC}/src/Makefile ${REINPLACE_CMD} -e 's/CC=gcc/CC=${CC}/' ${WRKSRC}/src/Makefile -# Install -# - do-install: install-program install-man install-sample install-script \ install-locale @@ -82,9 +67,6 @@ install-script: install-locale: @cd ${WRKSRC}/src; ${MAKE} install-locales -# Post-install -# - post-install: install-conf install-doc display-message install-conf: diff --git a/misc/upclient/files/upclient.in b/misc/upclient/files/upclient.in index 0f18a952fd37..8afd43695af9 100644 --- a/misc/upclient/files/upclient.in +++ b/misc/upclient/files/upclient.in @@ -1,15 +1,32 @@ #!/bin/sh -# + # $FreeBSD$ # # PROVIDE: upclient -# REQUIRE: DAEMON +# REQUIRE: LOGIN +# KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable upclient: # # upclient_enable="YES" # upclient_flags="<set as needed>" +. /etc/rc.subr + +name=upclient +rcvar=upclient_enable + +load_rc_config ${name} + +upclient_enable="${upclient_enable:-NO}" + +command=%%PREFIX%%/sbin/${name} +pidfile=/var/run/${name}.pid +configfile=%%PREFIX%%/etc/${name}.conf +required_files=${configfile} +samplefile=${configfile}.sample +start_precmd=${name}_precmd + upclient_precmd () { ws=" " @@ -25,26 +42,6 @@ upclient_precmd () kw="IdleTime|OS|(OS|CPU)Level" egrep -qs "^[$ws]*Send($kw)[$ws]*=" ${configfile} && err 1 "${configfile} needs to be updated from ${samplefile}." - - : } -upclient_enable="${upclient_enable-NO}" - -. /etc/rc.subr - -name=upclient -rcvar=upclient_enable - -# private -configfile=%%PREFIX%%/etc/${name}.conf -samplefile=${configfile}.sample - -# public -command=%%PREFIX%%/sbin/${name} -pidfile=/var/run/${name}.pid -required_files=${configfile} -start_precmd=${name}_precmd - -load_rc_config ${name} run_rc_command "$1" |