[package] add mac-to-devinfo (#5373)
[openwrt/svn-archive/archive.git] / net / mac-to-devinfo / Makefile
1 include $(TOPDIR)/rules.mk
2
3 PKG_NAME:=mac-to-devinfo
4 PKG_VERSION:=1.0.0
5 PKG_RELEASE:=1
6
7 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
8
9 include $(INCLUDE_DIR)/package.mk
10
11 define Package/mac-to-devinfo
12 SECTION:=net
13 CATEGORY:=Network
14 TITLE:=MAC Address to Device Information
15 endef
16
17 define Package/mac-to-devinfo/description
18 Scripts to take a mac address (or ip if the ip is in the arp cache)
19 and translate it into device information (mostly OUI owner, from the
20 IEEE data files, but more information may be available for specific
21 devices/vendors).
22 endef
23
24 define Package/smap-to-devinfo
25 SECTION:=net
26 CATEGORY:=Network
27 DEPENDS:=mac-to-devinfo +smap +httping
28 TITLE:=SIP Device Information from Scan
29 endef
30
31 define Package/smap-to-devinfo/description
32 A script to use smap to discover all SIP devices on the networks
33 (provided ICMP and SIP are allowed to the network from the host) and
34 translate (through the ip then mac) into the device information.
35 endef
36
37 define Package/netdiscover-to-devinfo
38 SECTION:=net
39 CATEGORY:=Network
40 DEPENDS:=mac-to-devinfo +netdiscover
41 TITLE:=Device Information from Scan for MAC addresses
42 endef
43
44 define Package/netdiscover-to-devinfo/description
45 A script to use netdiscover to discover all devices on the specified
46 arp-able networks and translate into the device information.
47 endef
48
49 define Build/Prepare
50 endef
51
52 define Build/Configure
53 endef
54
55 define Build/Compile
56 endef
57
58 define Package/mac-to-devinfo/conffiles
59 /etc/config/mactodevinfo
60 endef
61
62 define Package/mac-to-devinfo/install
63 $(INSTALL_DIR) $(1)/usr/bin
64 $(INSTALL_BIN) ./files/mac-to-devinfo $(1)/usr/bin
65 $(INSTALL_BIN) ./files/ip-to-devinfo $(1)/usr/bin
66 $(INSTALL_BIN) ./files/prep-devinfo $(1)/usr/bin
67 $(INSTALL_DIR) $(1)/usr/lib/mac-to-devinfo
68 $(INSTALL_BIN) ./files/devinfo-functions.sh $(1)/usr/lib/mac-to-devinfo
69 $(INSTALL_DIR) $(1)/usr/share/mac-to-devinfo
70 $(CP) ./files/macdevdb $(1)/usr/share/mac-to-devinfo
71 $(INSTALL_DIR) $(1)/etc/config
72 $(CP) ./files/mactodevinfo $(1)/etc/config
73 endef
74
75 define Package/smap-to-devinfo/install
76 $(INSTALL_DIR) $(1)/usr/bin
77 $(INSTALL_BIN) ./files/smap-to-devinfo $(1)/usr/bin
78 endef
79
80 define Package/netdiscover-to-devinfo/install
81 $(INSTALL_DIR) $(1)/usr/bin
82 $(INSTALL_BIN) ./files/netdiscover-to-devinfo $(1)/usr/bin
83 endef
84
85 $(eval $(call BuildPackage,mac-to-devinfo))
86 $(eval $(call BuildPackage,smap-to-devinfo))
87 $(eval $(call BuildPackage,netdiscover-to-devinfo))