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.

116 lines
3.2 KiB

  1. # openwisp.org
  2. #
  3. # This is free software, licensed under the GNU General Public License v3.
  4. # See /LICENSE for more information.
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=openwisp-monitoring
  7. PKG_RELEASE:=1
  8. PKG_MAINTAINER:=Federico Capoano <support@openwisp.io>
  9. PKG_LICENSE:=GPL3.0-or-later
  10. PKG_LICENSE_FILES:=LICENSE
  11. PKG_SOURCE_URL:=https://github.com/openwisp/openwrt-openwisp-monitoring.git
  12. PKG_MIRROR_HASH:=ce2ed94d24f68c58320ca700a088471368e1097754be23ad6053842cf0aaa97e
  13. PKG_SOURCE_PROTO:=git
  14. PKG_SOURCE_VERSION:=0.1.1
  15. PKGARCH:=all
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/openwisp-monitoring
  18. TITLE:=OpenWISP Monitoring agent
  19. CATEGORY:=Administration
  20. SECTION:=admin
  21. SUBMENU:=openwisp
  22. DEPENDS:=+netjson-monitoring +openwisp-config
  23. URL:=http://openwisp.org
  24. endef
  25. define Package/netjson-monitoring
  26. TITLE:=NetJson Monitoring
  27. CATEGORY:=Administration
  28. SECTION:=admin
  29. SUBMENU:=openwisp
  30. DEPENDS:=+libubus-lua +lua-cjson +rpcd +rpcd-mod-iwinfo
  31. URL:=http://openwisp.org
  32. endef
  33. define Build/Compile
  34. endef
  35. define Package/openwisp-monitoring/conffiles
  36. /etc/config/openwisp-monitoring
  37. endef
  38. define Package/netjson-monitoring/install
  39. $(INSTALL_DIR) \
  40. $(1)/usr/sbin \
  41. $(1)/usr/libexec \
  42. $(1)/usr/lib/lua/openwisp-monitoring \
  43. $(1)/etc/openwisp-monitoring
  44. $(INSTALL_BIN) \
  45. $(PKG_BUILD_DIR)/openwisp-monitoring/files/sbin/netjson-monitoring.lua \
  46. $(1)/usr/libexec/netjson-monitoring
  47. $(INSTALL_BIN) \
  48. $(PKG_BUILD_DIR)/openwisp-monitoring/files/netjson-monitoring \
  49. $(1)/usr/sbin/netjson-monitoring
  50. $(INSTALL_DATA) \
  51. $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/dhcp.lua \
  52. $(1)/usr/lib/lua/openwisp-monitoring/dhcp.lua
  53. $(INSTALL_DATA) \
  54. $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/interfaces.lua \
  55. $(1)/usr/lib/lua/openwisp-monitoring/interfaces.lua
  56. $(INSTALL_DATA) \
  57. $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/monitoring.lua \
  58. $(1)/usr/lib/lua/openwisp-monitoring/monitoring.lua
  59. $(INSTALL_DATA) \
  60. $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/utils.lua \
  61. $(1)/usr/lib/lua/openwisp-monitoring/utils.lua
  62. $(INSTALL_DATA) \
  63. $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/neighbors.lua \
  64. $(1)/usr/lib/lua/openwisp-monitoring/neighbors.lua
  65. $(INSTALL_DATA) \
  66. $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/resources.lua \
  67. $(1)/usr/lib/lua/openwisp-monitoring/resources.lua
  68. $(INSTALL_DATA) \
  69. $(PKG_BUILD_DIR)/openwisp-monitoring/files/lib/openwisp-monitoring/wifi.lua \
  70. $(1)/usr/lib/lua/openwisp-monitoring/wifi.lua
  71. $(CP) $(PKG_BUILD_DIR)/VERSION $(1)/etc/openwisp-monitoring/
  72. endef
  73. define Package/openwisp-monitoring/install
  74. $(INSTALL_DIR) \
  75. $(1)/usr/sbin \
  76. $(1)/etc/init.d \
  77. $(1)/etc/config \
  78. $(1)/etc/openwisp-monitoring
  79. $(INSTALL_BIN) \
  80. $(PKG_BUILD_DIR)/openwisp-monitoring/files/monitoring.agent \
  81. $(1)/usr/sbin/openwisp-monitoring
  82. $(INSTALL_BIN) \
  83. $(PKG_BUILD_DIR)/openwisp-monitoring/files/monitoring.init \
  84. $(1)/etc/init.d/openwisp-monitoring
  85. $(INSTALL_CONF) \
  86. $(PKG_BUILD_DIR)/openwisp-monitoring/files/monitoring.config \
  87. $(1)/etc/config/openwisp-monitoring
  88. endef
  89. $(eval $(call BuildPackage,openwisp-monitoring))
  90. $(eval $(call BuildPackage,netjson-monitoring))