forked from MartB/luci-theme-material
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
50 lines (40 loc) · 1.34 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
46
47
48
49
50
# LuCI Material Theme
# Copyright 2015 Lutty Yang <[email protected]>
#
# Licensed under the Apache License v2.0
# http://www.apache.org/licenses/LICENSE-2.0
include $(TOPDIR)/rules.mk
THEME_NAME:=material
THEME_TITLE:=Material
PKG_NAME:=luci-theme-$(THEME_NAME)
PKG_VERSION:=0.2.18
PKG_RELEASE:=1
include $(INCLUDE_DIR)/package.mk
define Package/luci-theme-$(THEME_NAME)
SECTION:=luci
CATEGORY:=LuCI
SUBMENU:=9. Themes
DEPENDS:=+libc
TITLE:=LuCI Theme - $(THEME_TITLE)
URL:=http://wcan.in/
PKGARCH:=all
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 commit luci" > $(1)/etc/uci-defaults/30-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
endef
define Package/luci-theme-$(THEME_NAME)/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
( . /etc/uci-defaults/30-luci-theme-$(THEME_NAME) ) && rm -f /etc/uci-defaults/30-luci-theme-$(THEME_NAME)
}
endef
$(eval $(call BuildPackage,luci-theme-$(THEME_NAME)))