rpms/gkrellm/devel gkrellm-2.1.24-libdir.patch, NONE, 1.1 gkrellm-2.1.28-config.patch, NONE, 1.1 gkrellm-2.2.4-sansfont.patch, NONE, 1.1 gkrellm-2.2.7-width.patch, NONE, 1.1 gkrellm-2.2.9-gkrellmd.conf.patch, NONE, 1.1 gkrellm-2.2.9-hwmon.patch, NONE, 1.1 gkrellm-2.2.9-libdir.patch, NONE, 1.1 gkrellm-2.2.9-libsensors.patch, NONE, 1.1 gkrellm.desktop, NONE, 1.1 gkrellm.png, NONE, 1.1 gkrellm.spec, NONE, 1.1 gkrellmd.init, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Hans de Goede (jwrdegoede) fedora-extras-commits at redhat.com
Wed Jul 19 18:35:32 UTC 2006


Author: jwrdegoede

Update of /cvs/extras/rpms/gkrellm/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14547/devel

Modified Files:
	.cvsignore sources 
Added Files:
	gkrellm-2.1.24-libdir.patch gkrellm-2.1.28-config.patch 
	gkrellm-2.2.4-sansfont.patch gkrellm-2.2.7-width.patch 
	gkrellm-2.2.9-gkrellmd.conf.patch gkrellm-2.2.9-hwmon.patch 
	gkrellm-2.2.9-libdir.patch gkrellm-2.2.9-libsensors.patch 
	gkrellm.desktop gkrellm.png gkrellm.spec gkrellmd.init 
Log Message:
auto-import gkrellm-2.2.9-7 on branch devel from gkrellm-2.2.9-7.src.rpm

gkrellm-2.1.24-libdir.patch:

--- NEW FILE gkrellm-2.1.24-libdir.patch ---
--- gkrellm-2.1.24/src/Makefile.lib64	2004-01-09 13:32:02.000000000 +0100
+++ gkrellm-2.1.24/src/Makefile	2004-01-09 13:32:23.000000000 +0100
@@ -17,7 +17,7 @@
 MANDIRMODE ?= 755
 INSTALL ?= install
 LINK_FLAGS ?= -Wl,-E
-SMC_LIBS ?= -L/usr/X11R6/lib -lSM -lICE
+SMC_LIBS ?= -lSM -lICE
 
 ifeq ($(without-ssl),1)
 	CONFIGURE_ARGS += --without-ssl

gkrellm-2.1.28-config.patch:

--- NEW FILE gkrellm-2.1.28-config.patch ---
--- gkrellm-2.1.28/server/gkrellmd.conf.rh1	2004-03-10 14:06:21.883901449 +0100
+++ gkrellm-2.1.28/server/gkrellmd.conf	2004-03-10 14:12:20.712149159 +0100
@@ -17,18 +17,19 @@
 # List of hosts allowed to connect.  If no hosts are specified in a
 # gkrellmd.conf file or on the command line, all hosts will be allowed.
 #
-#allow-host	localhost
-#allow-host	127.0.0.1
+allow-host	localhost
+allow-host	127.0.0.1
+allow-host	::ffff:127.0.0.1
 #allow-host	::1
 #allow-host	192.168.0.*
 
 # Drop privileges after startup (you must start gkrellmd as root to do it).
 #
-#user	nobody
-#group	proc
+user	gkrellmd
+group	proc
 
 # Run in background and detach from the controlling terminal
-#detach
+detach
 
 # Time interval between checks for various monitors.  If nfs-interval
 # is <= 0 then gkrellmd will not read data for nfs file system types.
@@ -51,7 +52,7 @@
 # Minimum is 2 (less than 2 for no I/O disconnecting and is the default).
 # Requires at least 2.1.8 versions of both gkrellmd and gkrellm.
 #
-#io-timeout 5
+io-timeout 5
 
 # Configure gkrellm clients to attempt automatic reconnects to a
 # gkrellmd server every reconnect-timeout seconds after a disconnected
@@ -60,7 +61,7 @@
 # Minimum is 2 (less than 2 for no automatic reconnecting and is the default).
 # Requires at least 2.1.8 versions of both gkrellmd and gkrellm.
 #
-#reconnect-timeout 5
+reconnect-timeout 5
 
 # Server side local mailbox counts can be sent to gkrellm clients.  List here
 # paths to mbox, MH mail, or Maildir style mailboxes.

gkrellm-2.2.4-sansfont.patch:

--- NEW FILE gkrellm-2.2.4-sansfont.patch ---
--- gkrellm-2.2.4/src/gui.c.font	2005-05-17 15:37:16.000000000 +0200
+++ gkrellm-2.2.4/src/gui.c	2005-05-17 15:37:46.000000000 +0200
@@ -1575,11 +1575,11 @@
 	if (!_GK.theme_path || !g_file_test(_GK.theme_path, G_FILE_TEST_IS_DIR))
 		gkrellm_dup_string(&_GK.theme_path, "");
 	if (!large_font.string)
-		gkrellm_dup_string(&large_font.string, "Serif 11");
+		gkrellm_dup_string(&large_font.string, "Sans 11");
 	if (!normal_font.string)
-		gkrellm_dup_string(&normal_font.string, "Serif 9");
+		gkrellm_dup_string(&normal_font.string, "Sans 9");
 	if (!small_font.string)
-		gkrellm_dup_string(&small_font.string, "Serif 8");
+		gkrellm_dup_string(&small_font.string, "Sans 8");
 	}
 
 

