From 20c397ddb5fdfd3a9afc87c370880d49f9ea08be Mon Sep 17 00:00:00 2001 From: jmmv Date: Wed, 2 Jul 2003 18:22:42 +0000 Subject: Convert to PKG_SYSCONFDIR and buildlink2. Bump PKGREVISION to 2. --- net/upclient/MESSAGE | 4 ++-- net/upclient/Makefile | 21 ++++++++++++++------- net/upclient/PLIST | 5 +++-- net/upclient/distinfo | 5 +++-- net/upclient/patches/patch-aa | 30 +++++++++++++++++------------- net/upclient/patches/patch-ae | 18 ++++++++++++++++++ 6 files changed, 57 insertions(+), 26 deletions(-) create mode 100644 net/upclient/patches/patch-ae (limited to 'net/upclient') diff --git a/net/upclient/MESSAGE b/net/upclient/MESSAGE index 41a0ee9e476..a02609bfe57 100644 --- a/net/upclient/MESSAGE +++ b/net/upclient/MESSAGE @@ -1,10 +1,10 @@ =========================================================================== -$NetBSD: MESSAGE,v 1.3 2002/09/24 12:30:28 wiz Exp $ +$NetBSD: MESSAGE,v 1.4 2003/07/02 18:22:42 jmmv Exp $ To start the Uptime Client, run the ${PREFIX}/etc/rc.d/upclient script either manually or via /etc/rc.local. Register your server at http://uptimes.wonko.com then edit -${LOCALBASE}/etc/upclient.conf to add your assigned AuthKey. +${PKG_SYSCONFDIR}/upclient.conf to add your assigned AuthKey. =========================================================================== diff --git a/net/upclient/Makefile b/net/upclient/Makefile index bcdf2dedd5f..7d20c19767c 100644 --- a/net/upclient/Makefile +++ b/net/upclient/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.11 2002/05/07 22:25:03 hubertf Exp $ +# $NetBSD: Makefile,v 1.12 2003/07/02 18:22:42 jmmv Exp $ # DISTNAME= upclient-4.2.1.23 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= net MASTER_SITES= http://uptimes.atomicvoid.net/files/ @@ -10,17 +10,23 @@ MAINTAINER= hubertf@netbsd.org HOMEPAGE= http://uptimes.wonko.com/ COMMENT= Keeps track of your server uptime, and compares it to other hosts +USE_BUILDLINK2= YES +USE_PKGINSTALL= YES + ALL_TARGET= bsd -post-patch: +EGDIR= ${PREFIX}/share/examples/upclient +CONF_FILES= ${EGDIR}/upclient.conf ${PKG_SYSCONFDIR}/upclient.conf +CFLAGS+= -DPKG_SYSCONFDIR=\"\\\"${PKG_SYSCONFDIR}\\\"\" + +BUILD_DIRS= ${WRKSRC}/src + +pre-configure: ${MV} ${WRKSRC}/scripts/upchk ${WRKSRC}/scripts/upchk.bak ${SED} \ -e 's|@PREFIX@|${PREFIX}|g' \ >${WRKSRC}/scripts/upchk <${WRKSRC}/scripts/upchk.bak -do-build: - cd ${WRKSRC}/src && ${MAKE} ${ALL_TARGET} - do-install: ${INSTALL_PROGRAM} ${WRKSRC}/src/upclient ${PREFIX}/bin ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/upclient @@ -30,7 +36,8 @@ do-install: ${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/upclient ${INSTALL_DATA} ${WRKSRC}/FAQ ${PREFIX}/share/doc/upclient ${INSTALL_DATA} ${WRKSRC}/INSTALL ${PREFIX}/share/doc/upclient - ${INSTALL_DATA} ${WRKSRC}/conf/upclient.conf ${PREFIX}/etc + ${INSTALL_DATA_DIR} ${EGDIR} + ${INSTALL_DATA} ${WRKSRC}/conf/upclient.conf ${EGDIR} ${SED} \ -e 's|@PREFIX@|${PREFIX}|g' \ -e 's|@INSTALL@|${INSTALL}|g' \ diff --git a/net/upclient/PLIST b/net/upclient/PLIST index 73cf8b1c891..50a516ec81f 100644 --- a/net/upclient/PLIST +++ b/net/upclient/PLIST @@ -1,11 +1,12 @@ -@comment $NetBSD: PLIST,v 1.2 2002/05/07 22:25:03 hubertf Exp $ +@comment $NetBSD: PLIST,v 1.3 2003/07/02 18:22:42 jmmv Exp $ bin/upclient etc/rc.d/upclient -etc/upclient.conf share/doc/upclient/AUTHORS share/doc/upclient/COPYING share/doc/upclient/HISTORY share/doc/upclient/README share/doc/upclient/FAQ share/doc/upclient/INSTALL +share/examples/upclient/upclient.conf +@dirrm share/examples/upclient @dirrm share/doc/upclient diff --git a/net/upclient/distinfo b/net/upclient/distinfo index 14a5df6760c..cfcf0c712eb 100644 --- a/net/upclient/distinfo +++ b/net/upclient/distinfo @@ -1,8 +1,9 @@ -$NetBSD: distinfo,v 1.8 2002/05/09 13:50:06 enami Exp $ +$NetBSD: distinfo,v 1.9 2003/07/02 18:22:42 jmmv Exp $ SHA1 (upclient-4.2.1.23.tar.gz) = c6595959c6a5058b03ab7096a6bf9c0dbfa4285a Size (upclient-4.2.1.23.tar.gz) = 29386 bytes -SHA1 (patch-aa) = 4492c6741adc516171ecba4d272f5ab46ec28ebe +SHA1 (patch-aa) = 2e1dacd293b69e0d2338e1a316d7d1d7015447c2 SHA1 (patch-ab) = dd1e318cee6e27fcf433b2123cf8f3f6ed8eb548 SHA1 (patch-ac) = ffd0c20defee33e94d6ea03d8b319e1e4cb60d23 SHA1 (patch-ad) = 3f80aa8eb580055f33f77062dd2e3e76f3ab11bd +SHA1 (patch-ae) = 37bc453a9193635eb9e7062c40674c2308d8fc79 diff --git a/net/upclient/patches/patch-aa b/net/upclient/patches/patch-aa index bfaf540bb80..f634e9ff15d 100644 --- a/net/upclient/patches/patch-aa +++ b/net/upclient/patches/patch-aa @@ -1,18 +1,22 @@ -$NetBSD: patch-aa,v 1.7 2002/05/07 22:25:03 hubertf Exp $ +$NetBSD: patch-aa,v 1.8 2003/07/02 18:22:42 jmmv Exp $ ---- src/options.c Sat Jun 16 14:15:04 2001 -+++ src/options.c Tue Jun 19 10:48:25 2001 -@@ -298,8 +298,11 @@ - if(!(fp = fopen("/etc/"CONFIGFILE, "r"))) { - /* Failed, now try to open config file in /usr/local/etc */ - if(!(fp = fopen("/usr/local/etc/"CONFIGFILE, "r"))) { +--- src/options.c.orig 2001-06-16 21:15:04.000000000 +0200 ++++ src/options.c +@@ -294,13 +294,10 @@ int read_config(void) { + + /* Try to open config file in current directory */ + if(!(fp = fopen(CONFIGFILE, "r"))) { +- /* Failed, now try to open config file in /etc */ +- if(!(fp = fopen("/etc/"CONFIGFILE, "r"))) { +- /* Failed, now try to open config file in /usr/local/etc */ +- if(!(fp = fopen("/usr/local/etc/"CONFIGFILE, "r"))) { - printf("Error: couldn't open config file %s for reading in:\n- current directory\n- /etc\n- /usr/local/etc\n", CONFIGFILE); - exit(-1); -+ /* Failed, now try to open config file in /usr/pkg/etc */ -+ if (!(fp = fopen("/usr/pkg/etc/"CONFIGFILE, "r"))) { -+ printf("Error: couldn't open config file %s for reading in:\n- current directory\n- /etc\n- /usr/local/etc\n- /usr/pkg/etc\n", CONFIGFILE); -+ exit(-1); -+ } - } +- } ++ /* Failed, now try to open config file in PKG_SYSCONFDIR */ ++ if(!(fp = fopen(PKG_SYSCONFDIR "/"CONFIGFILE, "r"))) { ++ printf("Error: couldn't open config file %s for reading in:\n- current directory\n- " PKG_SYSCONFDIR "\n", CONFIGFILE); ++ exit(-1); } } + diff --git a/net/upclient/patches/patch-ae b/net/upclient/patches/patch-ae new file mode 100644 index 00000000000..66ed3aafaaf --- /dev/null +++ b/net/upclient/patches/patch-ae @@ -0,0 +1,18 @@ +$NetBSD: patch-ae,v 1.1 2003/07/02 18:22:43 jmmv Exp $ + +--- src/Makefile.orig 2001-06-17 00:48:35.000000000 +0200 ++++ src/Makefile +@@ -36,10 +36,10 @@ nothing-specified: + @echo "" + + bsd: +- $(MAKE) CC=gcc \ +- LDFLAGS='-lkvm' \ ++ $(MAKE) \ ++ LDFLAGS='$(LDFLAGS) -lkvm' \ + OBJECTS='stats-bsd.c $(STDOPTS)' \ +- CFLAGS='-DPLATFORM_BSD -DCONFIGFILE=\"$(CONFIGFILE)\"' \ ++ CFLAGS='$(CFLAGS) -DPLATFORM_BSD -DCONFIGFILE=\"$(CONFIGFILE)\"' \ + upclient + + darwin: -- cgit v1.2.3