From e0f5decd3c28bba6ca3a55de4db070697cd6c9d7 Mon Sep 17 00:00:00 2001 From: Beginner <70857188+Beginner-Go@users.noreply.github.com> Date: Tue, 10 Aug 2021 14:13:45 +0800 Subject: [PATCH] luci-app-pushbot: tidy up Makefile (#7640) --- package/lean/luci-app-pushbot/Makefile | 32 ++++++++----------- .../luasrc/controller/pushbot.lua | 3 +- .../luasrc/model/cbi/pushbot/setting.lua | 2 +- .../{status.htm => pushbot_status.htm} | 0 .../luci-app-pushbot/root/etc/init.d/pushbot | 0 .../root/etc/uci-defaults/luci-pushbot | 0 .../root/usr/bin/pushbot/pushbot | 0 .../share/rpcd/acl.d/luci-app-pushbot.json | 0 8 files changed, 15 insertions(+), 22 deletions(-) rename package/lean/luci-app-pushbot/luasrc/view/pushbot/{status.htm => pushbot_status.htm} (100%) mode change 100644 => 100755 package/lean/luci-app-pushbot/root/etc/init.d/pushbot mode change 100644 => 100755 package/lean/luci-app-pushbot/root/etc/uci-defaults/luci-pushbot mode change 100644 => 100755 package/lean/luci-app-pushbot/root/usr/bin/pushbot/pushbot mode change 100644 => 100755 package/lean/luci-app-pushbot/root/usr/share/rpcd/acl.d/luci-app-pushbot.json diff --git a/package/lean/luci-app-pushbot/Makefile b/package/lean/luci-app-pushbot/Makefile index be51293de..35031d730 100644 --- a/package/lean/luci-app-pushbot/Makefile +++ b/package/lean/luci-app-pushbot/Makefile @@ -1,40 +1,34 @@ -# Copyright (C) 2020 Openwrt.org -# -# This is free software, licensed under the Apache License, Version 2.0 . -# - include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-pushbot PKG_VERSION:=3.12 PKG_RELEASE:=9 +PKG_MAINTAINER:=tty228 zzsj0928 + include $(INCLUDE_DIR)/package.mk define Package/$(PKG_NAME) - SECTION:=luci - CATEGORY:=LuCI - SUBMENU:=3. Applications - DEPENDS:=+iputils-arping +curl - TITLE:=LuCI support for Pushbot - PKGARCH:=all + SECTION:=luci + CATEGORY:=LuCI + SUBMENU:=3. Applications + DEPENDS:=+iputils-arping +curl + TITLE:=LuCI support for Pushbot + PKGARCH:=all endef define Build/Compile endef define Package/$(PKG_NAME)/conffiles -/etc/config/pushbot + /etc/config/pushbot endef define Package/$(PKG_NAME)/install - $(INSTALL_DIR) $(1)/etc/init.d $(1)/usr/bin/pushbot $(1)/etc/config $(1)/usr/lib/lua/luci $(1)/etc/uci-defaults $(1)/usr/share/rpcd/acl.d - $(CP) ./luasrc/* $(1)/usr/lib/lua/luci - $(INSTALL_CONF) ./root/etc/config/pushbot $(1)/etc/config - $(INSTALL_BIN) ./root/etc/init.d/pushbot $(1)/etc/init.d - $(INSTALL_BIN) ./root/etc/uci-defaults/luci-pushbot $(1)/etc/uci-defaults/luci-pushbot - $(INSTALL_BIN) ./root/usr/bin/pushbot/pushbot $(1)/usr/bin/pushbot - $(INSTALL_DATA) ./root/usr/share/rpcd/acl.d/luci-app-pushbot.json $(1)/usr/share/rpcd/acl.d/luci-app-pushbot.json + $(INSTALL_DIR) $(1)/usr/lib/lua/luci + cp -pR ./luasrc/* $(1)/usr/lib/lua/luci + $(INSTALL_DIR) $(1)/ + cp -pR ./root/* $(1)/ endef $(eval $(call BuildPackage,$(PKG_NAME))) diff --git a/package/lean/luci-app-pushbot/luasrc/controller/pushbot.lua b/package/lean/luci-app-pushbot/luasrc/controller/pushbot.lua index e581cf840..20a4d55c2 100644 --- a/package/lean/luci-app-pushbot/luasrc/controller/pushbot.lua +++ b/package/lean/luci-app-pushbot/luasrc/controller/pushbot.lua @@ -1,8 +1,7 @@ module("luci.controller.pushbot",package.seeall) function index() - - if not nixio.fs.access("/etc/config/pushbot")then + if not nixio.fs.access("/etc/config/pushbot") then return end diff --git a/package/lean/luci-app-pushbot/luasrc/model/cbi/pushbot/setting.lua b/package/lean/luci-app-pushbot/luasrc/model/cbi/pushbot/setting.lua index 22c1b29d5..2c7b3e549 100644 --- a/package/lean/luci-app-pushbot/luasrc/model/cbi/pushbot/setting.lua +++ b/package/lean/luci-app-pushbot/luasrc/model/cbi/pushbot/setting.lua @@ -13,7 +13,7 @@ translate("「全能推送」,英文名「PushBot」,是一款从服务器 .. [[]] ) -m:section(SimpleSection).template = "pushbot/status" +m:section(SimpleSection).template = "pushbot/pushbot_status" s=m:section(NamedSection,"pushbot","pushbot",translate("")) s:tab("basic", translate("基本设置")) diff --git a/package/lean/luci-app-pushbot/luasrc/view/pushbot/status.htm b/package/lean/luci-app-pushbot/luasrc/view/pushbot/pushbot_status.htm similarity index 100% rename from package/lean/luci-app-pushbot/luasrc/view/pushbot/status.htm rename to package/lean/luci-app-pushbot/luasrc/view/pushbot/pushbot_status.htm diff --git a/package/lean/luci-app-pushbot/root/etc/init.d/pushbot b/package/lean/luci-app-pushbot/root/etc/init.d/pushbot old mode 100644 new mode 100755 diff --git a/package/lean/luci-app-pushbot/root/etc/uci-defaults/luci-pushbot b/package/lean/luci-app-pushbot/root/etc/uci-defaults/luci-pushbot old mode 100644 new mode 100755 diff --git a/package/lean/luci-app-pushbot/root/usr/bin/pushbot/pushbot b/package/lean/luci-app-pushbot/root/usr/bin/pushbot/pushbot old mode 100644 new mode 100755 diff --git a/package/lean/luci-app-pushbot/root/usr/share/rpcd/acl.d/luci-app-pushbot.json b/package/lean/luci-app-pushbot/root/usr/share/rpcd/acl.d/luci-app-pushbot.json old mode 100644 new mode 100755