subweb: add package
This commit is contained in:
parent
798f328623
commit
4104ac83ea
62
package/ctcgfw/subweb/Makefile
Normal file
62
package/ctcgfw/subweb/Makefile
Normal file
@ -0,0 +1,62 @@
|
||||
#
|
||||
# Copyright (C) 2019 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=subweb
|
||||
PKG_VERSION:=20200225
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/lzdnico/subweb.git
|
||||
PKG_SOURCE_VERSION:=c6943dcebf7755d381c69f535397bba80507731b
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
|
||||
PKG_LICENSE:=GPLv3
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=[CTCGFW]Project OpenWrt
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_INSTALL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=(WebUI) Utility to convert between various subscription format.
|
||||
URL:=https://github.com/lzdnico/subweb
|
||||
DEPENDS:=+python3 +python3-flask +python3-flask-restful +python3-requests +subconverter
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
(WebUI) Utility to convert between various subscription format.
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
$(RM) $(PKG_BUILD_DIR)/config/subconverter
|
||||
$(SED) 's/root/etc/g' $(PKG_BUILD_DIR)/subweb.sh
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/etc/subweb
|
||||
$(CP) $(PKG_BUILD_DIR)/{api,config,static,templates,api.py,subweb.sh} $(1)/etc/subweb/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/subweb.init $(1)/etc/init.d/subweb
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
15
package/ctcgfw/subweb/files/subweb.init
Executable file
15
package/ctcgfw/subweb/files/subweb.init
Executable file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
BIN=/etc/subweb/subweb.sh
|
||||
|
||||
start_service() {
|
||||
[ ! -e /etc/subweb/config/subconverter ] && ln -fs /usr/bin/subconverter /etc/subweb/config/subconverter
|
||||
procd_open_instance
|
||||
procd_set_param command $BIN
|
||||
procd_set_param respawn
|
||||
procd_set_param stderr 1
|
||||
procd_close_instance
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user