gkrellm-2.2.7-width.patch:

--- NEW FILE gkrellm-2.2.7-width.patch ---
--- gkrellm-2.2.7/src/gkrellm.h.width	2005-06-09 12:48:34.000000000 +0200
+++ gkrellm-2.2.7/src/gkrellm.h	2005-06-09 12:48:37.000000000 +0200
@@ -518,7 +518,7 @@
 	GkrellmCallback;
 
 
-#define CHART_WIDTH_MAX	1000
+#define CHART_WIDTH_MAX	1600
 #define CHART_WIDTH_MIN	25
 
   /* Each chart must have a GkrellmChartconfig struct associated with it.

gkrellm-2.2.9-gkrellmd.conf.patch:

--- NEW FILE gkrellm-2.2.9-gkrellmd.conf.patch ---
--- gkrellm-2.2.9/server/gkrellmd.conf~	2006-07-16 20:44:23.000000000 +0200
+++ gkrellm-2.2.9/server/gkrellmd.conf	2006-07-16 20:44:23.000000000 +0200
@@ -26,7 +26,7 @@
 # Drop privileges after startup (you must start gkrellmd as root to do it).
 #
 user	gkrellmd
-group	proc
+group	gkrellmd
 
 # Run in background and detach from the controlling terminal
 detach

gkrellm-2.2.9-hwmon.patch:

--- NEW FILE gkrellm-2.2.9-hwmon.patch ---
--- gkrellm-2.2.9/src/sysdeps/linux.c~	2006-07-05 21:44:55.000000000 +0200
+++ gkrellm-2.2.9/src/sysdeps/linux.c	2006-07-05 21:55:48.000000000 +0200
@@ -1888,6 +1888,7 @@
 #define	THERMAL_DIR			"/proc/acpi/thermal"
 #define	SENSORS_DIR			"/proc/sys/dev/sensors"
 #define SYSFS_I2C_DIR		"/sys/bus/i2c/devices"
+#define SYSFS_CLASS_DIR		"/sys/class/hwmon"
 #define UNINORTH_DIR       "/sys/devices/temperatures"
 
   /* mbmon and hddtemp sensor interfaces are handled in sensors-common.c
@@ -2351,15 +2352,24 @@
 	gchar			*name, *bus_name, *default_label, *vref,
 					*id_name,  *chip_name, *s, *d, *sensor_path;
 	gchar			path[256], buf[256];
+	gboolean		using_i2c_dir = FALSE;
 
 	if (!have_sysfs)
 		return;
 
-	if ((dir = g_dir_open(SYSFS_I2C_DIR, 0, NULL)) == NULL)
-		return;
+	if ((dir = g_dir_open(SYSFS_CLASS_DIR, 0, NULL)) == NULL)
+	{
+		/* try again with the sysfs i2c dir for older 2.6 kernels */
+		if ((dir = g_dir_open(SYSFS_I2C_DIR, 0, NULL)) == NULL)
+ 			return;
+		using_i2c_dir = TRUE;
+	}
 	while ((bus_name = (gchar *) g_dir_read_name(dir)) != NULL)
 		{
-		snprintf(path, sizeof(path), "%s/%s", SYSFS_I2C_DIR, bus_name);
+		if (using_i2c_dir)
+			snprintf(path, sizeof(path), "%s/%s", SYSFS_I2C_DIR, bus_name);
+		else
+			snprintf(path, sizeof(path), "%s/%s/device", SYSFS_CLASS_DIR, bus_name);
 		if ((chip_dir = g_dir_open(path, 0, NULL)) == NULL)
 			continue;
 		if ((chip_name = sysfs_get_chip_name(path)) == NULL)

gkrellm-2.2.9-libdir.patch:

--- NEW FILE gkrellm-2.2.9-libdir.patch ---
--- gkrellm-2.2.9/server/gkrellmd.h.libdir	2006-05-15 14:32:02.000000000 +0200
+++ gkrellm-2.2.9/server/gkrellmd.h	2006-05-15 14:35:02.000000000 +0200
@@ -105,9 +105,16 @@
 #define GKRELLMD_CONFIG     "gkrellmd.conf"
 
 #define GKRELLMD_PLUGINS_DIR		".gkrellm2/plugins-gkrellmd"
-#define GKRELLMD_LOCAL_PLUGINS_DIR	"/usr/local/lib/gkrellm2/plugins-gkrellmd"
+
+#if defined (__x86_64__) || defined (__s390x__) || defined (__ppc64__) || defined(__powerpc64__)
+#define LIBDIREXT "lib64"
+#else
+#define LIBDIREXT "lib"
+#endif
+
+#define GKRELLMD_LOCAL_PLUGINS_DIR	"/usr/local/"LIBDIREXT"/gkrellm2/plugins-gkrellmd"
 #if !defined(GKRELLMD_SYSTEM_PLUGINS_DIR)
-#define GKRELLMD_SYSTEM_PLUGINS_DIR	"/usr/lib/gkrellm2/plugins-gkrellmd"
+#define GKRELLMD_SYSTEM_PLUGINS_DIR	"/usr/"LIBDIREXT"/gkrellm2/plugins-gkrellmd"
 #endif
 
 #if !defined(WIN32)
--- gkrellm-2.2.9/src/gkrellm.h.libdir	2006-05-15 14:09:01.000000000 +0200
+++ gkrellm-2.2.9/src/gkrellm.h	2006-05-15 14:36:39.000000000 +0200
@@ -118,9 +118,16 @@
 #if !defined(SYSTEM_THEMES_DIR)
 #define	SYSTEM_THEMES_DIR		"/usr/share/gkrellm2/themes"
 #endif
-#define	LOCAL_PLUGINS_DIR		"/usr/local/lib/gkrellm2/plugins"
+
+#if defined (__x86_64__) || defined (__s390x__) || defined (__ppc64__) || defined(__powerpc64__)
+#define LIBDIREXT "lib64"
+#else
+#define LIBDIREXT "lib"
+#endif  
+
+#define	LOCAL_PLUGINS_DIR		"/usr/local/"LIBDIREXT"/gkrellm2/plugins"
 #if !defined(SYSTEM_PLUGINS_DIR)
-#define	SYSTEM_PLUGINS_DIR		"/usr/lib/gkrellm2/plugins"
+#define	SYSTEM_PLUGINS_DIR		"/usr/"LIBDIREXT"/gkrellm2/plugins"
 #endif
 
 #else

gkrellm-2.2.9-libsensors.patch:

--- NEW FILE gkrellm-2.2.9-libsensors.patch ---
--- gkrellm-2.2.9/src/sysdeps/linux.c.libsensors	2006-07-07 15:13:14.000000000 +0200
+++ gkrellm-2.2.9/src/sysdeps/linux.c	2006-07-07 15:13:23.000000000 +0200
@@ -29,8 +29,11 @@
 					have_diskstats,
 					have_partition_stats,
 					have_sysfs,
-					have_sysfs_stats,
-					have_sysfs_sensors;
+					have_sysfs_stats;
+#ifndef HAVE_LIBSENSORS
+static gboolean		have_sysfs_sensors;
+#endif
+
 static gchar		locale_decimal_point;
 
 
@@ -1912,6 +1915,158 @@
 #define IBM_ACPI_NA2_TEMP        7
 #define IBM_ACPI_FAN		 8
 
+#ifdef HAVE_LIBSENSORS
+#include <sensors/sensors.h>
+
+static void libsensors_init(void)
+{
+  int nr, nr1, nr2, len;
+  const sensors_chip_name *name;
+  const sensors_feature_data *feature;
+  char *label;
+  FILE *f;
+  char id_name[512], sensor_path[512];
+  int type;
+  
+  f = fopen("/etc/sensors.conf", "r");
+  if (!f) {
+    if (_GK.debug_level & DEBUG_SENSORS)
+      printf("libsensors error could not open /etc/sensors.conf\n");
+    return;
+  }
+  
+  if (sensors_init(f) != 0) {
+    if (_GK.debug_level & DEBUG_SENSORS)
+      printf("libsensors init failed!\n");
+    return;
+  }
+  fclose(f);
+  
+  nr = 0;
+  while ((name = sensors_get_detected_chips(&nr))) {
+    nr1 = 0, nr2 = 0;
+    while ((feature = sensors_get_all_features(*name, &nr1, &nr2))) {
+      if (sensors_get_ignored(*name, feature->number) &&
+          feature->mapping == SENSORS_NO_MAPPING) {
+        if (name->bus >= 0)
+          snprintf(id_name, sizeof(id_name), "%s@%d:%x/%s", name->prefix,
+            name->bus, name->addr, feature->name);
+        else
+          snprintf(id_name, sizeof(id_name), "%s@%x/%s", name->prefix,
+            name->addr, feature->name);
+        /* we need to store both the prefix and the busname, but we only
+           have one string, so concat them together seperated by a : */
+        snprintf(sensor_path, sizeof(sensor_path), "%s:%s", name->prefix,
+          name->busname? name->busname:"NULL");
+        
+        if (!strncmp(feature->name, "temp", 4))
+          type = SENSOR_TEMPERATURE;
+        else if (!strncmp(feature->name, "fan", 3))
+          type = SENSOR_FAN;
+        else if (!strncmp(feature->name, "in", 2))
+          type = SENSOR_VOLTAGE;
+        else {
+          if (_GK.debug_level & DEBUG_SENSORS)
+            printf("libsensors error determining type for: %s\n", id_name);
+          continue;
+        }
+
+        /* failsafe tests, check if bus and addr fit in 16 bits (signed) */
+        if (name->bus != ((name->bus<<16)>>16)) {
+          if (_GK.debug_level & DEBUG_SENSORS)
+            printf("libsensors error cannot represent bus in 16 bits: %s\n",
+              id_name);
+          continue;
+        }
+        if (name->addr != ((name->addr<<16)>>16)) {
+          if (_GK.debug_level & DEBUG_SENSORS)
+            printf("libsensors error cannot represent addr in 16 bits: %s\n",
+              id_name);
+          continue;
+        }
+
+        if (sensors_get_label(*name, feature->number, &label) != 0) {
+          if (_GK.debug_level & DEBUG_SENSORS)
+            printf("libsensors error getting label for: %s\n", id_name);
+          label = NULL;
+        }
+
+        /* Strip some common post and prefixes to get smaller default labels */
+        len = strlen(label);
+        switch(type) {
+          case SENSOR_TEMPERATURE:
+            if (len > 5 && !strcasecmp(label+len-5, " Temp"))
+              label[len-5] = 0;
+            if (len > 12 && !strcasecmp(label+len-12, " Temperature"))
+              label[len-12] = 0;
+            break;
+          case SENSOR_FAN:
+            if (len > 4 && !strcasecmp(label+len-4, " Fan"))
+              label[len-4] = 0;
+            if (len > 10 && !strcasecmp(label+len-10, " FAN Speed"))
+              label[len-10] = 0;
+            break;
+          case SENSOR_VOLTAGE:
+            if (len > 8 && !strcasecmp(label+len-8, " Voltage"))
+              label[len-8] = 0;
+            if (!strncmp(label, "ATX ", 4))
+              memmove(label, label+4, strlen(label+4)+1);
+            break;
+        }
+        /* notice that we store the bus and addr both in iodev as 2 _signed_
+           16 bit ints */
+        gkrellm_sensors_add_sensor(type, sensor_path, id_name, feature->number,
+          (name->bus&0xFFFF) | (name->addr<<16), LM_SENSOR_INTERFACE, 1.0, 0.0,
+          NULL, label);
+        if (label)
+          free(label);
+      }
+    }
+  }
+}
+
+gboolean libsensors_get_value(char *sensor_path,
+  int id, int iodev, float *value)
+{
+  char *p;
+  sensors_chip_name name;
+  double val;
+  int result;
+  
+  /* fill name */
+  p = strchr(sensor_path, ':');
+  if (!p) {
+    if (_GK.debug_level & DEBUG_SENSORS)
+      printf("libsensors error parsing sensor_path: %s\n", sensor_path);
+    return FALSE;
+  }
+  *p = 0; /* We must undo this !! (or make a copy) */
+  name.prefix  = sensor_path;
+  name.bus     = (iodev << 16) >> 16; /* sign extend the low 16 bits */
+  name.addr    = iodev >> 16;
+  name.busname = p + 1;
+  if (!strcmp(name.busname, "NULL"))
+    name.busname = NULL;
+
+  result = sensors_get_feature(name, id, &val) == 0;
+  
+  if (!result && (_GK.debug_level & DEBUG_SENSORS)) {
+    if (name.bus >= 0)
+      printf("libsensors error getting value for: %s@%d:%x feature: %d\n",
+        name.prefix, name.bus, name.addr, id);
+    else
+      printf("libsensors error getting value for: %s@%x feature: %d\n",
+        name.prefix, name.addr, id);
+  }
+
+  if (value)
+    *value = val;
+
+  *p = ':'; /* !!! */
+  return result;
+}
+
+#else
 typedef struct
 	{
 	gchar	*name;
@@ -2037,7 +2192,7 @@
 	{ "+3.3V",	1.0,    0, 		NULL }
 	};
 
-
+#endif
 
 gboolean
 gkrellm_sys_sensors_get_temperature(gchar *sensor_path, gint id,
@@ -2046,8 +2201,11 @@
 	FILE		*f;
 	gchar		buf[128], units[32];
 	gint		n;
-	gfloat		T, t[5], ibm_acpi_temp[8];
+	gfloat		T, ibm_acpi_temp[8];
 	gboolean	result = FALSE;
+#ifndef HAVE_LIBSENSORS
+	gfloat		t[5];
+#endif
 
 	if (   interface == THERMAL_INTERFACE
 	    || interface == THERMAL_ZONE_INTERFACE
@@ -2142,6 +2300,9 @@
             }
         }
 
+#ifdef HAVE_LIBSENSORS
+	return libsensors_get_value(sensor_path, id, iodev, temp);
+#else
 	if ((f = fopen(sensor_path, "r")) == NULL)
 		return FALSE;
 	fgets(buf, sizeof(buf), f);
@@ -2162,6 +2323,7 @@
 	if (temp)
 		*temp = T;
 	return TRUE;
+#endif
 	}
 
 gboolean
