banip: release 0.9.6-1
[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.16
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:=cc740c6bbea104398cc3e466befc515a25896ec85e44a662d5f4a767b9cf713e
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 +libatomic
49 CONFLICTS:=iperf3
50 endef
51
52 define Package/libiperf3
53 SECTION:=libs
54 CATEGORY:=Libraries
55 TITLE:=Internet Protocol bandwidth measuring library
56 URL:=https://github.com/esnet/iperf
57 DEPENDS+=+libatomic
58 endef
59
60 TARGET_CFLAGS += -D_GNU_SOURCE
61 TARGET_LDFLAGS += -latomic
62
63 ifeq ($(BUILD_VARIANT),ssl)
64 CONFIGURE_ARGS += --with-openssl="$(STAGING_DIR)/usr" --disable-shared
65 else
66 CONFIGURE_ARGS += --without-openssl
67 endif
68
69 MAKE_FLAGS += noinst_PROGRAMS=
70
71 define Package/iperf3/description
72 Iperf is a modern alternative for measuring TCP and UDP bandwidth
73 performance, allowing the tuning of various parameters and
74 characteristics.
75 endef
76
77 define Package/libiperf3/description
78 Libiperf is a library providing an API for iperf3 functionality.
79 endef
80
81 define Build/InstallDev
82 $(INSTALL_DIR) $(1)/usr/lib
83 $(INSTALL_DIR) $(1)/usr/include
84 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiperf.* $(1)/usr/lib/
85 $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
86 endef
87
88 # autoreconf fails if the README file isn't present
89 define Build/Prepare
90 $(call Build/Prepare/Default)
91 touch $(PKG_BUILD_DIR)/README
92 endef
93
94 define Package/iperf3/install
95 $(INSTALL_DIR) $(1)/usr/bin
96 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/iperf3 $(1)/usr/bin/
97 endef
98
99 define Package/iperf3-ssl/install
100 $(INSTALL_DIR) $(1)/usr/bin
101 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/iperf3 $(1)/usr/bin/
102 endef
103
104 define Package/libiperf3/install
105 $(INSTALL_DIR) $(1)/usr/lib
106 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libiperf.so.* $(1)/usr/lib
107 endef
108
109 $(eval $(call BuildPackage,iperf3))
110 $(eval $(call BuildPackage,iperf3-ssl))
111 $(eval $(call BuildPackage,libiperf3))