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.

152 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:=20200821
  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/s$(PKG_VERSION)?
  14. PKG_HASH:=f265da0d02dd2259efd8c57a9c2e0c8bb3361abb14639fcffb26707be5783a5b
  15. PKG_BUILD_DIR:=$(BUILD_DIR)/iputils-s$(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. PKG_BUILD_DEPENDS:=meson/host
  22. include $(INCLUDE_DIR)/package.mk
  23. include ../../devel/meson/meson.mk
  24. MESON_ARGS += \
  25. -DBUILD_MANS=false \
  26. -DBUILD_HTML_MANS=false \
  27. -DUSE_CAP=false \
  28. -DUSE_IDN=false \
  29. -DUSE_GETTEXT=false \
  30. -DNO_SETCAP_OR_SUID=true \
  31. -DBUILD_PING=true \
  32. -DBUILD_ARPING=true \
  33. -DBUILD_CLOCKDIFF=true \
  34. -DBUILD_TRACEPATH=true \
  35. -DBUILD_TFTPD=true
  36. define Package/iputils/Default
  37. SECTION:=net
  38. CATEGORY:=Network
  39. TITLE:=iputils
  40. URL:=https://github.com/iputils/iputils
  41. endef
  42. ### ping
  43. define Package/iputils-ping
  44. $(call Package/iputils/Default)
  45. TITLE:=iputils-ping
  46. DEPENDS:=+kmod-crypto-md5
  47. endef
  48. define Package/iputils-ping/config
  49. source "$(SOURCE)/Config_ping.in"
  50. endef
  51. define Package/iputils-ping/description
  52. Send ICMP_ECHOREQUEST packets to IP hosts and report on replies
  53. endef
  54. define Package/iputils-ping/install
  55. $(INSTALL_DIR) $(1)/usr/bin
  56. $(INSTALL_SUID) $(PKG_INSTALL_DIR)/usr/bin/ping $(1)/usr/bin/
  57. ifdef CONFIG_PING_LEGACY_SYMLINKS
  58. ln -s ping $(1)/usr/bin/ping4
  59. ln -s ping $(1)/usr/bin/ping6
  60. endif
  61. endef
  62. ### arping
  63. define Package/iputils-arping
  64. $(call Package/iputils/Default)
  65. TITLE:=iputils-arping
  66. endef
  67. define Package/iputils-arping/description
  68. Send ARP REQUEST packets to a neighbor host
  69. endef
  70. define Package/iputils-arping/install
  71. $(INSTALL_DIR) $(1)/usr/bin
  72. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/arping $(1)/usr/bin/
  73. endef
  74. ### clockdiff
  75. define Package/iputils-clockdiff
  76. $(call Package/iputils/Default)
  77. TITLE:=iputils-clockdiff
  78. endef
  79. define Package/iputils-clockdiff/description
  80. Measure the clock difference between two hosts
  81. endef
  82. define Package/iputils-clockdiff/install
  83. $(INSTALL_DIR) $(1)/usr/bin
  84. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/clockdiff $(1)/usr/bin/
  85. endef
  86. ### tracepath
  87. define Package/iputils-tracepath
  88. $(call Package/iputils/Default)
  89. TITLE:=iputils-tracepath
  90. endef
  91. define Package/iputils-tracepath/description
  92. trace network path to a host, discovering PMTU
  93. endef
  94. define Package/iputils-tracepath/config
  95. source "$(SOURCE)/Config_tracepath.in"
  96. endef
  97. define Package/iputils-tracepath/install
  98. $(INSTALL_DIR) $(1)/usr/bin
  99. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/tracepath $(1)/usr/bin/
  100. ifdef CONFIG_TRACEPATH_LEGACY_SYMLINKS
  101. ln -s tracepath $(1)/usr/bin/tracepath4
  102. ln -s tracepath $(1)/usr/bin/tracepath6
  103. endif
  104. endef
  105. ### tftp
  106. define Package/iputils-tftpd
  107. $(call Package/iputils/Default)
  108. TITLE:=iputils-tftpd
  109. endef
  110. define Package/iputils-tftpd/description
  111. Trivial File Transfer Protocol server
  112. endef
  113. define Package/iputils-tftpd/install
  114. $(INSTALL_DIR) $(1)/usr/bin
  115. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin//tftpd $(1)/usr/bin/
  116. endef
  117. $(eval $(call BuildPackage,iputils-ping))
  118. $(eval $(call BuildPackage,iputils-arping))
  119. $(eval $(call BuildPackage,iputils-clockdiff))
  120. $(eval $(call BuildPackage,iputils-tracepath))
  121. $(eval $(call BuildPackage,iputils-tftpd))