@@ -2170,9 +2332,12 @@
 	{
 	FILE		*f;
 	gchar		buf[64];
-	gint		n;
-	gfloat		t[4], T;
+	gfloat		T;
 	gboolean	result = FALSE;
+#ifndef HAVE_LIBSENSORS
+	gint		n;
+	gfloat		t[4];
+#endif
 
 	if (interface == IBM_ACPI_INTERFACE)
 		{
@@ -2196,6 +2361,9 @@
 		return gkrellm_sys_sensors_mbmon_get_value(sensor_path, fan);
 		}
 
+#ifdef HAVE_LIBSENSORS
+	return libsensors_get_value(sensor_path, id, iodev, fan);
+#else
 	if ((f = fopen(sensor_path, "r")) == NULL)
 		return FALSE;
 	fgets(buf, sizeof(buf), f);
@@ -2210,16 +2378,19 @@
 	if (fan)
 		*fan = t[n - 1];
 	return TRUE;
+#endif
 	}
 
 gboolean
 gkrellm_sys_sensors_get_voltage(gchar *sensor_path, gint id,
 		gint iodev, gint interface, gfloat *volt)
 	{
+#ifndef HAVE_LIBSENSORS
 	FILE	*f;
 	gchar	buf[64];
 	gfloat	V, t[3];
 	gint	n;
+#endif
 
 	if (interface == MBMON_INTERFACE)
 		{
@@ -2227,6 +2398,9 @@
 		return gkrellm_sys_sensors_mbmon_get_value(sensor_path, volt);
 		}
 
+#ifdef HAVE_LIBSENSORS
+	return libsensors_get_value(sensor_path, id, iodev, volt);
+#else
 	if ((f = fopen(sensor_path, "r")) == NULL)
 		return FALSE;
 	fgets(buf, sizeof(buf), f);
@@ -2247,8 +2421,10 @@
 	if (volt)
 		*volt = V;
 	return TRUE;
+#endif
 	}
 
