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.

73 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2006-2010 OpenWrt.org
  3. # Copyright (C) 2016 Stijn Segers
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=net-tools
  10. PKG_SOURCE_DATE:=2018-11-03
  11. PKG_SOURCE_VERSION:=0eebece8c964e3cfa8a018f42b2e7e751a7009a0
  12. PKG_RELEASE:=1
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE_URL:=https://git.code.sf.net/p/net-tools/code
  15. PKG_MIRROR_HASH:=9d978b9f8ccae4af623a299155c62d9b3d31213182c785f925bf8704d48a04c9
  16. PKG_MAINTAINER:=Stijn Segers <borromini.reg@protonmail.com>
  17. PKG_LICENSE:=GPL-2.0-or-later
  18. PKG_LICENSE_FILES:=COPYING
  19. include $(INCLUDE_DIR)/package.mk
  20. define Package/mii-tool
  21. SECTION:=net
  22. CATEGORY:=Network
  23. TITLE:=configure media type using MII commands
  24. URL:=http://net-tools.sourceforge.net/
  25. endef
  26. define Package/mii-tool/description
  27. The mii-tool command allows you to set or autodetect the media type
  28. or mii chipset-based ethernet devices. It traditionally had been
  29. distributed in the net-tools package. This is a single distribution
  30. optimized for embedded systems and fully automated cross/-sysroot-builds
  31. endef
  32. define Package/net-tools-route
  33. SECTION:=net
  34. CATEGORY:=Network
  35. TITLE:=net-tools - route utility
  36. URL:=http://net-tools.sourceforge.net/
  37. PROVIDES:=route
  38. ALTERNATIVES:=300:/sbin/route:/usr/libexec/net-tools-route
  39. endef
  40. define Package/net-tools-route/description
  41. Replace busybox version of the route command with the full net-tools
  42. version. This is normally not needed as busybox is smaller and provides
  43. sufficient functionality, but some users may want or need the full
  44. functionality of the net-tools variant (e.g. AF_X25).
  45. endef
  46. define Build/Configure
  47. # Failed configure.sh leaves stub config.h around.
  48. rm -f $(PKG_BUILD_DIR)/config.h
  49. ( cd $(PKG_BUILD_DIR); yes $$$$'\n' | ./configure.sh config.in )
  50. endef
  51. define Package/mii-tool/install
  52. $(INSTALL_DIR) $(1)/usr/sbin
  53. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mii-tool $(1)/usr/sbin/
  54. endef
  55. define Package/net-tools-route/install
  56. $(INSTALL_DIR) $(1)/usr/libexec
  57. $(INSTALL_BIN) $(PKG_BUILD_DIR)/route $(1)/usr/libexec/net-tools-route
  58. endef
  59. $(eval $(call BuildPackage,mii-tool))
  60. $(eval $(call BuildPackage,net-tools-route))