Makefile 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #
  2. # Copyright (C) 2007-2010 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=iperf
  9. PKG_VERSION:=3.7
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  12. PKG_SOURCE_URL:=https://downloads.es.net/pub/iperf
  13. PKG_HASH:=d846040224317caf2f75c843d309a950a7db23f9b44b94688ccbe557d6d1710c
  14. PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
  15. PKG_LICENSE:=BSD-3-Clause
  16. PKG_BUILD_PARALLEL:=1
  17. PKG_INSTALL:=1
  18. PKG_FIXUP:=autoreconf
  19. include $(INCLUDE_DIR)/package.mk
  20. DISABLE_NLS:=
  21. define Package/iperf3/default
  22. SECTION:=net
  23. CATEGORY:=Network
  24. TITLE:=Internet Protocol bandwidth measuring tool
  25. URL:=https://github.com/esnet/iperf
  26. endef
  27. define Package/iperf3
  28. $(call Package/iperf3/default)
  29. VARIANT:=nossl
  30. endef
  31. define Package/iperf3-ssl
  32. $(call Package/iperf3/default)
  33. TITLE+= with iperf_auth support
  34. VARIANT:=ssl
  35. DEPENDS:= +libopenssl
  36. endef
  37. TARGET_CFLAGS += -D_GNU_SOURCE
  38. CONFIGURE_ARGS += --disable-shared
  39. ifeq ($(BUILD_VARIANT),ssl)
  40. CONFIGURE_ARGS += --with-openssl="$(STAGING_DIR)/usr"
  41. else
  42. CONFIGURE_ARGS += --without-openssl
  43. endif
  44. MAKE_FLAGS += noinst_PROGRAMS=
  45. define Package/iperf3/description
  46. Iperf is a modern alternative for measuring TCP and UDP bandwidth
  47. performance, allowing the tuning of various parameters and
  48. characteristics.
  49. endef
  50. # autoreconf fails if the README file isn't present
  51. define Build/Prepare
  52. $(call Build/Prepare/Default)
  53. touch $(PKG_BUILD_DIR)/README
  54. endef
  55. define Package/iperf3/install
  56. $(INSTALL_DIR) $(1)/usr/bin
  57. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/iperf3 $(1)/usr/bin/
  58. endef
  59. define Package/iperf3-ssl/install
  60. $(INSTALL_DIR) $(1)/usr/bin
  61. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/iperf3 $(1)/usr/bin/
  62. endef
  63. $(eval $(call BuildPackage,iperf3))
  64. $(eval $(call BuildPackage,iperf3-ssl))