Add gkrellmd (#1453)
authorFlorian Fainelli <florian@openwrt.org>
Sun, 13 May 2007 12:43:22 +0000 (12:43 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 13 May 2007 12:43:22 +0000 (12:43 +0000)
SVN-Revision: 7202

admin/gkrellmd/Makefile [new file with mode: 0644]
admin/gkrellmd/files/gkrellmd.init [new file with mode: 0644]
admin/gkrellmd/patches/100-conf.patch [new file with mode: 0644]

diff --git a/admin/gkrellmd/Makefile b/admin/gkrellmd/Makefile
new file mode 100644 (file)
index 0000000..41462b1
--- /dev/null
@@ -0,0 +1,49 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=gkrellmd
+PKG_VERSION:=2.2.10
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL:=http://members.dslextreme.com/users/billw/gkrellm/
+PKG_SOURCE:=gkrellm-$(PKG_VERSION).tar.bz2
+PKG_MD5SUM:=57ef0525c0997ac2e7720712811f5a84
+PKG_CAT:=bzcat
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/gkrellm-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/gkrellmd
+  SECTION:=admin
+  CATEGORY:=Administration
+  DEPENDS:=+glib1
+  TITLE:=System monitoring daemon
+  URL:=http://gkrellm.net/
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+       CFLAGS="$(TARGET_CFLAGS) $(EXTRA_CPPFLAGS) "
+       LDFLAGS="$(EXTRA_LDFLAGS) "
+       $(MAKE) -C $(PKG_BUILD_DIR)/server \
+               CC=$(TARGET_CC) \
+               glib12=yes \
+               GLIB12_LIB="-L$(STAGING_DIR)/usr/lib -lglib -lgmodule" \
+               GLIB12_INCLUDE="-I$(STAGING_DIR)/usr/include/glib-1.2 -I$(STAGING_DIR)/usr/lib/glib/include"
+endef
+
+define Package/gkrellmd/install
+       $(INSTALL_DIR) $(1)/usr/bin
+       $(CP) $(PKG_BUILD_DIR)/server/$(PKG_NAME) $(1)/usr/bin/
+
+       $(INSTALL_DIR) $(1)/etc
+       $(CP) $(PKG_BUILD_DIR)/server/$(PKG_NAME).conf $(1)/etc/
+
+       $(INSTALL_DIR) $(1)/etc/init.d
+       $(INSTALL_BIN) ./files/gkrellmd.init $(1)/etc/init.d/gkrellmd
+endef
+
+$(eval $(call BuildPackage,gkrellmd))
diff --git a/admin/gkrellmd/files/gkrellmd.init b/admin/gkrellmd/files/gkrellmd.init
new file mode 100644 (file)
index 0000000..8311d1d
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh /etc/rc.common
+
+start() {
+       /usr/bin/gkrellmd
+}
+
+stop() {
+       killall gkrellmd
+}
diff --git a/admin/gkrellmd/patches/100-conf.patch b/admin/gkrellmd/patches/100-conf.patch
new file mode 100644 (file)
index 0000000..ec16992
--- /dev/null
@@ -0,0 +1,34 @@
+diff -ur gkrellm-2.2.10~/server/gkrellmd.conf gkrellm-2.2.10/server/gkrellmd.conf
+--- gkrellm-2.2.10~/server/gkrellmd.conf       2005-05-22 11:56:53.000000000 -0400
++++ gkrellm-2.2.10/server/gkrellmd.conf        2007-03-10 23:32:23.000000000 -0500
+@@ -4,7 +4,7 @@
+ # the client update frequency.  Values may be from 1 to 10 and should be
+ # smaller values to reduce network traffic.
+ #
+-update-hz 3
++update-hz 10
+ # Limit number of simultaneous clients allowed to connect.
+ #
+@@ -17,18 +17,18 @@
+ # 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    localhost
+ #allow-host   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
++user  nobody
+ #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.