pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/net/hobbitclient as discussed with gendalia@:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/1b6a42fe32ec
branches:  trunk
changeset: 396610:1b6a42fe32ec
user:      spz <spz%pkgsrc.org@localhost>
date:      Tue Jul 28 19:42:26 2009 +0000

description:
as discussed with gendalia@:
- add a patch to use hw.physmem64 instead of hw.physmem
- change paths around so VARBASE gets a workout too
- a bit of package makeup (DESTDIR, LICENSE)

diffstat:

 net/hobbitclient/Makefile              |  31 ++++++++++++++++++++++++++++++-
 net/hobbitclient/PLIST                 |   7 ++-----
 net/hobbitclient/distinfo              |   3 ++-
 net/hobbitclient/files/hobbitclient.sh |   8 ++++----
 net/hobbitclient/patches/patch-ac      |  16 ++++++++++++++++
 5 files changed, 54 insertions(+), 11 deletions(-)

diffs (145 lines):

diff -r 1aa3361c7c45 -r 1b6a42fe32ec net/hobbitclient/Makefile
--- a/net/hobbitclient/Makefile Tue Jul 28 19:12:36 2009 +0000
+++ b/net/hobbitclient/Makefile Tue Jul 28 19:42:26 2009 +0000
@@ -1,10 +1,12 @@
-# $NetBSD: Makefile,v 1.7 2009/04/11 18:40:15 tonnerre Exp $
+# $NetBSD: Makefile,v 1.8 2009/07/28 19:42:26 spz Exp $
 #
 
 DISTNAME=      hobbit-4.2.0
 PKGNAME=       hobbitclient-4.2.0
+PKGREVISION=   1
 CATEGORIES=    net
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=hobbitmon/}
+LICENSE=       gnu-gpl-v2
 
 MAINTAINER=    gendalia%NetBSD.org@localhost
 HOMEPAGE=      http://hobbitmon.sourceforge.net/
@@ -18,12 +20,16 @@
 #INSTALL_TARGET=
 MAKE_JOBS_SAFE=        NO
 
+PKG_DESTDIR_SUPPORT=destdir
+
 .include "../../mk/bsd.prefs.mk"
 
 BBUSER?=       hobbit
 BBGROUP?=      hobbit
 BBTOPDIR?=     ${PREFIX}/hobbit
 BBLOGDIR?=     ${VARBASE}/log/hobbit
+BBCLIENTLOGS?= ${VARBASE}/log/hobbit
+BBTMP?=        ${VARBASE}/hobbit
 BBSERVERNAME?= "`uname -n`"
 BBSERVERIP?=   127.0.0.1
 CONFTYPE?=     "server"
@@ -48,10 +54,27 @@
 CONFIGURE_ENV+=        BBUSER=${BBUSER:Q}
 CONFIGURE_ENV+=        BBTOPDIR=${BBTOPDIR:Q}
 CONFIGURE_ENV+=        BBLOGDIR=${BBLOGDIR:Q}
+CONFIGURE_ENV+=        BBCLIENTLOGS=${BBCLIENTLOGS}
+CONFIGURE_ENV+=        BBTMP=${BBTMP}
 CONFIGURE_ENV+=        BBHOSTIP=${BBSERVERIP:Q}
 CONFIGURE_ENV+=        MANROOT=${PREFIX}/${PKGMANDIR}/
 CONFIGURE_ENV+=        CONFTYPE="${CONFTYPE}"
 
+SUBST_CLASSES+=                BADPATHS
+SUBST_STAGE.BADPATHS=  post-configure
+SUBST_MESSAGE.BADPATHS=        "fixing up unfortunate BBCLIENTLOGS and BBTMP paths"
+SUBST_FILES.BADPATHS=  client/runclient.sh client/hobbitclient.cfg.DIST
+SUBST_FILES.BADPATHS+= common/hobbitclient.cfg.5 client/Makefile
+SUBST_FILES.BADPATHS+= lib/environ.c client/clientlaunch.cfg.DIST
+SUBST_SED.BADPATHS=    -e 's,$$(INSTALLROOT),$$(DESTDIR)$$(INSTALLROOT),g' \
+                       -e 's,$$HOBBITCLIENTHOME/logs,${BBCLIENTLOGS},g' \
+                       -e 's,$$HOBBITCLIENTHOME/tmp,${BBTMP},g' \
+                       -e 's,$$BBHOME/logs,${BBCLIENTLOGS},g' \
+                       -e 's,$$BBHOME/tmp,${BBTMP},g' \
+                       -e 's,$$(BBHOME)/logs,${BBCLIENTLOGS},g' \
+                       -e 's,$$(BBHOME)/tmp,${BBTMP},g' \
+                       
+
 USE_TOOLS+=     awk:run         cat:run         cp:run
 USE_TOOLS+=     cut:run         date:run        egrep:run
 USE_TOOLS+=     expr:run        find:run        grep:run
@@ -60,6 +83,12 @@
 USE_TOOLS+=     sort:run        tail:run        touch:run
 USE_TOOLS+=     tr:run          wc:run
 
