summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorhubertf <hubertf>1999-11-06 15:57:40 +0000
committerhubertf <hubertf>1999-11-06 15:57:40 +0000
commit5a6e614b22843d6cc19cee8efd88631f750eaad1 (patch)
tree8f3b3eabdc634f657415e9956ea6252497b13f5d /sysutils
parenta0c4337c0f85fe76f44441bdc05c33131617883a (diff)
downloadpkgsrc-5a6e614b22843d6cc19cee8efd88631f750eaad1.tar.gz
This is a small KDE applet showing load everage graph on the
panel. You could customise colours, refresh rate. It also allows to execute some command on click. After start it puts itself in the docking area on the panel. If session support is enabled, it will restart itself next time user logs in. Pressing righ mouse button shows menu. Pressing left mouse button executes configured command.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/klavg/Makefile14
-rw-r--r--sysutils/klavg/files/md53
-rw-r--r--sysutils/klavg/files/patch-sum4
-rw-r--r--sysutils/klavg/patches/patch-aa31
-rw-r--r--sysutils/klavg/patches/patch-ab59
-rw-r--r--sysutils/klavg/pkg/COMMENT1
-rw-r--r--sysutils/klavg/pkg/DESCR10
-rw-r--r--sysutils/klavg/pkg/PLIST2
8 files changed, 124 insertions, 0 deletions
diff --git a/sysutils/klavg/Makefile b/sysutils/klavg/Makefile
new file mode 100644
index 00000000000..239bca5ccf4
--- /dev/null
+++ b/sysutils/klavg/Makefile
@@ -0,0 +1,14 @@
+# $NetBSD: Makefile,v 1.1.1.1 1999/11/06 15:57:40 hubertf Exp $
+#
+
+DISTNAME= klavg-1.1
+CATEGORIES= kde sysutils
+MASTER_SITES= ftp://ftp.crocodile.org/pub/
+
+MAINTAINER= hubertf@netbsd.org
+HOMEPAGE= http://www.crocodile.org/software.html
+
+USE_X11BASE= yes
+WRKSRC= ${WRKDIR}/klavg
+
+.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/klavg/files/md5 b/sysutils/klavg/files/md5
new file mode 100644
index 00000000000..f629336cb6c
--- /dev/null
+++ b/sysutils/klavg/files/md5
@@ -0,0 +1,3 @@
+$NetBSD: md5,v 1.1.1.1 1999/11/06 15:57:41 hubertf Exp $
+
+MD5 (klavg-1.1.tar.gz) = 569781a3e20f87d7b97cd99ab3b8520e
diff --git a/sysutils/klavg/files/patch-sum b/sysutils/klavg/files/patch-sum
new file mode 100644
index 00000000000..d4409023898
--- /dev/null
+++ b/sysutils/klavg/files/patch-sum
@@ -0,0 +1,4 @@
+$NetBSD: patch-sum,v 1.1.1.1 1999/11/06 15:57:41 hubertf Exp $
+
+MD5 (patch-aa) = dc77e5dea61304d3a25e127c9b23965c
+MD5 (patch-ab) = 69cb0398aee1539cce93098522090ab1
diff --git a/sysutils/klavg/patches/patch-aa b/sysutils/klavg/patches/patch-aa
new file mode 100644
index 00000000000..344f308e0d2
--- /dev/null
+++ b/sysutils/klavg/patches/patch-aa
@@ -0,0 +1,31 @@
+$NetBSD: patch-aa,v 1.1.1.1 1999/11/06 15:57:41 hubertf Exp $
+
+--- Makefile.orig Mon Jun 28 08:44:35 1999
++++ Makefile Fri Nov 5 14:29:58 1999
+@@ -2,12 +2,15 @@
+
+ KLAVGVER=1.1
+
++QTDIR= ${X11BASE}
++KDEDIR= ${X11BASE}
++
+ #------------
+
+-INCDIR = -I$(QTDIR)/include -I$(KDEDIR)/include -I/usr/include/qt
+-CFLAGS = -DKLAVGVERSION=\"$(KLAVGVER)\" -O2 -fno-strength-reduce -Wall -W -I/usr/X11R6/include
++INCDIR = -I$(QTDIR)/include/qt -I$(KDEDIR)/include
++CFLAGS = -DKLAVGVERSION=\"$(KLAVGVER)\" -O2 -fno-strength-reduce -Wall -W -I${X11BASE}/include
+ LIBCFLAGS =
+-LFLAGS = -L/usr/X11R6/lib -L$(QTDIR)/lib -L$(KDEDIR)/lib \
++LFLAGS = -L${X11BASE}/lib -Wl,-R${X11BASE} -L$(QTDIR)/lib -L$(KDEDIR)/lib \
+ -lqt -lkdecore -lkdeui -lkfile -lkfm -lXext -lX11
+
+ CC = gcc
+@@ -61,6 +64,4 @@
+ cd ..; rm -f klavg-$(KLAVGVER).tar klavg-$(KLAVGVER).tar.gz; tar --exclude CVS -cvf klavg-$(KLAVGVER).tar klavg; gzip -9 klavg-$(KLAVGVER).tar
+
+ install: $(TARGET)
+- cp klavg /usr/bin
+- chown root:root /usr/bin/klavg
+- chmod a=rx,go-w /usr/bin/klavg
++ ${BSD_INSTALL_PROGRAM} klavg ${PREFIX}/bin/klavg
diff --git a/sysutils/klavg/patches/patch-ab b/sysutils/klavg/patches/patch-ab
new file mode 100644
index 00000000000..7b42cde162d
--- /dev/null
+++ b/sysutils/klavg/patches/patch-ab
@@ -0,0 +1,59 @@
+$NetBSD: patch-ab,v 1.1.1.1 1999/11/06 15:57:41 hubertf Exp $
+
+--- klavg.cc.orig Mon Jun 28 08:44:35 1999
++++ klavg.cc Fri Nov 5 14:38:09 1999
+@@ -33,7 +33,9 @@
+
+ #include "klavg.h"
+
++#ifdef __linux__
+ #define LAVG_FILE "/proc/loadavg"
++#endif
+
+ KLavg::KLavg()
+ {
+@@ -70,13 +72,13 @@
+ KConfig *kconfig = kapp->getConfig();
+
+ kconfig->setGroup("General");
+- cfg.refresh_rate = kconfig->readNumEntry("RefreshRate",1 );
+- cfg.cmd = kconfig->readEntry("Command" ,"ktop");
++ cfg.refresh_rate = kconfig->readNumEntry("RefreshRate",5 );
++ cfg.cmd = kconfig->readEntry("Command" ,"xterm -e top");
+
+ kconfig->setGroup("Colours");
+- cfg.bg_colour = kconfig->readColorEntry ("Background",&black );
+- cfg.fg_colour = kconfig->readColorEntry ("Foreground",&yellow);
+- cfg.grid_colour = kconfig->readColorEntry ("Grid" ,&red );
++ cfg.bg_colour = kconfig->readColorEntry ("Background",&gray );
++ cfg.fg_colour = kconfig->readColorEntry ("Foreground",&black);
++ cfg.grid_colour = kconfig->readColorEntry ("Grid" ,&cyan );
+ }
+
+ void KLavg::saveCfg()
+@@ -167,6 +169,14 @@
+
+ float KLavg::getLAVG()
+ {
++#if defined(__NetBSD__)
++
++ double res;
++ getloadavg(&res, 1); // Mmm, abstract OS interfaces :-)
++ return (float)res;
++
++#elif defined(__linux__)
++
+ FILE *f=fopen(LAVG_FILE,"r");
+ if(!f)
+ return 0.0;
+@@ -177,6 +187,10 @@
+
+ //fprintf(stderr,"LAVG=%f\n",res);
+ return res;
++
++#else
++#error Sorry, no load gathering available.
++#endif
+ }
+
+ int main(int ac, char **av)
diff --git a/sysutils/klavg/pkg/COMMENT b/sysutils/klavg/pkg/COMMENT
new file mode 100644
index 00000000000..ce2f46b85f4
--- /dev/null
+++ b/sysutils/klavg/pkg/COMMENT
@@ -0,0 +1 @@
+Xload for the KDE panel
diff --git a/sysutils/klavg/pkg/DESCR b/sysutils/klavg/pkg/DESCR
new file mode 100644
index 00000000000..9eeb5e9f445
--- /dev/null
+++ b/sysutils/klavg/pkg/DESCR
@@ -0,0 +1,10 @@
+This is a small KDE applet showing load everage graph on the
+panel. You could customise colours, refresh rate. It also allows to
+execute some command on click.
+
+After start it puts itself in the docking area on the panel. If
+session support is enabled, it will restart itself next time user logs
+in.
+
+Pressing righ mouse button shows menu. Pressing left mouse button
+executes configured command.
diff --git a/sysutils/klavg/pkg/PLIST b/sysutils/klavg/pkg/PLIST
new file mode 100644
index 00000000000..7ac42d7d048
--- /dev/null
+++ b/sysutils/klavg/pkg/PLIST
@@ -0,0 +1,2 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 1999/11/06 15:57:41 hubertf Exp $
+bin/klavg