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