[package] add netio bandwidth measurement tool (#8668)
authorFlorian Fainelli <florian@openwrt.org>
Tue, 7 Aug 2012 16:09:18 +0000 (16:09 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Tue, 7 Aug 2012 16:09:18 +0000 (16:09 +0000)
SVN-Revision: 33045

net/netio/Config.in [new file with mode: 0644]
net/netio/Makefile [new file with mode: 0644]
net/netio/patches/001-Makefile.patch [new file with mode: 0644]

diff --git a/net/netio/Config.in b/net/netio/Config.in
new file mode 100644 (file)
index 0000000..cd8d255
--- /dev/null
@@ -0,0 +1,4 @@
+menu "Configuration"
+        depends on PACKAGE_uclibcxx
+
+endmenu
diff --git a/net/netio/Makefile b/net/netio/Makefile
new file mode 100644 (file)
index 0000000..4837382
--- /dev/null
@@ -0,0 +1,41 @@
+#
+# Copyright (C) 2006-2011 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=netio
+PKG_VERSION:=1.31
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)$(subst .,,$(PKG_VERSION)).zip
+PKG_SOURCE_URL:=http://www.ars.de/ars/ars.nsf/f24a6a0b94c22d82862566960071bf5a/aa577bc4be573b05c125706d004c75b5/%24FILE/
+PKG_MD5SUM:=6b81e3c71b9dfa3bd60c53fa82e89085
+
+include $(INCLUDE_DIR)/uclibc++.mk
+include $(INCLUDE_DIR)/package.mk
+
+PKG_UNPACK:=mkdir -p $(PKG_BUILD_DIR); unzip $(DL_DIR)/$(PKG_SOURCE) -d $(PKG_BUILD_DIR)
+
+define Package/netio
+  $(call Package/netio/Default)
+  SECTION:=net
+  CATEGORY:=Network
+  DEPENDS:=$(CXX_DEPENDS) +libpthread
+  TITLE:=Network throughput benchmark
+  URL:=http://www.ars.de/ars/ars.nsf/docs/netio
+endef
+
+define Build/Compile
+       $(MAKE) -C $(PKG_BUILD_DIR) linux CC="$(TARGET_CC)"
+endef
+
+define Package/netio/install
+       $(INSTALL_DIR) $(1)/usr/sbin
+       $(CP) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/sbin/
+endef
+
+$(eval $(call BuildPackage,netio))
diff --git a/net/netio/patches/001-Makefile.patch b/net/netio/patches/001-Makefile.patch
new file mode 100644 (file)
index 0000000..517b16a
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/Makefile         2011-01-17 17:15:11.000000000 +0100
++++ b/Makefile         2010-10-14 15:03:42.000000000 +0200
+@@ -84,7 +84,7 @@
+       $(MAKE) all CC="gcc -O -s" O=.o X= \\r
+       CFLAGS="-DUNIX" LFLAGS="" LIBS="-lsocket -lpthread -lnsl" OUT=-o\r
+ linux:\r
+-      $(MAKE) all CC="gcc -O -s" O=.o X= \\r
++      $(MAKE) all CC="$(CC) -O -s" O=.o X= \\r
+       CFLAGS="-DUNIX" LFLAGS="" LIBS="-lpthread" OUT=-o\r
+ macosx:\r
+       $(MAKE) all CC="gcc -O" O=.o X= \\r