small-package/my-default-settings/Makefile

53 lines
1.2 KiB
Makefile
Raw Normal View History

2022-03-17 20:35:15 +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
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=my-default-settings
PKG_VERSION:=1
2022-05-12 02:41:50 +08:00
PKG_RELEASE:=80
2022-03-17 20:35:15 +08:00
include $(INCLUDE_DIR)/package.mk
define Package/$(PKG_NAME)
SECTION:=luci
CATEGORY:=LuCI
TITLE:=Default Settings
MAINTAINER:=Kiddin'
PKGARCH:=all
2022-06-21 08:54:38 +08:00
DEPENDS:=+luci-base
2022-03-17 20:35:15 +08:00
endef
define Package/$(PKG_NAME)/conffiles
/etc/config/
/etc/nginx/
endef
define Build/Prepare
2022-07-13 16:26:23 +08:00
chmod -R +x ./files/bin ./files/sbin ./files/etc/profile.d ./files/etc/rc.d ./files/usr/share target/*/{*,}/base-files/{etc/init.d,usr/bin} >/dev/null || true
2022-03-17 20:35:15 +08:00
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/install
$(CP) ./files/* $(1)/
echo $(BOARD)$(TARGETID)
2022-07-13 16:26:23 +08:00
if [ -d ./target/$(BOARD)/base-files/. ]; then \
$(CP) ./target/$(BOARD)/base-files/* $(1)/; \
2022-03-17 20:35:15 +08:00
fi
2022-07-13 16:26:23 +08:00
if [ -d ./target/$(TARGETID)/base-files/. ]; then \
$(CP) ./target/$(TARGETID)/base-files/* $(1)/; \
2022-03-17 20:35:15 +08:00
fi; \
$(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
$(eval $(call BuildPackage,$(PKG_NAME)))