small-package/my-default-settings/Makefile

53 lines
1.2 KiB
Makefile
Raw Normal View History

2021-09-24 23:37:27 +08:00
#
# Copyright (C) 2010-2011 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
2022-02-15 20:30:43 +08:00
include $(INCLUDE_DIR)/kernel.mk
2021-09-24 23:37:27 +08:00
2021-10-08 20:29:31 +08:00
PKG_NAME:=my-default-settings
2021-09-24 23:37:27 +08:00
PKG_VERSION:=1
2022-02-15 20:30:43 +08:00
PKG_RELEASE:=40
2021-09-24 23:37:27 +08:00
include $(INCLUDE_DIR)/package.mk
2021-10-08 20:29:31 +08:00
define Package/$(PKG_NAME)
2021-09-24 23:37:27 +08:00
SECTION:=luci
CATEGORY:=LuCI
TITLE:=Default Settings
MAINTAINER:=Kiddin'
PKGARCH:=all
2021-10-08 20:29:31 +08:00
DEPENDS:=+luci-base +bash
2021-09-24 23:37:27 +08:00
endef
2021-10-08 20:29:31 +08:00
define Package/$(PKG_NAME)/conffiles
2022-03-08 09:14:59 +08:00
/etc/config/
/etc/nginx/
2021-09-24 23:37:27 +08:00
endef
2022-02-14 21:07:23 +08:00
define Build/Prepare
2022-02-23 20:32:21 +08:00
chmod -R +x ./files/bin ./files/sbin ./files/etc/profile.d ./files/etc/rc.d ./files/usr/share target/*/{*,}/files/{etc/init.d,usr/bin} >/dev/null || true
2022-02-14 21:07:23 +08:00
endef
2021-09-24 23:37:27 +08:00
define Build/Compile
endef
2021-10-08 20:29:31 +08:00
define Package/$(PKG_NAME)/install
2022-02-14 21:07:23 +08:00
$(CP) ./files/* $(1)/
2022-02-15 20:30:43 +08:00
echo $(BOARD)$(TARGETID)
if [ -d ./target/$(BOARD)/files/. ]; then \
$(CP) ./target/$(BOARD)/files/* $(1)/; \
fi
if [ -d ./target/$(TARGETID)/files/. ]; then \
$(CP) ./target/$(TARGETID)/files/* $(1)/; \
fi; \
2021-09-24 23:37:27 +08:00
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
po2lmo ./po/zh_Hans/default.po $(1)/usr/lib/lua/luci/i18n/default.zh-cn.lmo
endef
2021-10-08 20:29:31 +08:00
$(eval $(call BuildPackage,$(PKG_NAME)))