diff options
author | 2005-06-18 04:48:54 +0000 | |
---|---|---|
committer | 2005-06-18 04:48:54 +0000 | |
commit | f29c9e54966c58e05b2f56eebf4fabd6447a654a (patch) | |
tree | 9bfbbf77e27f8f379d4b5cca9a66bce61625f736 | |
parent | Version bump #96336 by Jesse Adelman. (diff) | |
download | historical-f29c9e54966c58e05b2f56eebf4fabd6447a654a.tar.gz historical-f29c9e54966c58e05b2f56eebf4fabd6447a654a.tar.bz2 historical-f29c9e54966c58e05b2f56eebf4fabd6447a654a.zip |
Add init.d script by Pedro Algarvio #96324 and some custom patches to bind daemon to loopback/write pid file.
Package-Manager: portage-2.0.51.22-r1
-rw-r--r-- | sys-apps/xmbmon/ChangeLog | 12 | ||||
-rw-r--r-- | sys-apps/xmbmon/Manifest | 24 | ||||
-rw-r--r-- | sys-apps/xmbmon/files/digest-xmbmon-2.0.5-r1 | 2 | ||||
-rw-r--r-- | sys-apps/xmbmon/files/mbmon.confd | 11 | ||||
-rw-r--r-- | sys-apps/xmbmon/files/mbmon.rc | 20 | ||||
-rw-r--r-- | sys-apps/xmbmon/files/xmbmon-2.0.5-loopback.patch | 40 | ||||
-rw-r--r-- | sys-apps/xmbmon/files/xmbmon-2.0.5-pid.patch | 31 | ||||
-rw-r--r-- | sys-apps/xmbmon/xmbmon-2.0.5-r1.ebuild | 67 |
8 files changed, 201 insertions, 6 deletions
diff --git a/sys-apps/xmbmon/ChangeLog b/sys-apps/xmbmon/ChangeLog index a7d869556b91..0416231ef691 100644 --- a/sys-apps/xmbmon/ChangeLog +++ b/sys-apps/xmbmon/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-apps/xmbmon -# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/xmbmon/ChangeLog,v 1.9 2005/02/05 03:32:54 matsuu Exp $ +# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/xmbmon/ChangeLog,v 1.10 2005/06/18 04:48:54 vapier Exp $ + +*xmbmon-2.0.5-r1 (18 Jun 2005) + + 18 Jun 2005; Mike Frysinger <vapier@gentoo.org> + +files/xmbmon-2.0.5-loopback.patch, +files/xmbmon-2.0.5-pid.patch, + +files/mbmon.confd, +files/mbmon.rc, +xmbmon-2.0.5-r1.ebuild: + Add init.d script by Pedro Algarvio #96324 and some custom patches to bind + daemon to loopback/write pid file. *xmbmon-2.0.5 (05 Feb 2005) diff --git a/sys-apps/xmbmon/Manifest b/sys-apps/xmbmon/Manifest index 40898148c218..024fca505b28 100644 --- a/sys-apps/xmbmon/Manifest +++ b/sys-apps/xmbmon/Manifest @@ -1,8 +1,24 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +MD5 1ac020de05308a507db43d8a16c91b55 ChangeLog 1554 +MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 MD5 c64efab0f0a18fa4a17711f31a9ba405 xmbmon-2.0.3.ebuild 1510 MD5 f924b4529d447126126533c75c6d27b6 xmbmon-2.0.5.ebuild 1631 -MD5 14df9f39b73f5e913339379a4537421e ChangeLog 1223 -MD5 9a09f8d531c582e78977dbfd96edc1f2 metadata.xml 164 -MD5 7cd8051a9606fc6b11bdb465b0e676b2 files/xmbmon-2.0.5-amd64.patch 674 -MD5 9c27e9d00e4c46cdac30f402fc3092c0 files/xmbmon-2.0.3-gcc34.patch 702 +MD5 495469e39e1df68b8c60b7ea7dcaf1a3 xmbmon-2.0.5-r1.ebuild 1808 MD5 bcbf7a71b0097dda70c0ca258cf00c84 files/digest-xmbmon-2.0.3 61 +MD5 9c27e9d00e4c46cdac30f402fc3092c0 files/xmbmon-2.0.3-gcc34.patch 702 +MD5 8e27c8cca2ba525771b72a602b821d19 files/mbmon.rc 489 MD5 0c353771c30cbc519c6e0691ff79a0ad files/digest-xmbmon-2.0.5 125 +MD5 7cd8051a9606fc6b11bdb465b0e676b2 files/xmbmon-2.0.5-amd64.patch 674 +MD5 d94cced51ed9cc01b86bb1ce4e22cd62 files/mbmon.confd 280 +MD5 3c8f0268ab51de0a52f5969f1c42af33 files/xmbmon-2.0.5-loopback.patch 1181 +MD5 00bb33e41041d97c8a371e193368b65d files/xmbmon-2.0.5-pid.patch 505 +MD5 0c353771c30cbc519c6e0691ff79a0ad files/digest-xmbmon-2.0.5-r1 125 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.1 (GNU/Linux) + +iD8DBQFCs6g5gIKl8Uu19MoRAmu1AJ4gGpo0jeMlwrF39AlfqlfZCfRM4ACZARJi +JjvnQWvS1RVHspLjsca7IUI= +=8Iw0 +-----END PGP SIGNATURE----- diff --git a/sys-apps/xmbmon/files/digest-xmbmon-2.0.5-r1 b/sys-apps/xmbmon/files/digest-xmbmon-2.0.5-r1 new file mode 100644 index 000000000000..d931610527c2 --- /dev/null +++ b/sys-apps/xmbmon/files/digest-xmbmon-2.0.5-r1 @@ -0,0 +1,2 @@ +MD5 ab6614c785f5b653fcc69fb9c02058f0 xmbmon205.tar.gz 142987 +MD5 cab271a816ed2aeb3f898f2dee493456 xmbmon205_fflush.patch 242 diff --git a/sys-apps/xmbmon/files/mbmon.confd b/sys-apps/xmbmon/files/mbmon.confd new file mode 100644 index 000000000000..807821b9b397 --- /dev/null +++ b/sys-apps/xmbmon/files/mbmon.confd @@ -0,0 +1,11 @@ +# /etc/conf.d/mbmon +# $Header: /var/cvsroot/gentoo-x86/sys-apps/xmbmon/files/mbmon.confd,v 1.1 2005/06/18 04:48:54 vapier Exp $ + +# Port to listen on. + +MBMON_PORT="12912" + +# These are default options to use with gkrellm2. +# See the mbmon(1) manpage for more info. + +MBMON_OPTS="-l" diff --git a/sys-apps/xmbmon/files/mbmon.rc b/sys-apps/xmbmon/files/mbmon.rc new file mode 100644 index 000000000000..06b22a9871fb --- /dev/null +++ b/sys-apps/xmbmon/files/mbmon.rc @@ -0,0 +1,20 @@ +#!/sbin/runscript +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/xmbmon/files/mbmon.rc,v 1.1 2005/06/18 04:48:54 vapier Exp $ + +start() { + einfo "Start Mother Board Monitor" + mbmon \ + -P ${MBMON_PORT} \ + ${MBMON_OPTS} + eend $? +} + +stop() { + einfo "Stop Mother Board Monitor" + start-stop-daemon --stop --pidfile /var/run/mbmon.pid + local ret=$? + rm -f /var/run/mbmon.pid + eend ${ret} +} diff --git a/sys-apps/xmbmon/files/xmbmon-2.0.5-loopback.patch b/sys-apps/xmbmon/files/xmbmon-2.0.5-loopback.patch new file mode 100644 index 000000000000..5a28b52f9ea2 --- /dev/null +++ b/sys-apps/xmbmon/files/xmbmon-2.0.5-loopback.patch @@ -0,0 +1,40 @@ +Listen on loopback only with the -l option + +patch by Mike Frysinger + +--- mbmon.c ++++ mbmon.c +@@ -41,4 +41,5 @@ + static const char *MyName = "mbmon"; + int port = 0; ++uint32_t listen_addr = INADDR_ANY; + + int usage(void) +@@ -61,4 +62,5 @@ + " -c count: repeat <count> times and exit\n" + " -P port: run in daemon mode, using given port for clients\n" ++" -l: listen on local interface only\n" + " -T|F [1-7]: print Temperature|Fanspeed according to following styles\n" + " style1: data1\\n\n" +@@ -318,5 +320,5 @@ + while ((ch = getopt(argc,argv,"VSIAfdDYe:p:s:c:T:F:tunNirh")) != -1) { + #else +- while ((ch = getopt(argc,argv,"VSIAfdDYe:p:c:T:F:tunNirhP:")) != -1) { ++ while ((ch = getopt(argc,argv,"VSIAfdDYe:p:c:T:F:tunNirhlP:")) != -1) { + #endif + switch(ch) { +@@ -371,4 +373,7 @@ + probe_request = optarg; + break; ++ case 'l': ++ listen_addr = INADDR_LOOPBACK; ++ break; + case 'P': + port = atoi (optarg); +@@ -458,5 +463,5 @@ + server.sin_family = AF_INET; + server.sin_port = htons (port); +- server.sin_addr.s_addr = INADDR_ANY; ++ server.sin_addr.s_addr = htonl(listen_addr); + if (bind (fd, (struct sockaddr *) &server, sizeof (server)) < 0) { + perror("bind"); diff --git a/sys-apps/xmbmon/files/xmbmon-2.0.5-pid.patch b/sys-apps/xmbmon/files/xmbmon-2.0.5-pid.patch new file mode 100644 index 000000000000..aecb5e7a9b7c --- /dev/null +++ b/sys-apps/xmbmon/files/xmbmon-2.0.5-pid.patch @@ -0,0 +1,31 @@ +Write a pid when we daemonize + +patch by Mike Frysinger + +--- mbmon.c ++++ mbmon.c +@@ -229,4 +229,5 @@ + static void daemonize() + { ++ pid_t pid; + int fd; + struct sigaction sa_ign, sa_save; +@@ -247,5 +248,5 @@ + sigaction(SIGHUP, &sa_ign, &sa_save); + +- switch (fork()) { ++ switch ((pid=fork())) { + case 0: + break; +@@ -259,4 +260,11 @@ + + default: ++ { ++ FILE *f = fopen("/var/run/mbmon.pid", "w"); ++ if (f != NULL) { ++ fprintf(f, "%i", pid); ++ fclose(f); ++ } ++ } + exit(0); + /* NOTREACHED */ diff --git a/sys-apps/xmbmon/xmbmon-2.0.5-r1.ebuild b/sys-apps/xmbmon/xmbmon-2.0.5-r1.ebuild new file mode 100644 index 000000000000..7e8ace592862 --- /dev/null +++ b/sys-apps/xmbmon/xmbmon-2.0.5-r1.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-apps/xmbmon/xmbmon-2.0.5-r1.ebuild,v 1.1 2005/06/18 04:48:54 vapier Exp $ + +inherit eutils + +MY_P=${PN}${PV//.} +DESCRIPTION="Mother Board Monitor Program for X Window System" +HOMEPAGE="http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/download.html" +SRC_URI="http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/xmbmon/${MY_P}.tar.gz + http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/xmbmon/${MY_P}_fflush.patch" +# http://www.nt.phys.kyushu-u.ac.jp/shimizu/download/xmbmon/${MY_P}_A7N8X-VM.patch + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="X" + +DEPEND="X? ( virtual/x11 )" + +S=${WORKDIR}/${MY_P} + +src_unpack() { + unpack ${A} + cd "${S}" + # epatch ${DISTDIR}/${MY_P}_A7N8X-VM.patch + epatch "${DISTDIR}"/${MY_P}_fflush.patch + epatch "${FILESDIR}"/${P}-amd64.patch + epatch "${FILESDIR}"/${P}-pid.patch + epatch "${FILESDIR}"/${P}-loopback.patch + sed -i \ + -e "/^CFLAGS=/s/-O3/${CFLAGS}/" \ + Makefile.in || die +} + +src_compile() { + econf || die "Configure failed" + emake mbmon || die "Make mbmon failed" + if use X ; then + emake xmbmon || die "Make xmbmon failed" + fi +} + +src_install() { + dosbin mbmon || die "mbmon failed" + doman mbmon.1 + dodoc ChangeLog* ReadMe* mbmon-rrd.pl + + if use X ; then + dosbin xmbmon || die "xmbmon failed" + doman xmbmon.1x + insinto /etc/X11/app-defaults/ + newins xmbmon.resources XMBmon + fi + + newinitd "${FILESDIR}"/mbmon.rc mbmon + newconfd "${FILESDIR}"/mbmon.confd mbmon +} + +pkg_postinst() { + echo + einfo "These programs access SMBus/ISA-IO ports without any kind" + einfo "of checking. It is, therefore, very dangerous and may cause" + einfo "a system-crash. Make sure you read ReadMe," + einfo "section 4, 'How to use!'" + echo +} |