From e5ca5e7c80a094fa7ba4dd053327a12d5ab64aeb Mon Sep 17 00:00:00 2001 From: CN_SZTL Date: Sat, 21 Mar 2020 01:49:11 +0800 Subject: [PATCH] subweb: add package --- package/ctcgfw/subweb/Makefile | 64 +++++++++++++++++++++++++ package/ctcgfw/subweb/files/subweb.init | 15 ++++++ package/ctcgfw/thefuck/Makefile | 45 ----------------- package/ctcgfw/you-get/Makefile | 51 -------------------- 4 files changed, 79 insertions(+), 96 deletions(-) create mode 100644 package/ctcgfw/subweb/Makefile create mode 100755 package/ctcgfw/subweb/files/subweb.init delete mode 100644 package/ctcgfw/thefuck/Makefile delete mode 100644 package/ctcgfw/you-get/Makefile diff --git a/package/ctcgfw/subweb/Makefile b/package/ctcgfw/subweb/Makefile new file mode 100644 index 0000000000..223ebe3d8b --- /dev/null +++ b/package/ctcgfw/subweb/Makefile @@ -0,0 +1,64 @@ +# +# 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:=20200309 +PKG_RELEASE:=1 + +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/lzdnico/subweb.git +PKG_SOURCE_VERSION:=b1ced3a68e3a4dfc6c9949b5f1553009c035baee +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:=net + CATEGORY:=Network + 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,README.md,README-cn.md} + $(RM) -r $(PKG_BUILD_DIR)/api/__pycache__ + $(SED) 's/root/etc/g;s/ -ef//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 + $(INSTALL_BIN) $(PKG_BUILD_DIR)/subweb.sh $(1)/etc/subweb/ + $(CP) $(PKG_BUILD_DIR)/{api,config,static,templates,api.py} $(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))) diff --git a/package/ctcgfw/subweb/files/subweb.init b/package/ctcgfw/subweb/files/subweb.init new file mode 100755 index 0000000000..71eb306019 --- /dev/null +++ b/package/ctcgfw/subweb/files/subweb.init @@ -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 +} diff --git a/package/ctcgfw/thefuck/Makefile b/package/ctcgfw/thefuck/Makefile deleted file mode 100644 index 738ff59e7b..0000000000 --- a/package/ctcgfw/thefuck/Makefile +++ /dev/null @@ -1,45 +0,0 @@ -# -# Copyright (C) 2020 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:=thefuck -PKG_VERSION:=3.29 -PKG_RELEASE:=1 - -PYPI_NAME:=thefuck -PKG_HASH:=7b907b6ef6863cc0d3e9bb3e573054547a60f89572250b767ccadb317d3c8297 - -PKG_MAINTAINER:=[CTCGFW]Project OpenWrt -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -include $(TOPDIR)/feeds/packages/lang/python/pypi.mk -include $(INCLUDE_DIR)/package.mk -include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk - -define Package/thefuck - SECTION:=utils - CATEGORY:=Utilities - TITLE:=Magnificent app which corrects your previous console command. - URL:=https://github.com/nvbn/thefuck - DEPENDS:= \ - +python3 \ - +python3-codecs \ - +python3-ctypes \ - +python3-setuptools - VARIANT:=python3 -endef - -define Package/thefuck/description - The Fuck is a magnificent app, inspired by a @liamosaur tweet, that corrects errors in previous console commands. -endef - -$(eval $(call Py3Package,thefuck)) -$(eval $(call BuildPackage,thefuck)) -$(eval $(call BuildPackage,thefuck-src)) - diff --git a/package/ctcgfw/you-get/Makefile b/package/ctcgfw/you-get/Makefile deleted file mode 100644 index 6dfaaaf677..0000000000 --- a/package/ctcgfw/you-get/Makefile +++ /dev/null @@ -1,51 +0,0 @@ -# -# Copyright (C) 2020 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:=you-get -PKG_VERSION:=0.4.1410 -PKG_RELEASE:=1 - -PYPI_NAME:=you-get -PKG_HASH:=a95a6f5c5f8317baa90fc9249be84290344f4fbcee2c5dc41675f0f243af5247 - -PKG_MAINTAINER:=[CTCGFW]Project OpenWrt -PKG_LICENSE:=MIT -PKG_LICENSE_FILES:=LICENSE - -include $(TOPDIR)/feeds/packages/lang/python/pypi.mk -include $(INCLUDE_DIR)/package.mk -include $(TOPDIR)/feeds/packages/lang/python/python3-package.mk - -define Package/you-get - SECTION:=multimedia - CATEGORY:=Multimedia - TITLE:=Dumb downloader that scrapes the web - URL:=https://you-get.org - DEPENDS:= \ - +ca-certificates \ - +ffmpeg \ - +python3 \ - +python3-email \ - +python3-xml \ - +python3-codecs \ - +python3-ctypes \ - +python3-setuptools - VARIANT:=python3 -endef - -define Package/you-get/description - You-Get is a tiny command-line utility to download - media contents (videos, audios, images) from the Web, - in case there is no other handy way to do it. -endef - -$(eval $(call Py3Package,you-get)) -$(eval $(call BuildPackage,you-get)) -$(eval $(call BuildPackage,you-get-src)) -