You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
3.1 KiB

  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. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=iputils
  10. PKG_VERSION:=20211215
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://codeload.github.com/iputils/iputils/tar.gz/$(PKG_VERSION)?
  14. PKG_HASH:=b6f67fc705490673ff4471d006221b4a2f1b1180b929d9fefd771352621ccedf
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/iputils-$(PKG_VERSION)
  16. PKG_MAINTAINER:=Noah Meyerhans <frodo@morgul.net>
  17. PKG_LICENSE:=BSD-3-Clause
  18. PKG_LICENSE_FILES:=LICENSE
  19. PKG_CPE_ID:=cpe:/a:iputils_project:iputils
  20. PKG_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. include $(INCLUDE_DIR)/meson.mk
  23. MESON_ARGS += \
  24. -DBUILD_MANS=false \
  25. -DBUILD_HTML_MANS=false \
  26. -DUSE_CAP=false \
  27. -DUSE_IDN=false \
  28. -DUSE_GETTEXT=false \
  29. -DNO_SETCAP_OR_SUID=true \
  30. -DBUILD_PING=true \
  31. -DBUILD_ARPING=true \
  32. -DBUILD_CLOCKDIFF=true \
  33. -DBUILD_TRACEPATH=true \
  34. -DSKIP_TESTS=true
  35. define Package/iputils/Default
  36. SECTION:=net
  37. CATEGORY:=Network
  38. TITLE:=iputils
  39. URL:=https://github.com/iputils/iputils
  40. endef
  41. ### ping
  42. define Package/iputils-ping
  43. $(call Package/iputils/Default)
  44. TITLE:=iputils-ping
  45. DEPENDS:=+kmod-crypto-md5
  46. endef
  47. define Package/iputils-ping/config
  48. source "$(SOURCE)/Config_ping.in"
  49. endef
  50. define Package/iputils-ping/description
  51. Send ICMP_ECHOREQUEST packets to IP hosts and report on replies
  52. endef
  53. define Package/iputils-ping/install
  54. $(INSTALL_DIR) $(1)/usr/bin
  55. $(INSTALL_SUID) $(PKG_INSTALL_DIR)/usr/bin/ping $(1)/usr/bin/
  56. ifdef CONFIG_PING_LEGACY_SYMLINKS
  57. ln -s ping $(1)/usr/bin/ping4
  58. ln -s ping $(1)/usr/bin/ping6
  59. endif
  60. endef
  61. ### arping
  62. define Package/iputils-arping
  63. $(call Package/iputils/Default)
  64. TITLE:=iputils-arping
  65. endef
  66. define Package/iputils-arping/description
  67. Send ARP REQUEST packets to a neighbor host
  68. endef
  69. define Package/iputils-arping/install
  70. $(INSTALL_DIR) $(1)/usr/bin
  71. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arping $(1)/usr/bin/
  72. endef
  73. ### clockdiff
  74. define Package/iputils-clockdiff
  75. $(call Package/iputils/Default)
  76. TITLE:=iputils-clockdiff
  77. endef
  78. define Package/iputils-clockdiff/description
  79. Measure the clock difference between two hosts
  80. endef
  81. define Package/iputils-clockdiff/install
  82. $(INSTALL_DIR) $(1)/usr/bin
  83. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clockdiff $(1)/usr/bin/
  84. endef
  85. ### tracepath
  86. define Package/iputils-tracepath
  87. $(call Package/iputils/Default)
  88. TITLE:=iputils-tracepath
  89. endef
  90. define Package/iputils-tracepath/description
  91. trace network path to a host, discovering PMTU
  92. endef
  93. define Package/iputils-tracepath/config
  94. source "$(SOURCE)/Config_tracepath.in"
  95. endef
  96. define Package/iputils-tracepath/install
  97. $(INSTALL_DIR) $(1)/usr/bin
  98. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tracepath $(1)/usr/bin/
  99. ifdef CONFIG_TRACEPATH_LEGACY_SYMLINKS
  100. ln -s tracepath $(1)/usr/bin/tracepath4
  101. ln -s tracepath $(1)/usr/bin/tracepath6
  102. endif
  103. endef
  104. $(eval $(call BuildPackage,iputils-ping))
  105. $(eval $(call BuildPackage,iputils-arping))
  106. $(eval $(call BuildPackage,iputils-clockdiff))
  107. $(eval $(call BuildPackage,iputils-tracepath))