diff options
author | Martin Holzer <mholzer@gentoo.org> | 2003-09-24 17:42:43 +0000 |
---|---|---|
committer | Martin Holzer <mholzer@gentoo.org> | 2003-09-24 17:42:43 +0000 |
commit | 7f2c62f77e3805eb24886ee7bb649a5f8104daa5 (patch) | |
tree | f25be8a758536af2a9c6e0078e6aa5c8fcb945e6 /net-analyzer/slurm | |
parent | Version bumped. (diff) | |
download | gentoo-2-7f2c62f77e3805eb24886ee7bb649a5f8104daa5.tar.gz gentoo-2-7f2c62f77e3805eb24886ee7bb649a5f8104daa5.tar.bz2 gentoo-2-7f2c62f77e3805eb24886ee7bb649a5f8104daa5.zip |
Version bumped.
Diffstat (limited to 'net-analyzer/slurm')
-rw-r--r-- | net-analyzer/slurm/ChangeLog | 8 | ||||
-rw-r--r-- | net-analyzer/slurm/Manifest | 4 | ||||
-rw-r--r-- | net-analyzer/slurm/files/digest-slurm-0.2.3 | 1 | ||||
-rw-r--r-- | net-analyzer/slurm/files/slurm-0.2.3-theme.patch | 288 | ||||
-rw-r--r-- | net-analyzer/slurm/slurm-0.2.3.ebuild | 40 |
5 files changed, 338 insertions, 3 deletions
diff --git a/net-analyzer/slurm/ChangeLog b/net-analyzer/slurm/ChangeLog index daaa9a638e9e..c60f9a6a89c4 100644 --- a/net-analyzer/slurm/ChangeLog +++ b/net-analyzer/slurm/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-analyzer/slurm # Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-analyzer/slurm/ChangeLog,v 1.2 2003/06/10 08:26:43 msterret Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/slurm/ChangeLog,v 1.3 2003/09/24 17:42:38 mholzer Exp $ + +*slurm-0.2.3 (25 Sep 2003) + + 25 Sep 2003; Martin Holzer <mholzer@gentoo.org> slurm-0.2.3.ebuild, + files/slurm-0.2.3-theme.patch: + Version bumped. Submitted by Jyrki Muukkonen <jyrki@kruu.org> in #21715. 10 Jun 2003; <msterret@gentoo.org> slurm-0.2.2.ebuild: added src_unpack() so we can compile again and again. diff --git a/net-analyzer/slurm/Manifest b/net-analyzer/slurm/Manifest index 7cf8b5cc8be7..27c53bd8233b 100644 --- a/net-analyzer/slurm/Manifest +++ b/net-analyzer/slurm/Manifest @@ -1,6 +1,6 @@ -MD5 75df49732cfb0dd578a0288218ea277d ChangeLog 936 +MD5 ddcc0955ea31ec987af91971d43b3af6 ChangeLog 1142 MD5 f8abecb199fe2406781876d0d6ab7e77 slurm-0.2.2.ebuild 975 -MD5 c10af3e2de70b772ca2f1a095b2c1e82 slurm-0.2.3.ebuild 1005 +MD5 c69d17b86db9f1aeec53b82af0f61474 slurm-0.2.3.ebuild 1053 MD5 d1776e848116293161a1973b4ee313c7 files/digest-slurm-0.2.2 62 MD5 2dc5e67b0c6424cc560be57e7dcf099a files/slurm-0.2.2-altcolors-gentoo.patch 808 MD5 42f81938478bb63828b98c7367b49949 files/slurm-0.2.2-fix-gentoo.patch 2209 diff --git a/net-analyzer/slurm/files/digest-slurm-0.2.3 b/net-analyzer/slurm/files/digest-slurm-0.2.3 new file mode 100644 index 000000000000..82d18090ff45 --- /dev/null +++ b/net-analyzer/slurm/files/digest-slurm-0.2.3 @@ -0,0 +1 @@ +MD5 26c8fa23f40db3ecf641ce2e48c8857e slurm-0.2.3.tar.gz 50776 diff --git a/net-analyzer/slurm/files/slurm-0.2.3-theme.patch b/net-analyzer/slurm/files/slurm-0.2.3-theme.patch new file mode 100644 index 000000000000..0db48ceb407d --- /dev/null +++ b/net-analyzer/slurm/files/slurm-0.2.3-theme.patch @@ -0,0 +1,288 @@ +diff -uNr slurm-0.2.3/slurm.c slurm-0.2.3-theme/slurm.c +--- slurm-0.2.3/slurm.c 2003-04-27 19:11:55.000000000 +0300 ++++ slurm-0.2.3-theme/slurm.c 2003-05-26 18:22:08.000000000 +0300 +@@ -217,6 +217,10 @@ + #include "src/if_media.h" + #include "src/if_media.c" + ++/* theme support */ ++#include "src/theme.h" ++#include "src/theme.c" ++ + #ifdef __HPUX__ + #include "src/hpux.h" + #include "src/hpux.c" +@@ -673,7 +677,7 @@ + /* TX graph */ + if (tx_graph[x][y] == 1) + { +- chcolor(COLOR_YELLOW, colors.ingoing[1]); ++ chcolor(colors.outgoing[0], colors.outgoing[1]); + mvprintw(10+y, x+1, "x"); + } + else +@@ -979,7 +983,7 @@ + /* TX graph */ + if (tx_graph[x][y] == 1) + { +- chcolor(COLOR_YELLOW, colors.ingoing[1]); ++ chcolor(colors.outgoing[0], colors.outgoing[1]); + mvprintw(6+y, x+1, "x"); + } + else +@@ -1234,7 +1238,8 @@ + " -c old classic/combined view\n" + " -s split window mode with stats\n" + " -l large split window mode\n" +- " -i interface select network interface\n\n", ++ " -i interface select network interface\n" ++ " -t themefile use colors from themefile\n\n", + REFRESH_MIN, REFRESH_MAX); + _exit(code); + } +@@ -1295,16 +1300,16 @@ + { + mvprintw(20, 9, "Received Packets:"); + mvprintw(22, 6, "Errors on Receiving:"); +- mvprintw(20, 45,"Transmited Packets:"); ++ mvprintw(20, 44,"Transmitted Packets:"); + switch(data_type) + { + case TYPE_MEGA: + mvprintw(21,10, "MBytes Received:"); +- mvprintw(21,46, "MBytes Transmited:"); ++ mvprintw(21,45, "MBytes Transmitted:"); + break; + case TYPE_GIGA: + mvprintw(21,10, "GBytes Received:"); +- mvprintw(21,46, "GBytes Transmited:"); ++ mvprintw(21,45, "GBytes Transmitted:"); + break; + } + } +@@ -1385,30 +1390,21 @@ + unsigned short int first = 1; + unsigned short int disconnected = 0; + char hostname[MAXHOSTNAMELEN+1]; ++ char themefile[MAX_PATH_LEN+1]; + long refreshdelay = REFRESH_DEFAULT; + float tmpdelay; + int op; + int z_option = FALSE; + hostname[0] = '\0'; ++ themefile[0] = '\0'; + + /* HP-UX related as of now but could become standard */ + ifdata.if_valid = 0; + ifdata.if_id = 0; + ifdata.if_amount = 0; + +- colors.ingoing[0] = 2; colors.ingoing[1] = 1; +- colors.outgoing[0] = 3; colors.outgoing[1] = 1; +- colors.intersection[0] = 2; colors.intersection[1] = 1; +- colors.background = 0; +- colors.data[0] = 6; colors.data[1] = 1; +- colors.border[0] = 7; colors.border[1] = 1; +- colors.labels[0] = 7; colors.labels[1] = 1; +- colors.power_led[0] = 2; colors.power_led[1] = 1; +- colors.power_led[2] = 1; colors.power_led[3] = 1; +- colors.version[0] = 7; colors.version[1] = 1; +- + /* handle command line options */ +- while ((op = getopt(argc, argv, "Hhzd:clsi:")) != EOF) ++ while ((op = getopt(argc, argv, "Hhzd:clsi:t:")) != EOF) + { + switch (op) + { +@@ -1462,12 +1458,17 @@ + /* use default split window mode */ + displaymode = MODE_SPLIT; + break; ++ case 't': ++ /* theme file to read */ ++ strncpy(themefile, optarg, MAX_PATH_LEN); ++ themefile[MAX_PATH_LEN] = '\0'; ++ break; + default: + usage(1, argv); + break; + } + } +- ++ + if (!validinterface) + { + fprintf(stderr, "specified device does not exist or cannot " +@@ -1476,6 +1477,9 @@ + usage(1, argv); + } + ++ /* read theme file or use defaults */ ++ read_theme(themefile); ++ + /* Initialize some info variables */ + stats.tx_packets = 0; stats.tx_bytes = 0; stats.tx_errors = 0; + stats.rx_packets = 0; stats.rx_bytes = 0; stats.rx_errors = 0; +diff -uNr slurm-0.2.3/src/theme.c slurm-0.2.3-theme/src/theme.c +--- slurm-0.2.3/src/theme.c 1970-01-01 02:00:00.000000000 +0200 ++++ slurm-0.2.3-theme/src/theme.c 2003-05-26 18:21:54.000000000 +0300 +@@ -0,0 +1,103 @@ ++ ++void read_theme(char *theme_file) { ++ FILE *theme_ptr; ++ char current_line[MAX_LINE_LEN]; ++ char *iterator; ++ ++ /* set defaults colors. structure colors defined in slurm.h */ ++ colors.background = DEFAULT_BACKGROUND; ++ colors.ingoing[0] = DEFAULT_INGOING_COLOR; ++ colors.ingoing[1] = DEFAULT_INGOING_BOLD; ++ colors.outgoing[0] = DEFAULT_OUTGOING_COLOR; ++ colors.outgoing[1] = DEFAULT_OUTGOING_BOLD; ++ colors.intersection[0] = DEFAULT_INTERSECTION_COLOR; ++ colors.intersection[1] = DEFAULT_INTERSECTION_BOLD; ++ colors.data[0] = DEFAULT_DATA_COLOR; ++ colors.data[1] = DEFAULT_DATA_BOLD; ++ colors.border[0] = DEFAULT_BORDER_COLOR; ++ colors.border[1] = DEFAULT_BORDER_BOLD; ++ colors.labels[0] = DEFAULT_LABELS_COLOR; ++ colors.labels[1] = DEFAULT_LABELS_BOLD; ++ colors.power_led[0] = DEFAULT_POWER_LED_1_COLOR; ++ colors.power_led[1] = DEFAULT_POWER_LED_1_BOLD; ++ colors.power_led[2] = DEFAULT_POWER_LED_2_COLOR; ++ colors.power_led[3] = DEFAULT_POWER_LED_2_BOLD; ++ colors.version[0] = DEFAULT_VERSION_COLOR; ++ colors.version[1] = DEFAULT_VERSION_BOLD; ++ ++ /* no theme file given, just setting the defaults */ ++ if(strlen(theme_file) == 0) ++ return; ++ ++ /* try to open the file */ ++ if((theme_ptr = fopen(theme_file, "r")) == NULL) { ++ perror("can't open theme file"); ++ exit(EXIT_FAILURE); ++ } ++ ++ /* read every line of config file */ ++ while((fgets(current_line, MAX_LINE_LEN, theme_ptr)) != NULL) { ++ iterator = current_line; ++ ++ /* skip whitespace */ ++ while(*iterator == ' ' || *iterator == '\t') ++ iterator++; ++ ++ /* skip comments and empty lines */ ++ if(*iterator == '#' || *iterator == '\n' || iterator == NULL) ++ continue; ++ ++ /* search for settings */ ++ search_value(iterator, "background", &colors.background); ++ ++ search_value(iterator, "data_color", &colors.data[0]); ++ search_value(iterator, "data_bold", &colors.data[1]); ++ ++ search_value(iterator, "ingoing_color", &colors.ingoing[0]); ++ search_value(iterator, "ingoing_bold", &colors.ingoing[1]); ++ search_value(iterator, "outgoing_color", &colors.outgoing[0]); ++ search_value(iterator, "outgoing_bold", &colors.outgoing[1]); ++ search_value(iterator, "intersection_color", &colors.intersection[0]); ++ search_value(iterator, "intersection_bold", &colors.intersection[1]); ++ ++ search_value(iterator, "power_led_1_color", &colors.power_led[0]); ++ search_value(iterator, "power_led_1_bold", &colors.power_led[1]); ++ search_value(iterator, "power_led_2_color", &colors.power_led[2]); ++ search_value(iterator, "power_led_2_bold", &colors.power_led[3]); ++ ++ search_value(iterator, "version_color", &colors.version[0]); ++ search_value(iterator, "version_bold", &colors.version[1]); ++ search_value(iterator, "labels_color", &colors.labels[0]); ++ search_value(iterator, "labels_bold", &colors.labels[1]); ++ search_value(iterator, "border_color", &colors.border[0]); ++ search_value(iterator, "border_bold", &colors.border[1]); ++ ++ } ++ ++ /* close file */ ++ fclose(theme_ptr); ++} ++ ++void search_value(char *line, char *setting, int *dest) { ++ char *tmp; ++ ++ tmp = line; ++ ++ /* check for setting */ ++ if(strstr(line, setting) == NULL) ++ return; ++ ++ /* read variable name */ ++ while(*tmp != ' ' && *tmp != '\t' && *tmp != '\n' && *tmp != '\0') ++ tmp++; ++ ++ /* read whitespace */ ++ while(*tmp == ' ' || *tmp == '\t') ++ tmp++; ++ ++ /* set value */ ++ *dest = atoi(tmp); ++ ++ return; ++} ++ +diff -uNr slurm-0.2.3/src/theme.h slurm-0.2.3-theme/src/theme.h +--- slurm-0.2.3/src/theme.h 1970-01-01 02:00:00.000000000 +0200 ++++ slurm-0.2.3-theme/src/theme.h 2003-05-26 18:21:54.000000000 +0300 +@@ -0,0 +1,28 @@ ++ ++/* default colors and bolding settings */ ++#define DEFAULT_BACKGROUND 0 ++#define DEFAULT_INGOING_COLOR 2 ++#define DEFAULT_INGOING_BOLD 1 ++#define DEFAULT_OUTGOING_COLOR 3 ++#define DEFAULT_OUTGOING_BOLD 1 ++#define DEFAULT_INTERSECTION_COLOR 2 ++#define DEFAULT_INTERSECTION_BOLD 1 ++#define DEFAULT_DATA_COLOR 6 ++#define DEFAULT_DATA_BOLD 1 ++#define DEFAULT_BORDER_COLOR 7 ++#define DEFAULT_BORDER_BOLD 1 ++#define DEFAULT_LABELS_COLOR 7 ++#define DEFAULT_LABELS_BOLD 1 ++#define DEFAULT_POWER_LED_1_COLOR 2 ++#define DEFAULT_POWER_LED_1_BOLD 1 ++#define DEFAULT_POWER_LED_2_COLOR 1 ++#define DEFAULT_POWER_LED_2_BOLD 1 ++#define DEFAULT_VERSION_COLOR 7 ++#define DEFAULT_VERSION_BOLD 1 ++ ++#define MAX_PATH_LEN 256 ++#define MAX_LINE_LEN 256 ++ ++void read_theme(char *theme_file); ++void search_value(char *line, char *setting, int *dest); ++ +diff -uNr slurm-0.2.3/theme.sample slurm-0.2.3-theme/theme.sample +--- slurm-0.2.3/theme.sample 1970-01-01 02:00:00.000000000 +0200 ++++ slurm-0.2.3-theme/theme.sample 2003-05-26 17:59:13.000000000 +0300 +@@ -0,0 +1,20 @@ ++# colors: -1 default, 0 black, 1 red, 2 green, 3 yellow, 4 blue, 5 magenta, ++# 6 cyan, 7 white ++# bold: 0 off, 1 on (default) ++ ++background 0 ++data_color 1 ++labels_color 7 ++border_color 7 ++version_color 7 ++ ++outgoing_color -1 ++outgoing_bold 0 ++ingoing_color 7 ++# intersection_color not used ++#intersection_color 7 ++ ++power_led_1_color 2 ++power_led_2_color 1 ++ ++# eof diff --git a/net-analyzer/slurm/slurm-0.2.3.ebuild b/net-analyzer/slurm/slurm-0.2.3.ebuild new file mode 100644 index 000000000000..bf9a86a9cb10 --- /dev/null +++ b/net-analyzer/slurm/slurm-0.2.3.ebuild @@ -0,0 +1,40 @@ +# Copyright 1999-2003 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-analyzer/slurm/slurm-0.2.3.ebuild,v 1.1 2003/09/24 17:42:38 mholzer Exp $ + +DESCRIPTION="Realtime network interface monitor based on FreeBSD's pppstatus" +HOMEPAGE="http://www.raisdorf.net/slurm/" +SRC_URI="http://www.raisdorf.net/files/code/${P}.tar.gz" +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86" + +DEPEND="sys-libs/ncurses" + +src_compile() { + # fixes some "transmited" typos and adds theme support + epatch ${FILESDIR}/${P}-theme.patch || "patch died" + + econf || die "configure died" + emake || die "make failed" +} + +src_install() { + # binary + dobin slurm + + # sample theme to use with -t option + insinto /usr/share/${PN} + doins theme.sample + + # manual and other docs + doman slurm.1 + dodoc Changelog COPYRIGHT KEYS README THANKS TODO +} + +pkg_postinst() { + einfo + einfo "This version of slurm has a theme support (-t option)" + einfo "A sample themefile can be found at /usr/share/${PN}/theme.sample" + einfo +} |