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