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) 2014-2015 OpenWrt.org
  3. #
  4. include $(TOPDIR)/rules.mk
  5. PKG_NAME:=mac-telnet
  6. PKG_VERSION:=2015-09-02
  7. PKG_RELEASE=$(PKG_SOURCE_VERSION)+1
  8. PKG_SOURCE_PROTO:=git
  9. PKG_SOURCE_URL:=https://github.com/jow-/MAC-Telnet.git
  10. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  11. PKG_SOURCE_VERSION:=37d83cbc9c07266d6c957d27bf75285b305eceab
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  13. PKG_MIRROR_HASH:=13429f1a870121cdbbfb687e0581967904798000eca1f8f9c1e9dc87dee5669b
  14. PKG_LICENSE:=GPL-2.0-or-later
  15. PKG_MAINTAINER:=Jo-Philipp Wich <jo@mein.io>
  16. include $(INCLUDE_DIR)/package.mk
  17. TARGET_CFLAGS += -ffunction-sections -fdata-sections $(if $(CONFIG_MACTELNET_PLAIN_SUPPORT),-DTELNET_SUPPORT)
  18. TARGET_LDFLAGS += -Wl,--gc-sections
  19. # 1: name
  20. # 2: executable
  21. define BuildPlugin
  22. define Package/mac-telnet-$(1)
  23. SECTION:=net
  24. CATEGORY:=Network
  25. DEPENDS:=+libubox
  26. TITLE:=MAC-Telnet / MAC-SSH $(1)
  27. URL:=https://github.com/jow-/MAC-Telnet
  28. endef
  29. define Package/mac-telnet-$(1)/description
  30. Open source MAC Telnet client and server utilities for connecting to
  31. Mikrotik RouterOS routers and Linux machines via MAC address.
  32. endef
  33. define Package/mac-telnet-$(1)/install
  34. $(INSTALL_DIR) $$(1)/usr/sbin
  35. $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(2) $$(1)/usr/sbin/
  36. $(call Package/mac-telnet-$(1)/install-extra)
  37. endef
  38. $$(eval $$(call BuildPackage,mac-telnet-$(1)))
  39. endef
  40. define Package/mac-telnet-server/config
  41. config MACTELNET_PLAIN_SUPPORT
  42. bool "Include support for plain telnet connections"
  43. depends on PACKAGE_mac-telnet-server
  44. default y
  45. help
  46. Disable this option to only support SSH logins to the
  47. MAC-Telnet server.
  48. endef
  49. define Package/mac-telnet-server/install-extra
  50. $(INSTALL_DIR) $$(1)/etc/init.d
  51. $(INSTALL_BIN) ./files/mactelnet.init $$(1)/etc/init.d/mactelnet
  52. $(INSTALL_DIR) $$(1)/etc/config
  53. $(INSTALL_DATA) ./files/mactelnet.config $$(1)/etc/config/mactelnet
  54. endef
  55. $(eval $(call BuildPlugin,server,mactelnetd))
  56. $(eval $(call BuildPlugin,client,mactelnet))
  57. $(eval $(call BuildPlugin,ping,macping))
  58. $(eval $(call BuildPlugin,discover,mndp))