+#ifndef HAVE_LIBSENSORS
 static void
 get_volt_default(gchar *chip_name, VoltDefault **vdf, gint *vdfsize)
 	{
@@ -2453,17 +2629,22 @@
   |  "isa", and besides, probably sysfs will eventually be more common
   |  so I'll just make its names the standard now (gkrellm 2.1.20).
   */
+#endif
+
 gboolean
 gkrellm_sys_sensors_init(void)
 	{
 	FILE			*f;
-	GDir			*dir, *chip_dir;
-	VoltDefault		*voltdefault;
+	GDir			*dir;
 	gint			id = 0;
+	gchar			*name, *path, *sensor_path, *sensor_name, id_name[128];
+#ifndef HAVE_LIBSENSORS
+	GDir			*chip_dir;
+	VoltDefault		*voltdefault;
 	gint			type, voltdefaultsize;
 	gfloat			factor, offset;
-	gchar			*name, *chip_name, *fixed_chip_name, *path, *default_label;
-	gchar			*vref, *sensor_path, *sensor_name, id_name[128];
+	gchar			*vref, *chip_name, *fixed_chip_name, *default_label;
+#endif
 	struct lconv	*lc;
 
 	lc = localeconv();
@@ -2607,7 +2788,9 @@
         g_dir_close(dir);
         }
 
-
+#ifdef HAVE_LIBSENSORS
+	libsensors_init();
+#else
 	if ((dir = g_dir_open(SENSORS_DIR, 0, NULL)) == NULL)
 		{
 		sysfs_sensors_init();
@@ -2690,5 +2873,6 @@
 		g_free(fixed_chip_name);
 		}
 	g_dir_close(dir);
+#endif
 	return TRUE;
 	}


