From: Florian Fainelli Date: Sat, 1 Nov 2008 16:04:47 +0000 (+0000) Subject: Add wavemon from #4154 X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=a62e135cab20b68ba4e3de17c544dd015393cfa0;ds=sidebyside Add wavemon from #4154 SVN-Revision: 13089 --- diff --git a/net/wavemon/Makefile b/net/wavemon/Makefile new file mode 100644 index 0000000000..5a14c78076 --- /dev/null +++ b/net/wavemon/Makefile @@ -0,0 +1,50 @@ +# +# Copyright (C) 2008 OpenWrt.org +# +# This is free software, licensed under the GNU General Public License v2. +# See /LICENSE for more information. +# +# $Id: $ + +include $(TOPDIR)/rules.mk + +PKG_NAME:=wavemon +PKG_VERSION:=0.4.0b +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://www.janmorgenstern.de/ +PKG_MD5SUM:=2baab37eb967fc38dc53f8e4f609daac + +include $(INCLUDE_DIR)/package.mk + +define Package/wavemon + SECTION:=net + CATEGORY:=Network + TITLE:=N-curses based wireless network devices monitor + DEPENDS:= +libncurses + SUBMENU:=wireless + URL:=http://www.janmorgenstern.de/projects-software.html +endef + +define Package/wavemon/description + wavemon is a ncurses-based monitoring application for wireless network + devices. It currently works under Linux with devices that are supported + by the wireless extensions by Jean Tourrilhes (included in Kernel 2.4 + and higher), e.g. the Lucent Orinoco cards. +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + $(TARGET_CONFIGURE_OPTS) \ + CFLAGS="$(TARGET_CFLAGS) -L${STAGING_DIR}/usr/lib -I${STAGING_DIR}/usr/include" \ + DESTDIR="$(PKG_INSTALL_DIR)" \ + all +endef + +define Package/wavemon/install + $(INSTALL_DIR) $(1)/usr/bin + $(CP) $(PKG_BUILD_DIR)/wavemon $(1)/usr/bin/ +endef + +$(eval $(call BuildPackage,wavemon)) diff --git a/net/wavemon/patches/001-gcc_fixes.patch b/net/wavemon/patches/001-gcc_fixes.patch new file mode 100644 index 0000000000..f89728aced --- /dev/null +++ b/net/wavemon/patches/001-gcc_fixes.patch @@ -0,0 +1,70 @@ +diff -ur wavemon-0.4.0b-orig/conf.c wavemon-0.4.0b/conf.c +--- wavemon-0.4.0b-orig/conf.c 2005-07-08 23:49:09.000000000 -0400 ++++ wavemon-0.4.0b/conf.c 2005-07-08 23:48:05.000000000 -0400 +@@ -409,8 +409,8 @@ + fatal_error("parse error in %s, line %d: '%s' is not a valid argument here", cfname, lnum, rv); + } + break; +- case t_sep: /* gcc -Wall sucks */ +- case t_func: ++ case t_sep: ; /* gcc -Wall sucks */ ++ case t_func: ; + } + } + } +@@ -481,7 +481,7 @@ + break; + case t_listval: sprintf(rv, "%s", (char *)ci->v); + case t_sep: break; +- case t_func: ++ case t_func: ; + } + + add = 1; +diff -ur wavemon-0.4.0b-orig/conf_scr.c wavemon-0.4.0b/conf_scr.c +--- wavemon-0.4.0b-orig/conf_scr.c 2005-07-08 23:49:09.000000000 -0400 ++++ wavemon-0.4.0b/conf_scr.c 2005-07-08 23:48:05.000000000 -0400 +@@ -63,7 +63,7 @@ + case t_listval: strncpy(s, (char *)item->v, 32); + break; + case t_sep: /* gcc -Wall sucks */ +- case t_func: ++ case t_func: ; + } + + if (!item->unit) { +@@ -135,8 +135,8 @@ + } + strncpy((char *)item->v, ll_get(item->list, tmp), 32); + break; +- case t_sep: /* gcc -Wall sucks */ +- case t_func: ++ case t_sep: ; /* gcc -Wall sucks */ ++ case t_func: ; + } + } + +diff -ur wavemon-0.4.0b-orig/llist.c wavemon-0.4.0b/llist.c +--- wavemon-0.4.0b-orig/llist.c 2005-07-08 23:46:09.000000000 -0400 ++++ wavemon-0.4.0b/llist.c 2005-07-08 23:47:28.000000000 -0400 +@@ -352,7 +352,7 @@ + *((int *)l->e) = va_arg(*ap, int); + break; + case 's': l->e = (void *)malloc(sizeof(char *)); +- (char *)l->e = strdup(va_arg(*ap, char *)); ++ l->e = strdup(va_arg(*ap, char *)); + break; + case 'f': l->e = (void *)malloc(sizeof(double)); + *((double *)l->e) = va_arg(*ap, double); +diff -ur wavemon-0.4.0b-orig/wavemon.c wavemon-0.4.0b/wavemon.c +--- wavemon-0.4.0b-orig/wavemon.c 2005-07-08 23:49:09.000000000 -0400 ++++ wavemon-0.4.0b/wavemon.c 2005-07-08 23:48:05.000000000 -0400 +@@ -170,7 +170,7 @@ + + if (conf.dump == 1) { + dump_parameters(&conf); +- exit(); ++ exit(0); + } + + /* initialize the ncurses interface */ diff --git a/net/wavemon/patches/002-wireless_tools.patch b/net/wavemon/patches/002-wireless_tools.patch new file mode 100644 index 0000000000..8506997562 --- /dev/null +++ b/net/wavemon/patches/002-wireless_tools.patch @@ -0,0 +1,12 @@ +--- wavemon-0.4.0b.orig/iw_if.h 2002-12-21 06:18:30.000000000 -0600 ++++ wavemon-0.4.0b/iw_if.h 2006-03-12 09:05:48.000000000 -0600 +@@ -19,6 +19,9 @@ + */ + + #include ++#include ++#include ++#include + #include + + #define IW_STACKSIZE 1024