ddns-scripts: rename variable: s/retry_count/retry_max_count/
[feed/packages.git] / net / iputils / Makefile
1 #
2 # Copyright (C) 2006-2010 OpenWrt.org
3 # Copyright (C) 2019 Noah Meyerhans <frodo@morgul.net>
4 #
5 #
6 # This is free software, licensed under the GNU General Public License v2.
7 # See /LICENSE for more information.
8
9 include $(TOPDIR)/rules.mk
10
11 PKG_NAME:=iputils
12 PKG_VERSION:=20211215
13 PKG_RELEASE:=1
14
15 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
16 PKG_SOURCE_URL:=https://codeload.github.com/iputils/iputils/tar.gz/$(PKG_VERSION)?
17 PKG_HASH:=b6f67fc705490673ff4471d006221b4a2f1b1180b929d9fefd771352621ccedf
18 PKG_BUILD_DIR:=$(BUILD_DIR)/iputils-$(PKG_VERSION)
19
20 PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
21 PKG_LICENSE:=BSD-3-Clause
22 PKG_LICENSE_FILES:=LICENSE
23 PKG_CPE_ID:=cpe:/a:iputils_project:iputils
24
25 include $(INCLUDE_DIR)/package.mk
26 include $(INCLUDE_DIR)/meson.mk
27
28 MESON_ARGS += \
29 -DBUILD_MANS=false \
30 -DBUILD_HTML_MANS=false \
31 -DUSE_CAP=false \
32 -DUSE_IDN=false \
33 -DUSE_GETTEXT=false \
34 -DNO_SETCAP_OR_SUID=true \
35 -DBUILD_PING=true \
36 -DBUILD_ARPING=true \
37 -DBUILD_CLOCKDIFF=true \
38 -DBUILD_TRACEPATH=true \
39 -DSKIP_TESTS=true
40
41 define Package/iputils/Default
42 SECTION:=net
43 CATEGORY:=Network
44 TITLE:=iputils
45 URL:=https://github.com/iputils/iputils
46 endef
47
48 ### ping
49
50 define Package/iputils-ping
51 $(call Package/iputils/Default)
52 TITLE:=iputils-ping
53 DEPENDS:=+kmod-crypto-md5
54 endef
55
56 define Package/iputils-ping/config
57 source "$(SOURCE)/Config_ping.in"
58 endef
59
60 define Package/iputils-ping/description
61 Send ICMP_ECHOREQUEST packets to IP hosts and report on replies
62 endef
63
64 define Package/iputils-ping/install
65 $(INSTALL_DIR) $(1)/usr/bin
66 $(INSTALL_SUID) $(PKG_INSTALL_DIR)/usr/bin/ping $(1)/usr/bin/
67 ifdef CONFIG_PING_LEGACY_SYMLINKS
68 ln -s ping $(1)/usr/bin/ping4
69 ln -s ping $(1)/usr/bin/ping6
70 endif
71 endef
72
73 ### arping
74
75 define Package/iputils-arping
76 $(call Package/iputils/Default)
77 TITLE:=iputils-arping
78 endef
79
80 define Package/iputils-arping/description
81 Send ARP REQUEST packets to a neighbor host
82 endef
83
84 define Package/iputils-arping/install
85 $(INSTALL_DIR) $(1)/usr/bin
86 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arping $(1)/usr/bin/
87 endef
88
89 ### clockdiff
90
91 define Package/iputils-clockdiff
92 $(call Package/iputils/Default)
93 TITLE:=iputils-clockdiff
94 endef
95
96 define Package/iputils-clockdiff/description
97 Measure the clock difference between two hosts
98 endef
99
100 define Package/iputils-clockdiff/install
101 $(INSTALL_DIR) $(1)/usr/bin
102 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clockdiff $(1)/usr/bin/
103 endef
104
105 ### tracepath
106
107 define Package/iputils-tracepath
108 $(call Package/iputils/Default)
109 TITLE:=iputils-tracepath
110 endef
111
112 define Package/iputils-tracepath/description
113 trace network path to a host, discovering PMTU
114 endef
115
116 define Package/iputils-tracepath/config
117 source "$(SOURCE)/Config_tracepath.in"
118 endef
119
120 define Package/iputils-tracepath/install
121 $(INSTALL_DIR) $(1)/usr/bin
122 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tracepath $(1)/usr/bin/
123 ifdef CONFIG_TRACEPATH_LEGACY_SYMLINKS
124 ln -s tracepath $(1)/usr/bin/tracepath4
125 ln -s tracepath $(1)/usr/bin/tracepath6
126 endif
127 endef
128
129 $(eval $(call BuildPackage,iputils-ping))
130 $(eval $(call BuildPackage,iputils-arping))
131 $(eval $(call BuildPackage,iputils-clockdiff))
132 $(eval $(call BuildPackage,iputils-tracepath))