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.

72 lines
2.1 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_VERSION:=2.10
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
  13. PKG_SOURCE_URL:=https://sourceforge.net/projects/net-tools/files/
  14. PKG_HASH:=b262435a5241e89bfa51c3cabd5133753952f7a7b7b93f32e08cb9d96f580d69
  15. PKG_MAINTAINER:=Stijn Segers <borromini.reg@protonmail.com>
  16. PKG_LICENSE:=GPL-2.0-or-later
  17. PKG_LICENSE_FILES:=COPYING
  18. include $(INCLUDE_DIR)/package.mk
  19. define Package/mii-tool
  20. SECTION:=net
  21. CATEGORY:=Network
  22. TITLE:=configure media type using MII commands
  23. URL:=http://net-tools.sourceforge.net/
  24. endef
  25. define Package/mii-tool/description
  26. The mii-tool command allows you to set or autodetect the media type
  27. or mii chipset-based ethernet devices. It traditionally had been
  28. distributed in the net-tools package. This is a single distribution
  29. optimized for embedded systems and fully automated cross/-sysroot-builds
  30. endef
  31. define Package/net-tools-route
  32. SECTION:=net
  33. CATEGORY:=Network
  34. TITLE:=net-tools - route utility
  35. URL:=http://net-tools.sourceforge.net/
  36. PROVIDES:=route
  37. ALTERNATIVES:=300:/sbin/route:/usr/libexec/net-tools-route
  38. endef
  39. define Package/net-tools-route/description
  40. Replace busybox version of the route command with the full net-tools
  41. version. This is normally not needed as busybox is smaller and provides
  42. sufficient functionality, but some users may want or need the full
  43. functionality of the net-tools variant (e.g. AF_X25).
  44. endef
  45. define Build/Configure
  46. # Failed configure.sh leaves stub config.h around.
  47. rm -f $(PKG_BUILD_DIR)/config.h
  48. ( cd $(PKG_BUILD_DIR); yes $$$$'\n' | ./configure.sh config.in )
  49. endef
  50. define Package/mii-tool/install
  51. $(INSTALL_DIR) $(1)/usr/sbin
  52. $(INSTALL_BIN) $(PKG_BUILD_DIR)/mii-tool $(1)/usr/sbin/
  53. endef
  54. define Package/net-tools-route/install
  55. $(INSTALL_DIR) $(1)/usr/libexec
  56. $(INSTALL_BIN) $(PKG_BUILD_DIR)/route $(1)/usr/libexec/net-tools-route
  57. endef
  58. $(eval $(call BuildPackage,mii-tool))
  59. $(eval $(call BuildPackage,net-tools-route))