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.

151 lines
3.5 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:=20210202
  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:=3f557ecfd2ace873801231d2c1f42de73ced9fbc1ef3a438d847688b5fb0e8ab
  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. -DBUILD_TFTPD=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. ### tftp
  105. define Package/iputils-tftpd
  106. $(call Package/iputils/Default)
  107. TITLE:=iputils-tftpd
  108. endef
  109. define Package/iputils-tftpd/description
  110. Trivial File Transfer Protocol server
  111. endef
  112. define Package/iputils-tftpd/install
  113. $(INSTALL_DIR) $(1)/usr/sbin
  114. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/tftpd $(1)/usr/sbin/
  115. endef
  116. $(eval $(call BuildPackage,iputils-ping))
  117. $(eval $(call BuildPackage,iputils-arping))
  118. $(eval $(call BuildPackage,iputils-clockdiff))
  119. $(eval $(call BuildPackage,iputils-tracepath))
  120. $(eval $(call BuildPackage,iputils-tftpd))