-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
45 lines (36 loc) · 1.38 KB
/
Makefile
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
include $(TOPDIR)/rules.mk
THEME_NAME:=commotion
THEME_TITLE:=Commotion
PKG_NAME:=luci-theme-$(THEME_NAME)
PKG_VERSION:=1
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define Package/luci-theme-$(THEME_NAME)
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=4. Themes
DEPENDS:=+luci-theme-base
TITLE:=LuCI Theme - $(THEME_TITLE)
URL:=http://www.commotionwireless.net/
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/luci-theme-$(THEME_NAME)/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
echo "uci set luci.themes.$(THEME_TITLE)=/luci-static/$(THEME_NAME); uci set luci.main.mediaurlbase=/luci-static/$(THEME_NAME); uci commit luci" > $(1)/etc/uci-defaults/luci-theme-$(THEME_NAME)
$(INSTALL_DIR) $(1)/www/luci-static/$(THEME_NAME)
$(CP) -a ./files/htdocs/* $(1)/www/luci-static/$(THEME_NAME)/ 2>/dev/null || true
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/view/themes/$(THEME_NAME)
$(CP) -a ./files/templates/* $(1)/usr/lib/lua/luci/view/themes/$(THEME_NAME)/ 2>/dev/null || true
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/view/cbi
$(CP) -a ./luasrc/view/cbi/* $(1)/usr/lib/lua/luci/view/cbi/ 2>/dev/null || true
endef
define Package/luci-theme-$(THEME_NAME)/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
( . /etc/uci-defaults/luci-theme-$(THEME_NAME) ) && rm -f /etc/uci-defaults/luci-theme-$(THEME_NAME)
}
endef
$(eval $(call BuildPackage,luci-theme-$(THEME_NAME)))