mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-22 20:41:26 +00:00
- Fix MASTER_SITES
- Add USE_RC_SUBR - Update pkg-descr - Use DOCSDIR PR: ports/63668 Submitted by: maintainer
This commit is contained in:
parent
1790b09404
commit
e8ef4a0dcd
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=102811
@ -9,7 +9,9 @@ PORTNAME= upclient
|
|||||||
PORTVERSION= 5.0.b8
|
PORTVERSION= 5.0.b8
|
||||||
PORTREVISION= 2
|
PORTREVISION= 2
|
||||||
CATEGORIES= misc
|
CATEGORIES= misc
|
||||||
MASTER_SITES= http://uptimes.wonko.com/files/
|
MASTER_SITES= http://uptimes.hostingwired.com/files/ \
|
||||||
|
${MASTER_SITE_SOURCEFORGE}
|
||||||
|
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||||
DISTNAME= ${PORTNAME}-${PORTVERSION:R}${PORTVERSION:E}
|
DISTNAME= ${PORTNAME}-${PORTVERSION:R}${PORTVERSION:E}
|
||||||
|
|
||||||
MAINTAINER= cyrille.lefevre@laposte.net
|
MAINTAINER= cyrille.lefevre@laposte.net
|
||||||
@ -20,6 +22,7 @@ COMMENT= The Uptimes project client
|
|||||||
|
|
||||||
USE_GETTEXT= yes
|
USE_GETTEXT= yes
|
||||||
USE_REINPLACE= yes
|
USE_REINPLACE= yes
|
||||||
|
USE_RC_SUBR= yes
|
||||||
ALL_TARGET= bsd
|
ALL_TARGET= bsd
|
||||||
BUILD_WRKSRC= ${WRKSRC}/src
|
BUILD_WRKSRC= ${WRKSRC}/src
|
||||||
|
|
||||||
@ -31,6 +34,10 @@ MAN8= upclient.8
|
|||||||
# Local variables
|
# Local variables
|
||||||
#
|
#
|
||||||
|
|
||||||
|
REINPLACE_SUB= PREFIX=${PREFIX} LOCALBASE=${LOCALBASE}
|
||||||
|
RCSCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
|
||||||
|
PKGMESSAGE_SUB= PREFIX=${PREFIX}
|
||||||
|
|
||||||
DOC_FILES= AUTHORS COPYING FAQ HISTORY INSTALL README TODO
|
DOC_FILES= AUTHORS COPYING FAQ HISTORY INSTALL README TODO
|
||||||
DOC_FILES+= doc/UptimesProtocol5
|
DOC_FILES+= doc/UptimesProtocol5
|
||||||
DOC_FILES+= HISTORY-BETA
|
DOC_FILES+= HISTORY-BETA
|
||||||
@ -48,16 +55,20 @@ rename-doc:
|
|||||||
# Post-patch
|
# Post-patch
|
||||||
#
|
#
|
||||||
|
|
||||||
post-patch: patch-prefix patch-pkgmessage
|
post-patch: patch-inplace patch-startup patch-pkgmessage
|
||||||
|
|
||||||
patch-prefix:
|
patch-inplace:
|
||||||
@${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g' \
|
@${REINPLACE_CMD} ${REINPLACE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
||||||
-e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
|
|
||||||
${WRKSRC}/scripts/upchk ${WRKSRC}/scripts/clientchk \
|
${WRKSRC}/scripts/upchk ${WRKSRC}/scripts/clientchk \
|
||||||
${WRKSRC}/src/Makefile
|
${WRKSRC}/src/Makefile
|
||||||
|
|
||||||
|
patch-startup:
|
||||||
|
@${SED} ${RCSCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
||||||
|
${FILESDIR}/upclient.sh > ${WRKDIR}/upclient.sh
|
||||||
|
|
||||||
patch-pkgmessage:
|
patch-pkgmessage:
|
||||||
@${SED} 's|%%PREFIX%%|${PREFIX}|g' ${MSG_FILE} > ${PKGMESSAGE}
|
@${SED} ${PKGMESSAGE_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \
|
||||||
|
${MSG_FILE} > ${PKGMESSAGE}
|
||||||
|
|
||||||
# Install
|
# Install
|
||||||
#
|
#
|
||||||
@ -96,7 +107,7 @@ install-conf:
|
|||||||
.endif
|
.endif
|
||||||
|
|
||||||
install-startup:
|
install-startup:
|
||||||
@${INSTALL_SCRIPT} ${FILESDIR}/upclient.sh \
|
@${INSTALL_SCRIPT} ${WRKDIR}/upclient.sh \
|
||||||
${PREFIX}/etc/rc.d/upclient.sh
|
${PREFIX}/etc/rc.d/upclient.sh
|
||||||
|
|
||||||
install-doc:
|
install-doc:
|
||||||
|
@ -1,6 +1,12 @@
|
|||||||
--- src/Makefile.orig Wed Dec 18 01:01:16 2002
|
--- src/Makefile.orig Tue May 27 09:13:02 2003
|
||||||
+++ src/Makefile Mon Feb 3 20:18:03 2003
|
+++ src/Makefile Wed Mar 3 00:41:50 2004
|
||||||
@@ -46,7 +46,7 @@
|
@@ -41,12 +41,12 @@
|
||||||
|
binname = upclient
|
||||||
|
|
||||||
|
# Uptimes Server
|
||||||
|
-uptimes_server = uptimes.wonko.com
|
||||||
|
+uptimes_server = uptimes.hostingwired.com
|
||||||
|
|
||||||
OPTIMIZATION_CFLAGS=-O3
|
OPTIMIZATION_CFLAGS=-O3
|
||||||
|
|
||||||
# System directories
|
# System directories
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
--- src/options.c.orig Sat Nov 30 03:27:15 2002
|
--- src/options.c.orig Tue May 27 09:03:43 2003
|
||||||
+++ src/options.c Wed Dec 18 01:43:00 2002
|
+++ src/options.c Wed Mar 3 00:47:28 2004
|
||||||
@@ -60,7 +60,7 @@
|
@@ -60,7 +60,7 @@
|
||||||
* Minimum value is enforced. A warning is logged if greater than upper limit.
|
* Minimum value is enforced. A warning is logged if greater than upper limit.
|
||||||
*/
|
*/
|
||||||
@ -9,3 +9,12 @@
|
|||||||
#define UPPER_INTERVAL 600 /* warning if exceeded */
|
#define UPPER_INTERVAL 600 /* warning if exceeded */
|
||||||
|
|
||||||
/* Macros */
|
/* Macros */
|
||||||
|
@@ -79,7 +79,7 @@
|
||||||
|
* These are the configuration options available.
|
||||||
|
*/
|
||||||
|
char cfg_authkey[AUTHKEY_REQUIRED_LEN + 1] = "";
|
||||||
|
-char cfg_upserver[UPSERVER_MAXLEN + 1] = "uptimes.wonko.com";
|
||||||
|
+char cfg_upserver[UPSERVER_MAXLEN + 1] = "uptimes.hostingwired.com";
|
||||||
|
long int cfg_interval = DEFAULT_INTERVAL;
|
||||||
|
char cfg_pidfile[PIDFILE_MAXLEN + 1] = PIDFILE;
|
||||||
|
char cfg_proxyserver[PROXYSERVER_MAXLEN + 1] = "";
|
||||||
|
20
misc/upclient/files/patch-upclient.man
Normal file
20
misc/upclient/files/patch-upclient.man
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
--- src/man/upclient.man.orig Tue May 27 09:03:42 2003
|
||||||
|
+++ src/man/upclient.man Wed Mar 3 00:46:01 2004
|
||||||
|
@@ -67,7 +67,7 @@
|
||||||
|
|
||||||
|
.Sh GETTING STARTED \" Section Header - required - don't modify
|
||||||
|
1. Create an account at:
|
||||||
|
-.Ar http://uptimes.wonko.com/ .
|
||||||
|
+.Ar http://uptimes.hostingwired.com/ .
|
||||||
|
2. Add a host, this gives you an authorization key.
|
||||||
|
3. Paste your auth key into
|
||||||
|
.Pa __CONFIGFILE__ .
|
||||||
|
@@ -75,7 +75,7 @@
|
||||||
|
.Op sudo
|
||||||
|
.Ic __SBINDIR__/__BINNAME__.
|
||||||
|
5. Visit your account at
|
||||||
|
-.Ar http://uptimes.wonko.com/
|
||||||
|
+.Ar http://uptimes.hostingwired.com/
|
||||||
|
to view your
|
||||||
|
machine's status and other collected statistics.
|
||||||
|
.Pp
|
@ -2,89 +2,51 @@
|
|||||||
#
|
#
|
||||||
# $FreeBSD$
|
# $FreeBSD$
|
||||||
#
|
#
|
||||||
# Start or stop upclient.
|
# PROVIDE: upclient
|
||||||
|
# REQUIRE: DAEMON
|
||||||
|
# KEYWORD: FreeBSD
|
||||||
|
#
|
||||||
|
# Add the following line to /etc/rc.conf to enable upclient:
|
||||||
|
#
|
||||||
|
# upclient_enable="YES"
|
||||||
#
|
#
|
||||||
|
|
||||||
rc_file=${0##*/}
|
upclient_precmd ()
|
||||||
rc_arg=$1
|
{
|
||||||
|
|
||||||
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/${rc_file}\$"); then
|
|
||||||
echo "${rc_file}: Cannot determine PREFIX." >&2
|
|
||||||
echo "Please use the complete pathname." >&2
|
|
||||||
exit 64
|
|
||||||
fi
|
|
||||||
|
|
||||||
program_dir=${PREFIX}/sbin
|
|
||||||
program_file=upclient
|
|
||||||
program_path=${program_dir}/${program_file}
|
|
||||||
|
|
||||||
config_dir=${PREFIX}/etc
|
|
||||||
config_file=${program_file}.conf
|
|
||||||
config_path=${config_dir}/${config_file}
|
|
||||||
|
|
||||||
sample_path=${config_path}.sample
|
|
||||||
|
|
||||||
pid_dir=/var/run
|
|
||||||
pid_file=${program_file}.pid
|
|
||||||
pid_path=${pid_dir}/${pid_file}
|
|
||||||
|
|
||||||
syslog_facility=daemon.err
|
|
||||||
|
|
||||||
case "$rc_arg" in
|
|
||||||
start)
|
|
||||||
if [ ! -x ${program_path} ]; then
|
|
||||||
logger -sp ${syslog_facility} -t ${program_file} \
|
|
||||||
"unable to start: ${program_path} is missing."
|
|
||||||
exit 72
|
|
||||||
fi
|
|
||||||
if [ ! -f ${config_path} ]; then
|
|
||||||
logger -sp ${syslog_facility} -t ${program_file} \
|
|
||||||
"unable to start: ${config_path} is missing."
|
|
||||||
exit 72
|
|
||||||
fi
|
|
||||||
ws=" "
|
ws=" "
|
||||||
if ! grep -qs "^[$ws]*AuthKey[$ws]*=" ${config_path}; then
|
grep -qs "^[$ws]*AuthKey[$ws]*=" ${configfile} ||
|
||||||
logger -sp ${syslog_facility} -t ${program_file} \
|
err 1 "AuthKey is missing from ${configfile}."
|
||||||
"unable to start: AuthKey is missing from" \
|
grep -qs "^[$ws]*AuthKey[$ws]*=[$ws]*your_authkey" ${configfile} &&
|
||||||
"${config_path}."
|
err 1 "AuthKey isn't configured in ${configfile}."
|
||||||
exit 72
|
|
||||||
fi
|
|
||||||
if grep -qs "^[$ws]*AuthKey[$ws]*=[$ws]*your_authkey" ${config_path}
|
|
||||||
then
|
|
||||||
logger -sp ${syslog_facility} -t ${program_file} \
|
|
||||||
"unable to start: AuthKey isn't configured in" \
|
|
||||||
"${config_path}."
|
|
||||||
exit 72
|
|
||||||
fi
|
|
||||||
kw="IdleTime|OS|(OS|CPU)Level"
|
|
||||||
if egrep -qs "^[$ws]*Send($kw)[$ws]*=" ${config_path}
|
|
||||||
then
|
|
||||||
logger -sp ${syslog_facility} -t ${program_file} \
|
|
||||||
"unable to start: ${config_path} needs to be updated" \
|
|
||||||
"from ${sample_path}."
|
|
||||||
exit 72
|
|
||||||
fi
|
|
||||||
${program_path} 2> /dev/null &&
|
|
||||||
echo -n " ${program_file}"
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
if [ -r ${pid_path} ]; then
|
|
||||||
kill $(cat ${pid_path}) 2> /dev/null
|
|
||||||
else
|
|
||||||
killall ${program_file} 2> /dev/null
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
restart)
|
|
||||||
$0 stop
|
|
||||||
$0 start
|
|
||||||
;;
|
|
||||||
status)
|
|
||||||
ps -auxww | egrep ${program_file} | egrep -v "($0|egrep)"
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "usage: ${rc_file} {start|stop|restart|status}" >&2
|
|
||||||
exit 64
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
hn=uptimes.wonko.com
|
||||||
|
egrep -qs "^[$ws]*UptimeServer[$ws]*=[$ws]*${hn}[$ws]*" ${configfile} &&
|
||||||
|
err 1 "${configfile} needs to be updated from ${samplefile}."
|
||||||
|
|
||||||
|
kw="IdleTime|OS|(OS|CPU)Level"
|
||||||
|
egrep -qs "^[$ws]*Send($kw)[$ws]*=" ${configfile} &&
|
||||||
|
err 1 "${configfile} needs to be updated from ${samplefile}."
|
||||||
|
|
||||||
|
:
|
||||||
|
}
|
||||||
|
|
||||||
|
upclient_enable=NO
|
||||||
|
upclient_flags=
|
||||||
|
|
||||||
|
. /etc/rc.subr
|
||||||
|
|
||||||
|
name=upclient
|
||||||
|
rcvar=$(set_rcvar)
|
||||||
|
|
||||||
|
# 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"
|
||||||
|
@ -2,4 +2,4 @@ Uptime Client is a little program that keeps track of your uptime and
|
|||||||
sends it to a server where you can compare it to many other hosts and
|
sends it to a server where you can compare it to many other hosts and
|
||||||
browse through various statistical information.
|
browse through various statistical information.
|
||||||
|
|
||||||
WWW: http://uptimes.wonko.com/
|
WWW: http://upclient.sourceforge.net
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
Before running the client for the first time, be sure to:
|
Before running the client for the first time, be sure to:
|
||||||
|
|
||||||
1. visit the Uptimes project's web site and register yourself
|
1. visit the Uptimes project's web site and register yourself
|
||||||
(WWW: http://uptimes.wonko.com/newuser.php).
|
(WWW: http://uptimes.hostingwired.com/newuser.php).
|
||||||
2. log in (WWW: http://uptimes.wonko.com/).
|
2. log in (WWW: http://uptimes.hostingwired.com/login.php).
|
||||||
3. Add your host (WWW: http://uptimes.wonko.com/hosts.php?op=add).
|
3. Add your host (WWW: http://uptimes.hostingwired.com/account.php).
|
||||||
It is very important that you do not lose the generated key
|
It is very important that you do not lose the generated key
|
||||||
since, for instance, they are no way to get it back by any way.
|
since, for instance, they are no way to get it back by any way.
|
||||||
|
|
||||||
@ -14,10 +14,10 @@ You will also have to edit %%PREFIX%%/etc/upclient.conf:
|
|||||||
|
|
||||||
- AuthKey is the ID you've received when you added your host.
|
- AuthKey is the ID you've received when you added your host.
|
||||||
- Interval is the amount of time between each update.
|
- Interval is the amount of time between each update.
|
||||||
(WWW: http://uptimes.wonko.com/uptimes42.html).
|
(WWW: http://uptimes.hostingwired.com/protocol.html).
|
||||||
Don't set this higher than 10 minutes, or else your host
|
Don't set this higher than 10 minutes, or else your host
|
||||||
won't appear in the list.
|
won't appear in the list.
|
||||||
- UptimeServer is the Uptimes Project's data server, currently
|
- UptimeServer is the Uptimes Project's data server, currently
|
||||||
uptimes.wonko.com (Since the official Uptimes Project's data
|
uptimes.hostingwired.com (Since the official Uptimes Project's
|
||||||
server has been terminated, data.uptimes.net must not be used
|
server has been terminated, uptimes.wonko.com and data.uptimes.net
|
||||||
anymore. So, please, take care about that).
|
must not be used anymore. So, please, take care about that).
|
||||||
|
@ -6,18 +6,18 @@ etc/upclient.conf.sample
|
|||||||
sbin/clientchk
|
sbin/clientchk
|
||||||
sbin/upchk
|
sbin/upchk
|
||||||
sbin/upclient
|
sbin/upclient
|
||||||
%%PORTDOCS%%share/doc/upclient/AUTHORS
|
%%PORTDOCS%%%%DOCSDIR%%/AUTHORS
|
||||||
%%PORTDOCS%%share/doc/upclient/COPYING
|
%%PORTDOCS%%%%DOCSDIR%%/COPYING
|
||||||
%%PORTDOCS%%share/doc/upclient/FAQ
|
%%PORTDOCS%%%%DOCSDIR%%/FAQ
|
||||||
%%PORTDOCS%%share/doc/upclient/HISTORY
|
%%PORTDOCS%%%%DOCSDIR%%/HISTORY
|
||||||
%%PORTDOCS%%share/doc/upclient/HISTORY-BETA
|
%%PORTDOCS%%%%DOCSDIR%%/HISTORY-BETA
|
||||||
%%PORTDOCS%%share/doc/upclient/INSTALL
|
%%PORTDOCS%%%%DOCSDIR%%/INSTALL
|
||||||
%%PORTDOCS%%share/doc/upclient/README
|
%%PORTDOCS%%%%DOCSDIR%%/README
|
||||||
%%PORTDOCS%%share/doc/upclient/TODO
|
%%PORTDOCS%%%%DOCSDIR%%/TODO
|
||||||
%%PORTDOCS%%share/doc/upclient/UptimesProtocol5
|
%%PORTDOCS%%%%DOCSDIR%%/UptimesProtocol5
|
||||||
share/locale/de/LC_MESSAGES/upclient.mo
|
share/locale/de/LC_MESSAGES/upclient.mo
|
||||||
share/locale/es/LC_MESSAGES/upclient.mo
|
share/locale/es/LC_MESSAGES/upclient.mo
|
||||||
share/locale/fr/LC_MESSAGES/upclient.mo
|
share/locale/fr/LC_MESSAGES/upclient.mo
|
||||||
share/locale/it/LC_MESSAGES/upclient.mo
|
share/locale/it/LC_MESSAGES/upclient.mo
|
||||||
share/locale/nl/LC_MESSAGES/upclient.mo
|
share/locale/nl/LC_MESSAGES/upclient.mo
|
||||||
%%PORTDOCS%%@dirrm share/doc/upclient
|
%%PORTDOCS%%@dirrm %%DOCSDIR%%
|
||||||
|
Loading…
Reference in New Issue
Block a user