Merge pull request #22194 from neocturne/ovs-master
[feed/packages.git] / net / iperf3 / Makefile
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
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=iperf
11 PKG_VERSION:=3.15
12 PKG_RELEASE:=1
13
14 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
15 PKG_SOURCE_URL:=https://downloads.es.net/pub/iperf
16 PKG_HASH:=bdb77c11f72bce90214883159577fa24412013e62b2083cf5f54391d79b1d8ff
17
18 PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
19 PKG_LICENSE:=BSD-3-Clause
20 PKG_CPE_ID:=cpe:/a:es:iperf3
21
22 PKG_BUILD_PARALLEL:=1
23 PKG_INSTALL:=1
24
25 PKG_FIXUP:=autoreconf
26
27 include $(INCLUDE_DIR)/package.mk
28
29 DISABLE_NLS:=
30
31 define Package/iperf3/default
32 SECTION:=net
33 CATEGORY:=Network
34 TITLE:=Internet Protocol bandwidth measuring tool
35 URL:=https://github.com/esnet/iperf
36 endef
37
38 define Package/iperf3
39 $(call Package/iperf3/default)
40 VARIANT:=nossl
41 DEPENDS:=+libiperf3
42 endef
43
44 define Package/iperf3-ssl
45 $(call Package/iperf3/default)
46 TITLE+= with iperf_auth support
47 VARIANT:=ssl
48 DEPENDS:=+libopenssl
49 endef
50
51 define Package/libiperf3
52 SECTION:=libs
53 CATEGORY:=Libraries
54 TITLE:=Internet Protocol bandwidth measuring library
55 URL:=https://github.com/esnet/iperf
56 endef
57
58 TARGET_CFLAGS += -D_GNU_SOURCE
59
60 ifeq ($(BUILD_VARIANT),ssl)
61 CONFIGURE_ARGS += --with-openssl="$(STAGING_DIR)/usr" --disable-shared
62 else
63 CONFIGURE_ARGS += --without-openssl
64 endif
65
66 MAKE_FLAGS += noinst_PROGRAMS=
67
68 define Package/iperf3/description
69 Iperf is a modern alternative for measuring TCP and UDP bandwidth
70 performance, allowing the tuning of various parameters and
71 characteristics.
72 endef
73
74 define Package/libiperf3/description
75 Libiperf is a library providing an API for iperf3 functionality.
76 endef
77
78 define Build/InstallDev
79 $(INSTALL_DIR) $(1)/usr/lib
80 $(INSTALL_DIR) $(1)/usr/include
81 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiperf.* $(1)/usr/lib/
82 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
83 endef
84
85 # autoreconf fails if the README file isn't present
86 define Build/Prepare
87 $(call Build/Prepare/Default)
88 touch $(PKG_BUILD_DIR)/README
89 endef
90
91 define Package/iperf3/install
92 $(INSTALL_DIR) $(1)/usr/bin
93 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/iperf3 $(1)/usr/bin/
94 endef
95
96 define Package/iperf3-ssl/install
97 $(INSTALL_DIR) $(1)/usr/bin
98 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/iperf3 $(1)/usr/bin/
99 endef
100
101 define Package/libiperf3/install
102 $(INSTALL_DIR) $(1)/usr/lib
103 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiperf.so.* $(1)/usr/lib
104 endef
105
106 $(eval $(call BuildPackage,iperf3))
107 $(eval $(call BuildPackage,iperf3-ssl))
108 $(eval $(call BuildPackage,libiperf3))