summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-apps/xmbmon
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-apps/xmbmon')
-rw-r--r--sys-apps/xmbmon/Manifest2
-rw-r--r--sys-apps/xmbmon/files/mbmon.confd10
-rw-r--r--sys-apps/xmbmon/files/mbmon.rc20
-rw-r--r--sys-apps/xmbmon/files/xmbmon-2.0.5-amd64.patch24
-rw-r--r--sys-apps/xmbmon/files/xmbmon-2.0.5-loopback.patch40
-rw-r--r--sys-apps/xmbmon/files/xmbmon-2.0.5-pid.patch31
-rw-r--r--sys-apps/xmbmon/metadata.xml5
-rw-r--r--sys-apps/xmbmon/xmbmon-2.0.5-r1.ebuild74
8 files changed, 206 insertions, 0 deletions
diff --git a/sys-apps/xmbmon/Manifest b/sys-apps/xmbmon/Manifest
new file mode 100644
index 000000000000..955aa9c48142
--- /dev/null
+++ b/sys-apps/xmbmon/Manifest
@@ -0,0 +1,2 @@
+DIST xmbmon205.tar.gz 142987 RMD160 5097801803ac13082c59fa9db9036098de11de82 SHA1 4fc4b1442a6e638b2c5cbcf9b26ca17465b0da70 SHA256 65b10ebfe53585ac22d6a31d8ef3fea552cb266cf2c124c00421dec1df5a4a4f
+DIST xmbmon205_fflush.patch 242 RMD160 563b7e2b2eb3b5ed0f18aeb1d2d5e85c9d2f0435 SHA1 690bce2bca8215eaa223fed5737b68900d2fbc71 SHA256 f837f465861ce46e4a90d1d3c7a680c1904f7fb91e14efcbad22313c90e2cdc7
diff --git a/sys-apps/xmbmon/files/mbmon.confd b/sys-apps/xmbmon/files/mbmon.confd
new file mode 100644
index 000000000000..01cc0ff6e5f0
--- /dev/null
+++ b/sys-apps/xmbmon/files/mbmon.confd
@@ -0,0 +1,10 @@
+# /etc/conf.d/mbmon
+
+# 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="-r"
diff --git a/sys-apps/xmbmon/files/mbmon.rc b/sys-apps/xmbmon/files/mbmon.rc
new file mode 100644
index 000000000000..6ca761f5e42f
--- /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
+# $Id$
+
+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-amd64.patch b/sys-apps/xmbmon/files/xmbmon-2.0.5-amd64.patch
new file mode 100644
index 000000000000..27b150e9b0ba
--- /dev/null
+++ b/sys-apps/xmbmon/files/xmbmon-2.0.5-amd64.patch
@@ -0,0 +1,24 @@
+diff -Naur xmbmon205.orig/configure xmbmon205/configure
+--- xmbmon205.orig/configure 2004-08-13 16:22:18.000000000 +0900
++++ xmbmon205/configure 2005-02-05 11:02:02.496163477 +0900
+@@ -3489,7 +3489,7 @@
+ i?86-*-freebsd*)
+ CC=cc
+ ;;
+- i?86-*-linux-*)
++ i?86-*-linux-* | x86_64-*-linux-*)
+ CC=gcc
+ HOSTDEF="-DLINUX"
+ ;;
+diff -Naur xmbmon205.orig/configure.in xmbmon205/configure.in
+--- xmbmon205.orig/configure.in 2004-08-13 16:06:31.000000000 +0900
++++ xmbmon205/configure.in 2005-02-05 11:01:35.414957216 +0900
+@@ -19,7 +19,7 @@
+ i?86-*-freebsd*)
+ CC=cc
+ ;;
+- i?86-*-linux-*)
++ i?86-*-linux-* | x86_64-*-linux-*)
+ CC=gcc
+ HOSTDEF="-DLINUX"
+ ;;
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/metadata.xml b/sys-apps/xmbmon/metadata.xml
new file mode 100644
index 000000000000..96a2d586367d
--- /dev/null
+++ b/sys-apps/xmbmon/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>base-system</herd>
+</pkgmetadata>
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..92ef5f4546da
--- /dev/null
+++ b/sys-apps/xmbmon/xmbmon-2.0.5-r1.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+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 ~x86-fbsd"
+IUSE="X"
+
+DEPEND="X? ( x11-libs/libXt
+ x11-libs/libSM
+ x11-libs/libX11
+ x11-libs/libICE )"
+
+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}/" \
+ -e '/^LDFLAGS=-s$/d' \
+ Makefile.in || die
+ sed -i \
+ -e '/^[[:space:]]*CC=gcc/s,.*,:;,' \
+ configure || 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
+}