Tianling Shen 32e60759e6
default-settings: add luci to dependency
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
(cherry picked from commit 650f5eacd4db46283a300b625dd140d13e8c99dc)
2023-05-10 23:34:06 +08:00

55 lines
1.3 KiB
Makefile

#
# Copyright (C) 2021 Lean <coolsnowwolf@gmail.com>
#
# Copyright (C) 2021 ImmortalWrt
# <https://immortalwrt.org>
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=default-settings
PKG_VERSION:=1.1
PKG_RELEASE:=$(COMMITCOUNT)
PKG_LICENSE:=GPL-3.0
include $(INCLUDE_DIR)/package.mk
define Package/default-settings
SECTION:=luci
CATEGORY:=LuCI
TITLE:=LuCI support for Default Settings
DEPENDS:=+luci
PKGARCH:=all
DEPENDS:=+luci-lib-base
endef
define Package/default-settings-chn
$(Package/default-settings)
TITLE+= (Optimize for CHN users)
DEPENDS:=+default-settings +@LUCI_LANG_zh_Hans +luci-i18n-base-zh-cn
endef
define Build/Compile
endef
define Package/default-settings/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/99-default-settings $(1)/etc/uci-defaults/
endef
define Package/default-settings-chn/install
$(INSTALL_DIR) $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/99-default-settings-chinese $(1)/etc/uci-defaults/
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
po2lmo ./i18n/default.zh_Hans.po $(1)/usr/lib/lua/luci/i18n/default.zh-cn.lmo
po2lmo ./i18n/more.zh_Hans.po $(1)/usr/lib/lua/luci/i18n/more.zh-cn.lmo
endef
$(eval $(call BuildPackage,default-settings))
$(eval $(call BuildPackage,default-settings-chn))