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.

74 lines
2.0 KiB

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