1 Star 0 Fork 0

qlljcf666/istore-openwrt-app-meta

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
meta.mk 2.95 KB
一键复制 编辑 原始数据 按行查看 历史
jjm2473 提交于 2024-07-10 12:52 . move entrysh tag to flags (#402)
#
# Copyright (C) 2021 jjm2473 <jjm2473@gmail.com>
#
# This is free software, licensed under the Apache License, Version 2.0 .
#
META_NAME?=$(notdir ${CURDIR})
META_BASENAME?=$(patsubst app-meta-%,%,$(META_NAME))
META_ARCH?=all
META_FLAGS:=$(if $(realpath entry.sh), entrysh)
PKG_NAME?=$(META_NAME)
PKG_RELEASE?=1
PKG_MAINTAINER:=$(META_AUTHOR)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
escape_json=$(strip $(subst ",\",$(subst \,\\\\,$(1))))
META_ESCAPED_TITLE:=$(call escape_json,$(META_TITLE))
META_ESCAPED_DESCRIPTION:=$(call escape_json,$(META_DESCRIPTION))
META_ESCAPED_TITLE.en:=$(call escape_json,$(META_TITLE.en))
META_ESCAPED_DESCRIPTION.en:=$(call escape_json,$(META_DESCRIPTION.en))
define Package/$(PKG_NAME)
SECTION:=meta
CATEGORY:=Metadata
TITLE:=$(META_TITLE)
DEPENDS:=$(META_DEPENDS)
PKGARCH:=all
endef
ifneq ($(META_DESCRIPTION),)
define Package/$(PKG_NAME)/description
$(strip $(META_DESCRIPTION))
endef
endif
define Build/Prepare
endef
define Build/Configure
endef
define Build/Compile
endef
define Package/$(PKG_NAME)/JsonInfo
{
"name": "$(META_BASENAME)",
"title": "$(META_ESCAPED_TITLE)",
$(if $(META_ESCAPED_TITLE.en), "title_en": "$(META_ESCAPED_TITLE.en)"$(comma))
"entry": "$(META_LUCI_ENTRY)",
"author": "$(META_AUTHOR)",
"website": "$(META_WEBSITE)",
$(if $(META_TUTORIAL), "tutorial": "$(META_TUTORIAL)"$(comma))
"version": "$(PKG_VERSION)",
"release": $(PKG_RELEASE),
"arch": [$(patsubst %$(comma),%,$(subst $(space),,$(foreach arch,$(META_ARCH),"$(arch)"$(comma))))],
"description": "$(META_ESCAPED_DESCRIPTION)",
$(if $(META_ESCAPED_DESCRIPTION.en), "description_en": "$(META_ESCAPED_DESCRIPTION.en)"$(comma))
$(if $(META_AUTOCONF), "autoconf": [$(patsubst %$(comma),%,$(subst $(space),,$(foreach conf,$(META_AUTOCONF),"$(conf)"$(comma))))]$(comma))
$(if $(META_UCI), "uci": "$(META_UCI)"$(comma))
$(if $(META_FLAGS), "flags": [$(patsubst %$(comma),%,$(subst $(space),,$(foreach flag,$(META_FLAGS),"$(flag)"$(comma))))]$(comma))
"tags": [$(patsubst %$(comma),%,$(subst $(space),,$(foreach tag,$(META_TAGS),"$(tag)"$(comma))))],
"depends": [$(patsubst %$(comma),%,$(subst $(space),,$(foreach dep,$(META_DEPENDS),"$(subst +,,$(dep))"$(comma))))]
}
endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/lib/opkg/meta $(1)/usr/libexec/istorea $(1)/usr/libexec/istoree $(1)/www/luci-static/resources/app-icons
if [ -d ./root ]; then \
cp -pR ./root/* $(1)/; \
else true; fi
if [ -f ./logo.png ]; then \
$(INSTALL_DATA) ./logo.png $(1)/www/luci-static/resources/app-icons/$(META_BASENAME).png ; \
fi;
if [ -f ./config.sh ]; then \
$(INSTALL_BIN) ./config.sh $(1)/usr/libexec/istorea/$(META_BASENAME).sh ; \
fi;
if [ -f ./entry.sh ]; then \
$(INSTALL_BIN) ./entry.sh $(1)/usr/libexec/istoree/$(META_BASENAME).sh ; \
fi;
echo "$(call escape_json,$(call Package/$(PKG_NAME)/JsonInfo))" > $(1)/usr/lib/opkg/meta/$(META_BASENAME).json
endef
$(eval $(call BuildPackage,$(PKG_NAME)))
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/qlljcf666/istore-openwrt-app-meta.git
git@gitee.com:qlljcf666/istore-openwrt-app-meta.git
qlljcf666
istore-openwrt-app-meta
istore-openwrt-app-meta
main

搜索帮助