--- NEW FILE gkrellm.desktop ---
[Desktop Entry]
Encoding=UTF-8
Name=GKrellM System Monitor
Comment=Monitor for CPU, memory, disks, network, mail
Exec=gkrellm
Icon=gkrellm.png
Terminal=false
Type=Application
Categories=Application;System;Monitor;


--- NEW FILE gkrellm.spec ---
Name:           gkrellm
Version:        2.2.9
Release:        7%{?dist}
Summary:        Multiple stacked system monitors in one process
Group:          Applications/System
License:        GPL
URL:            http://www.gkrellm.net/
Source0:        http://members.dslextreme.com/users/billw/gkrellm/%{name}-%{version}.tar.bz2
Source1:        gkrellmd.init
Source2:        gkrellm.desktop
Source3:        gkrellm.png
Patch0:         gkrellm-2.1.24-libdir.patch
Patch1:         gkrellm-2.1.28-config.patch
Patch2:         gkrellm-2.2.4-sansfont.patch
Patch3:         gkrellm-2.2.7-width.patch
Patch4:         gkrellm-2.2.9-libdir.patch
Patch5:         gkrellm-2.2.9-hwmon.patch
Patch6:         gkrellm-2.2.9-libsensors.patch
Patch7:         gkrellm-2.2.9-gkrellmd.conf.patch
BuildRequires:  gtk2-devel openssl-devel libSM-devel desktop-file-utils gettext
%ifarch %{ix86} x86_64
BuildRequires:  lm_sensors-devel
%endif
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

%description
GKrellM charts CPU, load, Disk, and all active net interfaces
automatically.  An on/off button and online timer for the PPP
interface is provided, as well as monitors for memory and swap usage,
file system, internet connections, APM laptop battery, mbox style
mailboxes, and temperature sensors on supported systems.  Also
included is an uptime monitor, a hostname label, and a clock/calendar.
Additional features are:

  * Autoscaling grid lines with configurable grid line resolution.
  * LED indicators for the net interfaces.
  * A gui popup for configuration of chart sizes and resolutions.


%package daemon
Summary:        The GNU Krell Monitors Server
Group:          System Environment/Daemons
Requires(pre):  /usr/sbin/useradd, /usr/sbin/groupadd
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig
Requires(preun): /sbin/service
Requires(postun): /sbin/service

%description daemon
gkrellmd listens for connections from gkrellm clients. When a gkrellm
client connects to a gkrellmd server all builtin monitors collect their
data from the server.


%package        devel
Summary:        Development files for the GNU Krell Monitors
Group:          Development/System
Requires:       gtk2-devel

%description devel
Development files for the GNU Krell Monitors.


%prep
%setup -q
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%patch7 -p1

for i in gkrellmd.1 gkrellm.1 README Changelog Changelog-plugins.html; do
   sed -i -e "s@/usr/lib/gkrellm2/plugins@%{_libdir}/gkrellm2/plugins@" $i
   sed -i -e "s@/usr/lib/gkrellm/plugins@%{_libdir}/gkrellm2/plugins@" $i
done
for i in gkrellmd.1 gkrellm.1 README Changelog Changelog-plugins.html; do
   sed -i -e "s@/usr/local/lib/gkrellm2/plugins@/usr/local/%{_lib}/gkrellm2/plugins@" $i
   sed -i -e "s@/usr/local/lib/gkrellm/plugins@/usr/local/%{_lib}/gkrellm2/plugins@" $i
done


%build
%ifarch %{ix86} x86_64
CFLAGS="$RPM_OPT_FLAGS -DHAVE_LIBSENSORS"
SYS_LIBS="-lsensors"
%else
CFLAGS="$RPM_OPT_FLAGS"
SYS_LIBS=
%endif
make %{?_smp_mflags} INSTALLROOT=%{_prefix} PKGCONFIGDIR=%{_libdir}/pkgconfig \
  INCLUDEDIR=%{_includedir} CFLAGS="$CFLAGS" SYS_LIBS="$SYS_LIBS"


