iperf package. Closes #0001224
authorPeter Korsgaard <jacmet@sunsite.dk>
Fri, 16 Feb 2007 20:16:24 +0000 (20:16 -0000)
committerPeter Korsgaard <jacmet@sunsite.dk>
Fri, 16 Feb 2007 20:16:24 +0000 (20:16 -0000)
package/Config.in
package/iperf/Config.in [new file with mode: 0644]
package/iperf/iperf.mk [new file with mode: 0644]

index 4657aa638b0365ee4afcdf90cfa4a60582bd682c..af6bec3980e31e98cc0d0ebf616bca8a0eac23be 100644 (file)
@@ -128,6 +128,7 @@ source "package/dropbear/Config.in"
 source "package/ethtool/Config.in"
 source "package/haserl/Config.in"
 source "package/hostap/Config.in"
+source "package/iperf/Config.in"
 source "package/iproute2/Config.in"
 source "package/ipsec-tools/Config.in"
 source "package/iptables/Config.in"
diff --git a/package/iperf/Config.in b/package/iperf/Config.in
new file mode 100644 (file)
index 0000000..9d0e41b
--- /dev/null
@@ -0,0 +1,9 @@
+config BR2_PACKAGE_IPERF
+       bool "iperf"
+       default n
+       select BR2_INSTALL_LIBSTDCPP
+       help
+         Internet Protocol bandwidth measuring tool for measuring
+         TCP/UDP performance.
+
+         http://dast.nlanr.net/projects/iperf/
diff --git a/package/iperf/iperf.mk b/package/iperf/iperf.mk
new file mode 100644 (file)
index 0000000..e1a84b1
--- /dev/null
@@ -0,0 +1,73 @@
+#############################################################
+#
+# iperf
+#
+#############################################################
+
+IPERF_VERSION:=2.0.2
+IPERF_SOURCE:=iperf-$(IPERF_VERSION).tar.gz
+IPERF_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/iperf
+IPERF_DIR:=$(BUILD_DIR)/iperf-$(IPERF_VERSION)
+IPERF_CAT:=$(ZCAT)
+
+$(DL_DIR)/$(IPERF_SOURCE):
+       $(WGET) -P $(DL_DIR) $(IPERF_SITE)/$(IPERF_SOURCE)
+
+$(IPERF_DIR)/.unpacked: $(DL_DIR)/$(IPERF_SOURCE)
+       $(IPERF_CAT) $(DL_DIR)/$(IPERF_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+       toolchain/patch-kernel.sh $(IPERF_DIR) package/iperf/ iperf\*.patch
+       touch $(IPERF_DIR)/.unpacked
+
+$(IPERF_DIR)/.configured: $(IPERF_DIR)/.unpacked
+       (       cd $(IPERF_DIR); rm -rf config.cache;  \
+               $(TARGET_CONFIGURE_OPTS) \
+               CFLAGS="$(TARGET_CFLAGS)" \
+               ac_cv_func_malloc_0_nonnull=yes \
+               ./configure \
+               --with-gnu-ld \
+               --target=$(GNU_TARGET_NAME) \
+               --host=$(GNU_TARGET_NAME) \
+               --build=$(GNU_HOST_NAME) \
+               --disable-ipv6 \
+               --disable-dependency-tracking \
+               --disable-web100 \
+               --prefix=/usr \
+               --exec-prefix=/usr \
+               --bindir=/usr/bin \
+               --sbindir=/usr/sbin \
+               --libexecdir=/usr/sbin \
+               --sysconfdir=/etc \
+               --datadir=/usr/share \
+               --localstatedir=/var \
+               --mandir=/usr/man \
+               --infodir=/usr/info \
+               --includedir=$(STAGING_DIR)/include \
+       );
+       touch $(IPERF_DIR)/.configured
+
+$(IPERF_DIR)/src/iperf: $(IPERF_DIR)/.configured
+       $(MAKE) CC=$(TARGET_CC) -C $(IPERF_DIR)
+       -$(STRIP) --strip-unneeded $(IPERF_DIR)/src/iperf
+
+$(TARGET_DIR)/usr/bin/iperf: $(IPERF_DIR)/src/iperf
+       cp $(IPERF_DIR)/src/iperf $(TARGET_DIR)/usr/bin/iperf
+
+iperf: $(TARGET_DIR)/usr/bin/iperf
+
+iperf-source: $(DL_DIR)/$(IPERF_SOURCE)
+
+iperf-clean:
+       @if [ -d $(IPERF_KDIR)/Makefile ] ; then \
+               $(MAKE) -C $(IPERF_DIR) clean ; \
+       fi;
+
+iperf-dirclean:
+       rm -rf $(IPERF_DIR)
+#############################################################
+#
+# Toplevel Makefile options
+#
+#############################################################
+ifeq ($(strip $(BR2_PACKAGE_IPERF)),y)
+TARGETS+=iperf
+endif