+OWN_DIRS_PERMS+=       ${BBTOPDIR} ${BBUSER} ${BBGROUP} 0755
+OWN_DIRS_PERMS+=       ${BBTOPDIR}/client ${BBUSER} ${BBGROUP} 0755
+OWN_DIRS_PERMS+=       ${BBTOPDIR}/client/ext ${BBUSER} ${BBGROUP} 0755
+OWN_DIRS_PERMS+=       ${BBCLIENTLOGS} ${BBUSER} ${BBGROUP} 0755
+OWN_DIRS_PERMS+=       ${BBTMP} ${BBUSER} ${BBGROUP} 0755
+
 MAKE_ENV+=     MAKE=${MAKE_PROGRAM:Q}
 MAKE_ENV+=     PKGDIR=${PREFIX:Q}
 MAKE_ENV+=     ${TOOLS_ENV}
diff -r 1aa3361c7c45 -r 1b6a42fe32ec net/hobbitclient/PLIST
--- a/net/hobbitclient/PLIST    Tue Jul 28 19:12:36 2009 +0000
+++ b/net/hobbitclient/PLIST    Tue Jul 28 19:42:26 2009 +0000
@@ -1,5 +1,5 @@
-@comment $NetBSD: PLIST,v 1.4 2009/06/14 21:00:04 joerg Exp $
-@comment $NetBSD: PLIST,v 1.4 2009/06/14 21:00:04 joerg Exp $
+@comment $NetBSD: PLIST,v 1.5 2009/07/28 19:42:26 spz Exp $
+@comment $NetBSD: PLIST,v 1.5 2009/07/28 19:42:26 spz Exp $
 hobbit/client/bin/bb
 hobbit/client/bin/bbcmd
 hobbit/client/bin/bbdigest
@@ -28,6 +28,3 @@
 hobbit/client/bin/hobbitclient.sh
 hobbit/client/runclient.sh
 share/examples/rc.d/hobbitclient
-@pkgdir hobbit/client/tmp
-@pkgdir hobbit/client/logs
-@pkgdir hobbit/client/ext
diff -r 1aa3361c7c45 -r 1b6a42fe32ec net/hobbitclient/distinfo
--- a/net/hobbitclient/distinfo Tue Jul 28 19:12:36 2009 +0000
+++ b/net/hobbitclient/distinfo Tue Jul 28 19:42:26 2009 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2007/05/29 04:58:06 gendalia Exp $
+$NetBSD: distinfo,v 1.5 2009/07/28 19:42:26 spz Exp $
 
 SHA1 (allinone.patch) = 16631a912955fcf57e86d923522e6dde899cdcd8
 RMD160 (allinone.patch) = 52773fbb89f67e7a53782da9a4c3a05e42452914
@@ -7,3 +7,4 @@
 RMD160 (hobbit-4.2.0.tar.gz) = d3633c32f4fa7961d1069df2eb39104e9c891be2
 Size (hobbit-4.2.0.tar.gz) = 2341167 bytes
 SHA1 (patch-ab) = 8be66af4b877958f2bc64e18494c67a73acd4360
+SHA1 (patch-ac) = e51da2ae19bbdce48676296cddf8fe3194f8c7b1
diff -r 1aa3361c7c45 -r 1b6a42fe32ec net/hobbitclient/files/hobbitclient.sh
--- a/net/hobbitclient/files/hobbitclient.sh    Tue Jul 28 19:12:36 2009 +0000
+++ b/net/hobbitclient/files/hobbitclient.sh    Tue Jul 28 19:42:26 2009 +0000
@@ -10,10 +10,10 @@
 rcvar="$name"
 command="@PREFIX@/hobbit/client/runclient.sh"
 
-start_cmd="$command start"
-restart_cmd="$command restart"
-stop_cmd="$command stop"
-status_cmd="$command status"
+start_cmd="su - hobbit -c \"$command start\""
+restart_cmd="su - hobbit -c \"$command restart\""
+stop_cmd="su - hobbit -c \"$command stop\""
+status_cmd="su - hobbit -c \"$command status\""
 
 load_rc_config "$name"
 run_rc_command "$1"
diff -r 1aa3361c7c45 -r 1b6a42fe32ec net/hobbitclient/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/hobbitclient/patches/patch-ac Tue Jul 28 19:42:26 2009 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-ac,v 1.1 2009/07/28 19:42:26 spz Exp $
+
+--- client/netbsd-meminfo.c.orig        2006-08-09 20:09:58.000000000 +0000
++++ client/netbsd-meminfo.c     2008-11-23 15:09:28.000000000 +0000
+@@ -21,8 +21,8 @@
+ 
+ int main(int argc, char *argv[])
+ {
+-      int hw_physmem[] = { CTL_HW, HW_PHYSMEM };
+-      int physmem;
++      int hw_physmem[] = { CTL_HW, HW_PHYSMEM64 };
++      int64_t physmem;
+ 
+       int hw_pagesize[] = { CTL_HW, HW_PAGESIZE };
+       int pagesize;
+



Home | Main Index | Thread Index | Old Index