%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT%{_initrddir}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/gkrellm2/themes
mkdir -p $RPM_BUILD_ROOT%{_libdir}/gkrellm2/plugins

make install \
    LOCALEDIR=$RPM_BUILD_ROOT%{_datadir}/locale \
    INSTALLDIR=$RPM_BUILD_ROOT%{_bindir} \
    SINSTALLDIR=$RPM_BUILD_ROOT%{_sbindir} \
    MANDIR=$RPM_BUILD_ROOT%{_mandir}/man1 \
    PKGCONFIGDIR=$RPM_BUILD_ROOT%{_libdir}/pkgconfig \
    INCLUDEDIR=$RPM_BUILD_ROOT%{_includedir} \
    STRIP=""
install -m 755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/gkrellmd
install -m 644 server/gkrellmd.conf $RPM_BUILD_ROOT%{_sysconfdir}/gkrellmd.conf
%find_lang %name

# below is the desktop file and icon stuff.
mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
desktop-file-install --vendor gnome             \
  --dir $RPM_BUILD_ROOT%{_datadir}/applications \
  --add-category X-Fedora                       \
  %{SOURCE2}
mkdir -p $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps
install -p -m 644 %{SOURCE3} \
  $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps


%post
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi

%postun
touch --no-create %{_datadir}/icons/hicolor || :
if [ -x %{_bindir}/gtk-update-icon-cache ]; then
   %{_bindir}/gtk-update-icon-cache --quiet %{_datadir}/icons/hicolor || :
fi


%pre daemon
# the daemon shouldn't run as nobody
/usr/sbin/groupadd -r gkrellmd 2> /dev/null || :
/usr/sbin/useradd -s /sbin/nologin -M -d / -c "GNU Krell daemon" -r -g gkrellmd gkrellmd 2> /dev/null || :

%post daemon
/sbin/chkconfig --add gkrellmd || :

%preun daemon
if [ "$1" = "0" ]; then
    /sbin/service gkrellmd stop > /dev/null 2>&1 || :
    /sbin/chkconfig --del gkrellmd || :
fi

%postun daemon
if [ "$1" -ge "1" ]; then
    /sbin/service gkrellmd condrestart > /dev/null 2>&1 || :
fi


%clean
rm -rf $RPM_BUILD_ROOT


%files -f %{name}.lang
%defattr(-,root,root,-)
%doc COPYRIGHT Changelog README Themes.html
%{_bindir}/%{name}
%{_libdir}/gkrellm2
%{_datadir}/gkrellm2
%{_mandir}/man1/%{name}.1*
%{_datadir}/applications/gnome-%{name}.desktop
%{_datadir}/icons/hicolor/48x48/apps/%{name}.png

%files devel
%defattr(-,root,root,-)
%{_includedir}/gkrellm2
%{_libdir}/pkgconfig/%{name}.pc

%files daemon
%defattr(-,root,root,-)
%{_initrddir}/gkrellmd
%{_sbindir}/gkrellmd
%{_mandir}/man1/gkrellmd.*
%config(noreplace) %{_sysconfdir}/gkrellmd.conf


%changelog
* Sun Jul 16 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 2.2.9-7
- Add -r to groupadd
- Add || : to the gkrellmd service related scripts (deviation from the wiki).
- Don't make -devel package require the main one as it doesn't need it
- Install .desktop file with --vendor gnome to not break existing kde panel
  buttons, etc.
- Drop "StartupNotify=false" from .desktop to not interfere with kde's 
  internal startup notification
- use gkrellmd as group in default gkrellmd.conf

* Sat Jul 15 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 2.2.9-6
- Various specfile improvements by Ville Skyttä (ville.skytta at iki.fi)
- Make the daemon package scripts match the ScriptletSnippets wiki page
- Add LSB aliases (try-restart, force-reload) to the -daemon initscript
- Add %%{?dist} to the release for consistency with other packages I maintain

* Sat Jul 15 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 2.2.9-5
- Remove Obsoletes/Provides gkrellm-server
- Don't remove user on uninstall
- Only build with lm_sensors support on x86 / x86_64 since lm_sensors is not
  available on other archs.
- Use %%{_sysconfdir} instead of /etc in %%install

* Fri Jul  7 2006 Hans de Goede <j.w.r.degoede at hhs.nl> 2.2.9-4
- Moving to Fedora Extras, initial FE submission
- Various specfile improvements / cleanups
- Remove gkrellm-wireless (will be submitted as a seperate package)
- Use libsensors instead of DIY code to read lm_sensors sensors
- Don't strip the binaries when installing so we get a usable -debuginfo rpm

* Mon May 22 2006 Karsten Hopp <karsten at redhat.de> 2.2.9-3
- fix libdir patch

* Mon May 15 2006 Karsten Hopp <karsten at redhat.de> 2.2.9-2
- fix header file conflict between 32bit and 64bit archs

