-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
57 lines (44 loc) · 1.44 KB
/
Makefile
File metadata and controls
57 lines (44 loc) · 1.44 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
include $(TOPDIR)/rules.mk
PKG_NAME:=moci
PKG_VERSION:=0.1.0
PKG_RELEASE:=1
PKG_MAINTAINER:=HudsonGraeme
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/moci
SECTION:=admin
CATEGORY:=Administration
TITLE:=MoCI - Modern Configuration Interface for OpenWrt
PKGARCH:=all
DEPENDS:=+uhttpd +rpcd
endef
define Package/moci/description
Modern web interface for OpenWrt routers.
Pure vanilla JavaScript SPA using OpenWrt's native ubus API.
endef
define Build/Compile
endef
define Package/moci/install
$(INSTALL_DIR) $(1)/www/moci
$(INSTALL_DATA) ./dist/moci/index.html $(1)/www/moci/
$(INSTALL_DATA) ./dist/moci/app.css $(1)/www/moci/
$(INSTALL_DIR) $(1)/www/moci/js
$(INSTALL_DATA) ./dist/moci/js/core.js $(1)/www/moci/js/
$(INSTALL_DIR) $(1)/www/moci/js/modules
$(INSTALL_DATA) ./dist/moci/js/modules/dashboard.js $(1)/www/moci/js/modules/
$(INSTALL_DATA) ./dist/moci/js/modules/network.js $(1)/www/moci/js/modules/
$(INSTALL_DATA) ./dist/moci/js/modules/system.js $(1)/www/moci/js/modules/
$(INSTALL_DIR) $(1)/usr/share/rpcd/acl.d
$(INSTALL_DATA) ./rpcd-acl.json $(1)/usr/share/rpcd/acl.d/moci.json
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/moci.config $(1)/etc/config/moci
endef
define Package/moci/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
/etc/init.d/rpcd restart
echo "MoCI installed. Access at http://[router-ip]/moci/"
}
endef
$(eval $(call BuildPackage,moci))