subweb: add package

This commit is contained in:
CN_SZTL 2020-03-21 01:49:11 +08:00
parent 8b48b278e0
commit e5ca5e7c80
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
4 changed files with 79 additions and 96 deletions

View File

@ -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)))

View 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
}

View File

@ -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))

View File

@ -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 <contact@project-openwrt.eu.org>
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))