2019-11-02 11:15:02 +08:00
|
|
|
#
|
2021-01-30 19:06:57 +08:00
|
|
|
# Copyright (C) 2021 Lean <coolsnowwolf@gmail.com>
|
|
|
|
#
|
2021-02-06 17:52:37 +08:00
|
|
|
# Copyright (C) 2021 ImmortalWrt
|
2021-03-01 22:13:52 +08:00
|
|
|
# <https://immortalwrt.org>
|
2019-11-02 11:15:02 +08:00
|
|
|
#
|
2022-12-12 03:29:38 +08:00
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
2019-11-02 11:15:02 +08:00
|
|
|
# See /LICENSE for more information.
|
2021-01-30 19:06:57 +08:00
|
|
|
#
|
2019-11-02 11:15:02 +08:00
|
|
|
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
|
|
|
|
PKG_NAME:=default-settings
|
|
|
|
PKG_VERSION:=1.1
|
2021-05-23 22:34:32 +08:00
|
|
|
PKG_RELEASE:=$(COMMITCOUNT)
|
|
|
|
|
|
|
|
PKG_LICENSE:=GPL-3.0
|
|
|
|
|
2019-11-02 11:15:02 +08:00
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
|
|
|
|
define Package/default-settings
|
|
|
|
SECTION:=luci
|
|
|
|
CATEGORY:=LuCI
|
|
|
|
TITLE:=LuCI support for Default Settings
|
2023-05-10 23:33:42 +08:00
|
|
|
DEPENDS:=+luci
|
2019-11-02 11:15:02 +08:00
|
|
|
PKGARCH:=all
|
2021-06-22 19:48:24 +08:00
|
|
|
DEPENDS:=+luci-lib-base
|
2021-05-23 22:34:32 +08:00
|
|
|
endef
|
|
|
|
|
2021-11-29 00:02:23 +08:00
|
|
|
define Package/default-settings-chn
|
|
|
|
$(Package/default-settings)
|
|
|
|
TITLE+= (Optimize for CHN users)
|
2023-04-19 05:47:40 +08:00
|
|
|
DEPENDS:=+default-settings +@LUCI_LANG_zh_Hans +luci-i18n-base-zh-cn
|
2019-11-02 11:15:02 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
define Build/Compile
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Package/default-settings/install
|
2021-01-30 19:06:57 +08:00
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2021-11-12 23:40:50 +08:00
|
|
|
$(INSTALL_BIN) ./files/99-default-settings $(1)/etc/uci-defaults/
|
2021-11-29 00:02:23 +08:00
|
|
|
endef
|
2021-01-30 19:06:57 +08:00
|
|
|
|
2021-11-29 00:02:23 +08:00
|
|
|
define Package/default-settings-chn/install
|
2021-11-29 11:01:17 +08:00
|
|
|
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
2021-11-12 23:40:50 +08:00
|
|
|
$(INSTALL_BIN) ./files/99-default-settings-chinese $(1)/etc/uci-defaults/
|
2021-05-23 22:34:32 +08:00
|
|
|
|
2021-01-30 19:06:57 +08:00
|
|
|
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
|
2020-02-16 01:15:50 +08:00
|
|
|
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
|
2019-11-02 11:15:02 +08:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildPackage,default-settings))
|
2021-11-29 00:02:23 +08:00
|
|
|
$(eval $(call BuildPackage,default-settings-chn))
|