diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2014-09-03 16:32:57 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2014-09-03 16:38:06 +0200 |
commit | 6d3990cbcf2ce4f97bb9663c895f2bf914cf9edb (patch) | |
tree | a7b35e888c77edcdd82e350b5f3d65aca0a6f440 /net/mac-telnet/Makefile | |
parent | fbe4697b495676d332e5c6b519e84d9c580fd816 (diff) |
Add mac-telnet - a layer 2 Telnet/SSH server useful to access bricked devices
This package adds the mac-telnet server, client, ping and discovery utilities.
See https://github.com/aouyar/MAC-Telnet for details.
This package uses the fork from https://github.com/jow-/MAC-Telnet as source,
the code there has a number of bugfixes and results in smaller binaries since
most core functionality has been ported to libubox facilities provided by
OpenWrt.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'net/mac-telnet/Makefile')
-rw-r--r-- | net/mac-telnet/Makefile | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/net/mac-telnet/Makefile b/net/mac-telnet/Makefile new file mode 100644 index 000000000..856eaa865 --- /dev/null +++ b/net/mac-telnet/Makefile @@ -0,0 +1,71 @@ +# +# Copyright (C) 2014 OpenWrt.org +# + +include $(TOPDIR)/rules.mk + +PKG_NAME:=mac-telnet +PKG_VERSION:=2014-09-03 +PKG_RELEASE:=$(PKG_SOURCE_VERSION) + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/jow-/MAC-Telnet.git +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_VERSION:=9a8bf5c242c6b0336c2f257aa67d2240454ba4b0 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz + +PKG_LICENSE:=GPL-2.0+ +PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org> + +include $(INCLUDE_DIR)/package.mk + +TARGET_CFLAGS += -ffunction-sections -fdata-sections $(if $(CONFIG_MACTELNET_PLAIN_SUPPORT),-DTELNET_SUPPORT) +TARGET_LDFLAGS += -Wl,--gc-sections + +# 1: name +# 2: executable +define BuildPlugin + define Package/mac-telnet-$(1) + SECTION:=net + CATEGORY:=Network + DEPENDS:=+libubox + TITLE:=MAC-Telnet / MAC-SSH $(1) + URL:=https://github.com/jow-/MAC-Telnet + endef + + define Package/mac-telnet-$(1)/description + Open source MAC Telnet client and server utilities for connecting to + Mikrotik RouterOS routers and Linux machines via MAC address. + endef + + define Package/mac-telnet-$(1)/install + $(INSTALL_DIR) $$(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(2) $$(1)/usr/sbin/ + $(call Package/mac-telnet-$(1)/install-extra) + endef + + $$(eval $$(call BuildPackage,mac-telnet-$(1))) +endef + +define Package/mac-telnet-server/config + config MACTELNET_PLAIN_SUPPORT + bool "Include support for plain telnet connections" + depends on PACKAGE_mac-telnet-server + default y + help + Disable this option to only support SSH logins to the + MAC-Telnet server. +endef + +define Package/mac-telnet-server/install-extra + $(INSTALL_DIR) $$(1)/etc/init.d + $(INSTALL_BIN) ./files/mactelnet.init $$(1)/etc/init.d/mactelnet + $(INSTALL_DIR) $$(1)/etc/config + $(INSTALL_DATE) ./files/mactelnet.config $$(1)/etc/config/mactelnet +endef + + +$(eval $(call BuildPlugin,server,mactelnetd)) +$(eval $(call BuildPlugin,client,mactelnet)) +$(eval $(call BuildPlugin,ping,macping)) +$(eval $(call BuildPlugin,discover,mndp)) |