-
-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy pathMakefile
More file actions
82 lines (65 loc) · 2.32 KB
/
Copy pathMakefile
File metadata and controls
82 lines (65 loc) · 2.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
#
# Copyright (C) 2024 Ycarus (Yannick Chabanois) for OpenMPTCProuter <contact@openmptcprouter.com>
#
# This is free software, licensed under the GNU General Public License v2.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-jammonitor
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/madebyjamstudios/jammonitor.git
PKG_SOURCE_VERSION:=df217f9fc4deec631c6d668606706de4dfd5b8a6
PKG_MIRROR_HASH:=skip
PKG_MAINTAINER:=Yannick Chabanois <yannick.chabanois@openmptcprouter.com>
PKG_LICENSE:=GPL-2.0-only
LUCI_TITLE:=Jam Monitor – LuCI status dashboard
LUCI_DEPENDS:=+luci-base +luci-mod-admin-full
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=3. Applications
TITLE:=$(LUCI_TITLE)
DEPENDS:=$(LUCI_DEPENDS)
PKGARCH:=all
endef
define Package/$(PKG_NAME)/description
LuCI-based dashboard for monitoring OpenMPTCProuter / OpenWrt systems.
Provides real-time system stats, MPTCP status, WAN policy management,
client tracking, Wi-Fi AP overview, diagnostics bundle generation,
VPN/tunnel status, vnstat traffic data and self-update support.
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/install
# LuCI controller
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller
$(INSTALL_DATA) $(PKG_BUILD_DIR)/jammonitor.lua \
$(1)/usr/lib/lua/luci/controller/jammonitor.lua
# LuCI view template
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/view
$(INSTALL_DATA) $(PKG_BUILD_DIR)/jammonitor.htm \
$(1)/usr/lib/lua/luci/view/jammonitor.htm
# Static JS resources
$(INSTALL_DIR) $(1)/www/luci-static/resources
$(INSTALL_DATA) $(PKG_BUILD_DIR)/jammonitor.js \
$(1)/www/luci-static/resources/jammonitor.js
$(INSTALL_DATA) $(PKG_BUILD_DIR)/jammonitor-i18n.js \
$(1)/www/luci-static/resources/jammonitor-i18n.js
# Version file (short git hash) used for the in-app update checker
echo "$(PKG_SOURCE_VERSION)" > $(1)/www/luci-static/resources/jammonitor.version
endef
# Clear LuCI caches on install / removal so the new controller is picked up
define Package/$(PKG_NAME)/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || rm -rf /tmp/luci-*
exit 0
endef
define Package/$(PKG_NAME)/postrm
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || rm -rf /tmp/luci-*
exit 0
endef
$(eval $(call BuildPackage,$(PKG_NAME)))