* Mon Apr 03 2006 Karsten Hopp <karsten at redhat.de> 2.2.9-1
- update to 2.2.9
- remove explicit UID/GUIs from useradd/groupadd (#186974)  

* Tue Feb 28 2006 Karsten Hopp <karsten at redhat.de> 2.2.7-7
- BuildRequires: libSM-devel

* Wed Feb 15 2006 Karsten Hopp <karsten at redhat.de> 2.2.7-6
- fix chkconfig requires

* Fri Feb 10 2006 Jesse Keating <jkeating at redhat.com> - 2.2.7-5.2.1
- bump again for double-long bug on ppc(64)

* Tue Feb 07 2006 Jesse Keating <jkeating at redhat.com> - 2.2.7-5.2
- rebuilt for new gcc4.1 snapshot and glibc changes

* Fri Dec 09 2005 Jesse Keating <jkeating at redhat.com>
- rebuilt

* Fri Nov 18 2005 Bill Nottingham <notting at redhat.com> 2.2.7-5
- Fix references to obsolete /usr/X11R6 path

* Wed Nov  9 2005 Tomas Mraz <tmraz at redhat.com> 2.2.7-4
- rebuilt with new openssl

* Thu Sep 06 2005 Karsten Hopp <karsten at redhat.de> 2.2.7-3
- fix path to gkrellm2 plugins on 64bit archs (#164066)

* Thu Aug 18 2005 Florian La Roche <laroche at redhat.com>
- the the kernel dep form a Requires: into a Conflicts:

* Thu Jun 09 2005 Karsten Hopp <karsten at redhat.de> 2.2.7-1
- update to 2.2.7
- add Requires: /sbin/chkconfig for -daemon subpackage
- allow gkrellm width up to 1600 pixel
- change spec file to valid UTF-8 (#159578)

* Tue May 17 2005 Karsten Hopp <karsten at redhat.de> 2.2.4-5
- use Sans fonts (Ville Skytta, #157899)

* Fri Apr 01 2005 Karsten Hopp <karsten at redhat.de> 2.2.4-4
- Include gkrellm2/plugins directories (Michael Schwendt)
  #153073

* Wed Mar 02 2005 Karsten Hopp <karsten at redhat.de> 2.2.4-3
- build with gcc-4

* Thu Feb 03 2005 Karsten Hopp <karsten at redhat.de> 2.2.4-2 
- BuildRequires openssl-devel (#137548)

* Tue Nov 16 2004 Karsten Hopp <karsten at redhat.de> 2.2.4-1 
- update

* Mon Sep 06 2004 Karsten Hopp <karsten at redhat.de> 2.2.2-2
- change group of wireless subpackage (#131699)
- add icon

* Tue Aug 03 2004 Karsten Hopp <karsten at redhat.de> 2.2.2-1
- update to 2.2.2 to fix pixbuf memory leak

* Wed Jun 23 2004 Karsten Hopp <karsten at redhat.de> 2.2.1-1
- update to latest stable release

* Tue Jun 15 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Mon May 31 2004 Warren Togami <wtogami at redhat.com> 2.2.0-1
- upgrade to 2.2.0
- #123846 bogus dep
- Cleanup deps, build deps, and docs

* Mon Mar 15 2004 Karsten Hopp <karsten at redhat.de> 2.1.28-3 
- remove Provides: gkrellm-devel from main package (#117105)

* Thu Mar 11 2004 Karsten Hopp <karsten at redhat.de> 2.1.28-2 
- don't run gkrellmd as nobody, use a unique UID (#116314)
- fix chkconfig at package removal

* Wed Mar 10 2004 Karsten Hopp <karsten at redhat.de> 2.1.28-1 
- update
- add runlevel links with chkconfig (#107481)
- use slightly patched config file from the tarball for gkrellmd
- add wireless plugin

* Wed Mar 03 2004 Karsten Hopp <karsten at redhat.de> 2.1.26-2
- fix -devel provision (#117105)
- remove stringfreeze hack

* Tue Mar 02 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Fri Feb 25 2004 Karsten Hopp <karsten at redhat.de> 2.1.26-1
- update to 2.1.26, which fixes sensor data being 10x to high (#115850)
- requires kernel >= 2.6.2

* Sat Feb 21 2004 Florian La Roche <Florian.LaRoche at redhat.de>
- mv /etc/init.d -> /etc/rc.d/init.d

* Fri Feb 13 2004 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Fri Jan 09 2004 Karsten Hopp <karsten at redhat.de> 2.1.24-1
- update to 2.1.24

* Mon Oct 13 2003 Karsten Hopp <karsten at redhat.de> 2.1.21-1
- update:
- fix temperature reads from /proc/acpi
- Use username instead of userid in session management userid property.
  Fixes no session restarts in KDE 3.1.4.
- de.po update

* Thu Oct 09 2003 Karsten Hopp <karsten at redhat.de> 2.1.20-3
- make it compatible with 3d party packages

* Thu Oct 09 2003 Karsten Hopp <karsten at redhat.de> 2.1.20-2
- added patches from Ville Skyttä <ville.skytta at iki.fi>:
  - Add icon for desktop entry
  - Install daemon in %%{_sbindir}
  - Include themes and plugins dirs in main package
  - Make -daemon obsolete -server
  - devel subpackage (disabled because of string freeze)


* Wed Oct 08 2003 Karsten Hopp <karsten at redhat.de> 2.1.20-1
- update to make it work with kernel 2.6

* Wed Oct 01 2003 Karsten Hopp <karsten at redhat.de> 2.1.19-1
- Update to 2.1.19, includes fix for #106073

* Tue Jul 08 2003 Karsten Hopp <karsten at redhat.de> 2.1.14-3
- run as user nobody
- fix file ownership

* Mon Jul 07 2003 Karsten Hopp <karsten at redhat.de> 2.1.14-2
- add init script and config file for gkrellmd
- daemon subpackage
- fix pkgconfig file

* Thu Jun 26 2003 Karsten Hopp <karsten at redhat.de> 2.1.14-1
- update to fix buffer overflow in gkrellmd_client_read

* Wed Jun 18 2003 Karsten Hopp <karsten at redhat.de> 2.1.13-1
- update

* Wed Jun 04 2003 Elliot Lee <sopwith at redhat.com>
- rebuilt

* Mon May 05 2003 Karsten Hopp <karsten at redhat.de> 2.1.9-2
- rebuild

* Thu Apr 10 2003 Karsten Hopp <karsten at redhat.de> 2.1.9-1
- update to 2.1.9
- daily/weekly/monthly transfer stats

* Wed Jan 22 2003 Tim Powers <timp at redhat.com>
- rebuilt

* Tue Jan 14 2003 Karsten Hopp <karsten at redhat.de> 2.1.5-2
- rename menu entry (#81876)

* Sun Jan 12 2003 Karsten Hopp <karsten at redhat.de> 2.1.5-1
- update (#81620)

* Mon Dec 16 2002 Tim Powers <timp at redhat.com> 2.1.3-2
- rebuild

* Wed Dec 11 2002 Karsten Hopp <karsten at redhat.de>
- 2.1.3-1
- Battery monitor can display multiple batteries
- Net timer lost the minutes display with large connect times
- use disk stats from /proc/partitions if available

* Tue Dec 03 2002 Karsten Hopp <karsten at redhat.de> 2.1.2-1
- updated translations
- .desktop file (#78562)
- minor bugfixes

* Mon Nov 11 2002 Karsten Hopp <karsten at redhat.de>
- update to 2.1 (glib2, gtk2)

* Wed Jul 17 2002 Karsten Hopp <karsten at redhat.de>
- update
- own /usr/include/gkrellm directory

* Fri Jun 21 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Tue Jun 11 2002 Karsten Hopp <karsten at redhat.de>
- Update to 1.2.11

* Thu May 23 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Wed Feb 27 2002 Karsten Hopp <karsten at redhat.de>
- Update to 1.2.9

* Wed Jan 23 2002 Karsten Hopp <karsten at redhat.de>
- Update to 1.2.6

* Wed Jan 09 2002 Tim Powers <timp at redhat.com>
- automated rebuild

* Thu Dec 13 2001 Karsten Hopp <karsten at redhat.de>
- update to 1.2.5-1
- nls patch not required anymore

* Mon Nov 26 2001 Karsten Hopp <karsten at redhat.de>
- enable nls

* Mon Nov 26 2001 Karsten Hopp <karsten at redhat.de>
- update to 1.2.4

* Fri Jul  6 2001 Trond Eivind Glomsrød <teg at redhat.com>
- s/Copyright/License/
- Add %%defattr
- langify
- Don't define name, ver and rel at the top of the spec file

* Wed Jun 27 2001 Karsten Hopp <karsten at redhat.de>
- fix _mandir
- fix BuildRequires

* Wed Jun 27 2001 SATO Satoru <ssato at redhat.com>
- clean up (use system-defined macros)
- enable NLS

* Wed Mar 14 2001 Rob Lineweaver <rbline at wm.edu>
- fixed new manpage inclusion for newer RPM versions
- source is 1.0.7
- compiled for PPC and i386

* Fri Jan 19 2001 Kevin Ford <klford at uitsg.com>
- general cleanup of spec file

* Thu Jan 18 2001 Kevin Ford <klford at uitsg.com>
- Updated spec file to work with both v3 & v4 rpm
- moved changelog to bottom of spec file
- added defines for common items

* Thu Apr 6 2000 Bill Wilson
- added INCLUDEDIR to the make install

* Fri Oct 29 1999 Gary Thomas <gdt at linuxppc.org>
- .spec file still broken

* Thu Oct 7 1999 David Mihm <davemann at ionet.net>
- fixed spec.


--- NEW FILE gkrellmd.init ---
#!/bin/bash
#
# chkconfig: - 85 15
# description: GNU Krell Monitors Server
#
# processname: gkrellmd
# config: /etc/gkrellmd.conf

# source function library
. /etc/rc.d/init.d/functions

# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0

# The process must be configured first.
[ -f /etc/gkrellmd.conf ] || exit 0

RETVAL=0

prog="gkrellmd"

case "$1" in
  start)
	echo -n $"Starting $prog: "
        daemon --user gkrellmd /usr/sbin/gkrellmd -d
	RETVAL=$?
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/gkrellmd
	echo
	;;
  stop)
	echo -n $"Shutting down $prog: "
	killproc gkrellmd
	RETVAL=$?
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/gkrellmd
	echo
	;;
  restart|reload|force-reload)
        $0 stop
        $0 start
	RETVAL=$?
        ;;
  condrestart|try-restart)
        if [ -f /var/lock/subsys/gkrellmd ]; then
                $0 stop
		$0 start
        fi
	RETVAL=$?
        ;;
  status)
        status gkrellmd
	RETVAL=$?
        ;;
  *)
	echo $"Usage: $0 {start|stop|restart|reload|condrestart|status}"
	exit 1
esac

exit $RETVAL


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/gkrellm/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	19 Jul 2006 18:33:34 -0000	1.1
+++ .cvsignore	19 Jul 2006 18:35:32 -0000	1.2
@@ -0,0 +1 @@
+gkrellm-2.2.9.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/gkrellm/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	19 Jul 2006 18:33:34 -0000	1.1
+++ sources	19 Jul 2006 18:35:32 -0000	1.2
@@ -0,0 +1 @@
+5334155797901724f4eb46a82ad72395  gkrellm-2.2.9.tar.bz2




More information about the fedora-extras-commits mailing list