diff options
author | hubertf <hubertf> | 2000-01-21 01:35:40 +0000 |
---|---|---|
committer | hubertf <hubertf> | 2000-01-21 01:35:40 +0000 |
commit | 9d6b614306b4a9993044e0281c1414e880b706ed (patch) | |
tree | 67d7cc3a379a132fc8191e0ad56977ba9eafdc88 /net/upclient | |
parent | 1783e7418bbf67e81335ebf1106568882e6939c9 (diff) | |
download | pkgsrc-9d6b614306b4a9993044e0281c1414e880b706ed.tar.gz |
Make this package match reality (V4.07).
A big THANKS to who told me that our client is upto date some weeks ago...
Diffstat (limited to 'net/upclient')
-rw-r--r-- | net/upclient/Makefile | 81 | ||||
-rw-r--r-- | net/upclient/files/md5 | 4 | ||||
-rw-r--r-- | net/upclient/files/patch-sum | 7 | ||||
-rw-r--r-- | net/upclient/files/upclient.sh | 3 | ||||
-rw-r--r-- | net/upclient/patches/patch-aa | 79 | ||||
-rw-r--r-- | net/upclient/patches/patch-ab | 29 | ||||
-rw-r--r-- | net/upclient/patches/patch-ac | 14 | ||||
-rw-r--r-- | net/upclient/pkg/MESSAGE | 12 | ||||
-rw-r--r-- | net/upclient/pkg/PLIST | 6 |
9 files changed, 146 insertions, 89 deletions
diff --git a/net/upclient/Makefile b/net/upclient/Makefile index 345ac30ece3..d19fc0e8018 100644 --- a/net/upclient/Makefile +++ b/net/upclient/Makefile @@ -1,31 +1,96 @@ -# $NetBSD: Makefile,v 1.1.1.1 1999/04/06 20:09:59 hubertf Exp $ +# $NetBSD: Makefile,v 1.2 2000/01/21 01:35:40 hubertf Exp $ # -DISTNAME= upclient-3.02 +DISTNAME= upclient-4.07 CATEGORIES= net -MASTER_SITES= http://uptime.hexon.cx/download/ \ - ftp://uptime.hexon.cx/pub/ +MASTER_SITES= ftp://ftp.uptimes.net/pub/uptimes/ \ + http://www.uptimes.net/download/ MAINTAINER= hubertf@netbsd.org -HOMEPAGE= http://uptime.hexon.cx/ +HOMEPAGE= http://www.uptimes.net/ -ALL_TARGET= bsd MESSAGE_FILE= ${WRKDIR}/.MESSAGE +ALL_TARGET= upclient + +.if !defined(UPCLIENT_LOGIN) || \ + !defined(UPCLIENT_PASSWORD) || \ + !defined(UPCLIENT_HOSTID) +IS_INTERACTIVE= yes +.endif post-extract: ${SED} \ -e 's|@PREFIX@|${PREFIX}|g' \ ${PKGDIR}/MESSAGE >${MESSAGE_FILE} +post-patch: + ${MV} ${WRKSRC}/upchk ${WRKSRC}/upchk.bak + ${SED} \ + -e 's|@PREFIX@|${PREFIX}|g' \ + >${WRKSRC}/upchk <${WRKSRC}/upchk.bak + +do-configure: + @${ECHO} "" ; \ + ${ECHO} '******************************************************' ;\ + if [ "${UPCLIENT_LOGIN}" = "" -o \ + "${UPCLIENT_PASSWORD}" = "" -o \ + "${UPCLIENT_HOSTID}" = "" ]; then \ + ${ECHO} "" ; \ + ${ECHO} 'See http://www.uptimes.net/ for more information!' ; \ + ${ECHO} "" ; \ + fi ; \ + if [ "${UPCLIENT_LOGIN}" = "" ]; then \ + ${ECHO} -n "Upclient login: " ; \ + read UPCLIENT_LOGIN ; \ + else \ + UPCLIENT_LOGIN=${UPCLIENT_LOGIN} ; \ + fi ; \ + if [ "${UPCLIENT_PASSWORD}" = "" ]; then \ + ${ECHO} -n "Upclient password: " ; \ + read UPCLIENT_PASSWORD ; \ + else \ + UPCLIENT_PASSWORD=${UPCLIENT_PASSWORD} ; \ + fi ; \ + if [ "${UPCLIENT_HOSTID}" = "" ]; then \ + ${ECHO} -n "Upclient host-id: " ; \ + read UPCLIENT_HOSTID ; \ + else \ + UPCLIENT_HOSTID=${UPCLIENT_HOSTID} ; \ + fi ; \ + ${ECHO} "" ; \ + ${ECHO} Configuring with: ; \ + ${ECHO} UPCLIENT_LOGIN=$$UPCLIENT_LOGIN ; \ + ${ECHO} UPCLIENT_PASSWORD=$$UPCLIENT_PASSWORD ; \ + ${ECHO} UPCLIENT_HOSTID=$$UPCLIENT_HOSTID ; \ + ${MV} ${WRKSRC}/config.h ${WRKSRC}/config.h.BAK ; \ + ${SED} \ + -e "s/@UPCLIENT_LOGIN@/$$UPCLIENT_LOGIN/" \ + -e "s/@UPCLIENT_PASSWORD@/$$UPCLIENT_PASSWORD/" \ + -e "s/@UPCLIENT_HOSTID@/$$UPCLIENT_HOSTID/" \ + <${WRKSRC}/config.h.BAK >${WRKSRC}/config.h ; \ + ${ECHO} "" ; \ + ${ECHO} '******************************************************' ;\ + ${ECHO} "" + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/upclient ${PREFIX}/bin ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/upclient - ${INSTALL_DATA} ${WRKSRC}/CHANGES ${PREFIX}/share/doc/upclient + ${INSTALL_DATA} ${WRKSRC}/AUTHORS ${PREFIX}/share/doc/upclient ${INSTALL_DATA} ${WRKSRC}/COPYING ${PREFIX}/share/doc/upclient + ${INSTALL_DATA} ${WRKSRC}/HISTORY ${PREFIX}/share/doc/upclient ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/upclient - ${INSTALL_DATA} ${WRKSRC}/upclient.conf ${PREFIX}/etc/upclient.conf.example ${SED} \ -e 's|@PREFIX@|${PREFIX}|g' \ + -e 's|@INSTALL@|${INSTALL}|g' \ + -e 's|@SU@|${SU}|g' \ ${FILESDIR}/upclient.sh >${PREFIX}/etc/rc.d/upclient.sh + ${CHMOD} +x ${PREFIX}/etc/rc.d/upclient.sh + +pre-package: + @${ECHO} '********************************************************' ;\ + ${ECHO} "* Please remember that the upclient binary package has" ; \ + ${ECHO} "* your login, password and hostid compiled in. Make sure" ; \ + ${ECHO} "* you know what you're doing with the binary pkg!" ; \ + ${ECHO} '********************************************************' ;\ .include "../../mk/bsd.pkg.mk" diff --git a/net/upclient/files/md5 b/net/upclient/files/md5 index 892ac3bb0b3..b76b9f857fc 100644 --- a/net/upclient/files/md5 +++ b/net/upclient/files/md5 @@ -1,3 +1,3 @@ -$NetBSD: md5,v 1.1.1.1 1999/04/06 20:10:00 hubertf Exp $ +$NetBSD: md5,v 1.2 2000/01/21 01:35:42 hubertf Exp $ -MD5 (upclient-3.02.tar.gz) = a9b5b801033ddd59e29fab6ff86175ce +MD5 (upclient-4.07.tar.gz) = 80988cc56ef4ac5ad25649987ef45940 diff --git a/net/upclient/files/patch-sum b/net/upclient/files/patch-sum index 7cf0b93684d..e8f43e1ac4d 100644 --- a/net/upclient/files/patch-sum +++ b/net/upclient/files/patch-sum @@ -1,5 +1,4 @@ -$NetBSD: patch-sum,v 1.1 1999/07/09 14:12:31 agc Exp $ +$NetBSD: patch-sum,v 1.2 2000/01/21 01:35:42 hubertf Exp $ -MD5 (patch-aa) = bada872b716f0b7e95e54e0cee54fe8c -MD5 (patch-ab) = 1e55e2ac93757ec60573956e2ca7de28 -MD5 (patch-ac) = 0ad3bfb974d1b6b70d0c3093396ce9b0 +MD5 (patch-aa) = 1dc4a2d34d31e8dfdc14199e8b71800d +MD5 (patch-ab) = 1fe7895456ff863dcaa4abecf76c4346 diff --git a/net/upclient/files/upclient.sh b/net/upclient/files/upclient.sh index d0881630351..3c343915921 100644 --- a/net/upclient/files/upclient.sh +++ b/net/upclient/files/upclient.sh @@ -2,6 +2,7 @@ if [ -x @PREFIX@/bin/upclient ] then - su -m nobody -c @PREFIX@/bin/upclient + @INSTALL@ -o nobody -m 644 /dev/null /var/run/upclient.pid + @SU@ -m nobody -c @PREFIX@/bin/upclient >/dev/null echo -n ' upclient' fi diff --git a/net/upclient/patches/patch-aa b/net/upclient/patches/patch-aa index a8f3e0b0d88..3c01c11963e 100644 --- a/net/upclient/patches/patch-aa +++ b/net/upclient/patches/patch-aa @@ -1,36 +1,45 @@ -$NetBSD: patch-aa,v 1.1.1.1 1999/04/06 20:10:00 hubertf Exp $ +$NetBSD: patch-aa,v 1.2 2000/01/21 01:35:43 hubertf Exp $ ---- Makefile.orig Sat Apr 3 11:47:04 1999 -+++ Makefile Sun Apr 4 06:31:51 1999 -@@ -1,7 +1,7 @@ - # Uptime Client Makefile - - # Location of config file (for example /etc/upclient.conf) --CONFIGFILE = upclient.conf -+CONFIGFILE = ${PREFIX}/etc/upclient.conf - - - ################ -@@ -13,7 +13,7 @@ - @echo "You must specify the system which you want to compile for:" - @echo "" - @echo "make linux Linux" -- @echo "make freebsd FreeBSD" -+ @echo "make bsd FreeBSD, NetBSD, OpenBSD, BSDi - @echo "make solaris Solaris" - @echo "" - -@@ -24,11 +24,11 @@ - CFLAGS='-DLINUX -DCONFIGFILE=\"$(CONFIGFILE)\"' \ - upclient - --freebsd: -+bsd: - $(MAKE) CC=gcc \ - LDFLAGS= \ - OBJECTS= \ -- CFLAGS='-DFREEBSD -DCONFIGFILE=\"$(CONFIGFILE)\"' \ -+ CFLAGS='-DxxxBSD -DCONFIGFILE=\"$(CONFIGFILE)\"' \ - upclient - - solaris: +--- config.h.orig Mon Jan 10 21:35:01 2000 ++++ config.h Fri Jan 21 01:36:24 2000 +@@ -16,7 +16,11 @@ + * Ultrix --> #define PLATFORM_CODE 3 + * Solaris --> #define PLATFORM_CODE 4 + */ ++#ifdef __NetBSD__ ++#define PLATFORM_CODE 1 ++#else + #define PLATFORM_CODE -1 ++#endif + + #if (PLATFORM_CODE == 0) + # define PLATFORM_LINUX +@@ -49,8 +53,8 @@ + * If you haven't registered yourself yet, go to + * http://www.uptimes.net/register.html + */ +-#define LOGINNAME "Enter your loginname here" +-#define PASSWORD "Enter your password here" ++#define LOGINNAME "@UPCLIENT_LOGIN@" ++#define PASSWORD "@UPCLIENT_PASSWORD@" + + + +@@ -61,7 +65,7 @@ + * column on http://www.uptimes.net/hosts.html. + * If your host isn't in the list, click "add host" + */ +-#define HOSTID 0 ++#define HOSTID @UPCLIENT_HOSTID@ + + + +@@ -125,7 +129,7 @@ + * + * Where should the client write it's pidfile? + */ +-#define PIDFILE "<path-to>/upclient.pid" ++#define PIDFILE "/var/run/upclient.pid" + + + diff --git a/net/upclient/patches/patch-ab b/net/upclient/patches/patch-ab index ed7243ece1b..d3600040ca1 100644 --- a/net/upclient/patches/patch-ab +++ b/net/upclient/patches/patch-ab @@ -1,13 +1,18 @@ -$NetBSD: patch-ab,v 1.1.1.1 1999/04/06 20:10:00 hubertf Exp $ +$NetBSD: patch-ab,v 1.2 2000/01/21 01:35:43 hubertf Exp $ ---- upclient.c.orig Sat Apr 3 16:25:30 1999 -+++ upclient.c Sun Apr 4 06:23:31 1999 -@@ -193,7 +193,7 @@ - return 1; - } - --#ifdef FREEBSD -+#ifdef xxxBSD - int getUptime (uptime) - unsigned long *uptime; - { +--- upchk.BAK Fri Jan 21 01:03:10 2000 ++++ upchk Fri Jan 21 01:03:36 2000 +@@ -24,11 +24,11 @@ + # + + # change this to the full path AND name of your upclient executable: +-upclient="/home/mydir/upclient" ++upclient="@PREFIX@/bin/upclient" + + # change this to the name of your upclient's pidfile (as defined in + # config.h of the upclient distribution) +-pidfile="/home/mydir/upclient.pid" ++pidfile="/var/run/upclient.pid" + + ########## you probably don't need to change anything below here ########## + diff --git a/net/upclient/patches/patch-ac b/net/upclient/patches/patch-ac deleted file mode 100644 index 36ccb2065f4..00000000000 --- a/net/upclient/patches/patch-ac +++ /dev/null @@ -1,14 +0,0 @@ -$NetBSD: patch-ac,v 1.1.1.1 1999/04/06 20:10:00 hubertf Exp $ - ---- upclient.h.orig Sat Apr 3 12:16:00 1999 -+++ upclient.h Sun Apr 4 06:23:36 1999 -@@ -30,7 +30,8 @@ - #include <sys/types.h> - #include <sys/utsname.h> - --#ifdef FREEBSD -+#ifdef xxxBSD -+#include <sys/param.h> - #include <sys/sysctl.h> - #endif - diff --git a/net/upclient/pkg/MESSAGE b/net/upclient/pkg/MESSAGE index 033ec008f33..4bfad100d36 100644 --- a/net/upclient/pkg/MESSAGE +++ b/net/upclient/pkg/MESSAGE @@ -1,10 +1,2 @@ -To fully configure the upclient, you need to - -1. Register at http://www.uptimes.net/ -2. Confirm your account as stated in the mail you get -3. Login on the web site and add a host, note the host ID -4. Copy @PREFIX@/etc/upclient.conf.example to @PREFIX@/etc/upclient.conf - and enter your values for the HostID, Login, Password and Interval. -5. Start upclient via @PREFIX@/etc/rc.d/upclient.sh either manually - or via /etc/rc.local. -6. Watch your host show up on the list. +To start the Uptime Client, run the @PREFIX@/etc/rc.d/upclient.sh +script either manually or via /etc/rc.local. diff --git a/net/upclient/pkg/PLIST b/net/upclient/pkg/PLIST index 64b7f03074d..d5ee9864fc7 100644 --- a/net/upclient/pkg/PLIST +++ b/net/upclient/pkg/PLIST @@ -1,7 +1,7 @@ -@comment $NetBSD: PLIST,v 1.1.1.1 1999/04/06 20:10:00 hubertf Exp $ +@comment $NetBSD: PLIST,v 1.2 2000/01/21 01:35:45 hubertf Exp $ bin/upclient etc/rc.d/upclient.sh -share/doc/upclient/CHANGES +share/doc/upclient/AUTHORS share/doc/upclient/COPYING +share/doc/upclient/HISTORY share/doc/upclient/README -etc/upclient.conf.example |