mirror of
https://github.com/kiddin9/openwrt-packages.git
synced 2025-01-09 09:47:28 +08:00
🐤 Sync 2024-01-28 04:05:58
This commit is contained in:
parent
c536101bfe
commit
0a2aa3047a
70
frp/Makefile
70
frp/Makefile
@ -1,68 +1,68 @@
|
||||
#
|
||||
# Copyright (C) 2019 Xingwang Liao
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=frp
|
||||
PKG_VERSION:=0.51.3
|
||||
PKG_RELEASE:=34
|
||||
PKG_VERSION:=0.53.2
|
||||
PKG_RELEASE:=35
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/fatedier/frp/tar.gz/v${PKG_VERSION}?
|
||||
PKG_HASH:=skip
|
||||
|
||||
PKG_MAINTAINER:=Richard Yu <yurichard3839@gmail.com>
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Xingwang Liao <kuoruan@gmail.com>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host
|
||||
PKG_BUILD_DEPENDS:=golang/host upx/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
GO_PKG:=github.com/fatedier/frp
|
||||
GO_PKG_BUILD_PKG:=github.com/fatedier/frp/cmd/...
|
||||
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/frp/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/$(2) $(1)/usr/bin/
|
||||
$(INSTALL_DIR) $(1)/etc/frp/$(2).d/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/$(2)_full.ini $(1)/etc/frp/$(2).d/
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_CONF) ./files/$(2).config $(1)/etc/config/$(2)
|
||||
$(INSTALL_DIR) $(1)/etc/init.d/
|
||||
$(INSTALL_BIN) ./files/$(2).init $(1)/etc/init.d/$(2)
|
||||
|
||||
if [ -r ./files/$(2).uci-defaults ]; then \
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults; \
|
||||
$(INSTALL_DATA) ./files/$(2).uci-defaults $(1)/etc/uci-defaults/$(2); \
|
||||
fi
|
||||
endef
|
||||
|
||||
define Package/frp/template
|
||||
define frp/templates
|
||||
define Package/$(1)
|
||||
TITLE:=A fast reverse proxy ($(1))
|
||||
URL:=https://github.com/fatedier/frp
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=$(1) - fast reverse proxy $(2)
|
||||
URL:=https://github.com/fatedier/frp
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS)
|
||||
DEPENDS:=$$(GO_ARCH_DEPENDS)
|
||||
endef
|
||||
|
||||
define Package/$(1)/description
|
||||
$(1) is a fast reverse proxy $(2) to help you expose a local server behind
|
||||
a NAT or firewall to the internet.
|
||||
endef
|
||||
frp is a fast reverse proxy to help you expose a local server behind a NAT or firewall
|
||||
to the internet. As of now, it supports tcp & udp, as well as http and https protocols,
|
||||
where requests can be forwarded to internal services by domain name.
|
||||
|
||||
define Package/$(1)/conffiles
|
||||
/etc/config/$(1)
|
||||
This package contains the $(1).
|
||||
endef
|
||||
|
||||
define Package/$(1)/install
|
||||
$(call Package/frp/install,$$(1),$(1))
|
||||
$$(call GoPackage/Package/Install/Bin,$$(PKG_INSTALL_DIR))
|
||||
|
||||
$$(INSTALL_DIR) $$(1)/usr/bin
|
||||
$$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/bin/$(1) $$(1)/usr/bin/
|
||||
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $$(1)/usr/bin/$(1) || true
|
||||
endef
|
||||
endef
|
||||
|
||||
$(eval $(call Package/frp/template,frpc,client))
|
||||
$(eval $(call Package/frp/template,frps,server))
|
||||
$(eval $(call BuildPackage,frpc))
|
||||
$(eval $(call BuildPackage,frps))
|
||||
FRP_COMPONENTS:=frpc frps
|
||||
|
||||
$(foreach component,$(FRP_COMPONENTS), \
|
||||
$(eval $(call frp/templates,$(component))) \
|
||||
$(eval $(call GoBinPackage,$(component))) \
|
||||
$(eval $(call BuildPackage,$(component))) \
|
||||
)
|
||||
|
@ -1,23 +0,0 @@
|
||||
config init
|
||||
option stdout 1
|
||||
option stderr 1
|
||||
option user frpc
|
||||
option group frpc
|
||||
option respawn 1
|
||||
# OS environments pass to frp for config file template, see
|
||||
# https://github.com/fatedier/frp#configuration-file-template
|
||||
# list env 'ENV_NAME=value'
|
||||
# Config files include in temporary config file.
|
||||
# list conf_inc '/etc/frp/frpc.d/frpc_full.ini'
|
||||
|
||||
config conf 'common'
|
||||
option server_addr 127.0.0.1
|
||||
option server_port 7000
|
||||
# List options with name="_" will be directly appended to config file
|
||||
# list _ '# Key-A=Value-A'
|
||||
|
||||
config conf 'ssh'
|
||||
option type tcp
|
||||
option local_ip 127.0.0.1
|
||||
option local_port 22
|
||||
option remote_port 6000
|
@ -1,80 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
NAME=frpc
|
||||
PROG=/usr/bin/$NAME
|
||||
|
||||
_err() {
|
||||
echo "$*" >&2
|
||||
logger -p daemon.err -t "$NAME" "$*"
|
||||
}
|
||||
|
||||
config_cb() {
|
||||
[ $# -eq 0 ] && return
|
||||
|
||||
local type="$1"
|
||||
local name="$2"
|
||||
if [ "$type" = "conf" ]; then
|
||||
echo "[$name]" >> "$conf_file"
|
||||
option_cb() {
|
||||
local option="$1"
|
||||
local value="$2"
|
||||
[ "$option" = "name" ] && \
|
||||
sed -i "s/$CONFIG_SECTION/$value/g" "$conf_file" || \
|
||||
echo "$option = $value" >> "$conf_file";
|
||||
}
|
||||
list_cb() {
|
||||
local name="$1"
|
||||
local value="$2"
|
||||
[ "$name" = "_" ] && echo "$value" >> "$conf_file"
|
||||
}
|
||||
else
|
||||
[ "$type" = "init" ] && init_cfg="$name"
|
||||
option_cb() { return 0; }
|
||||
list_cb() { return 0; }
|
||||
fi
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "$NAME"
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local init_cfg=" "
|
||||
local conf_file="/var/etc/$NAME.ini"
|
||||
|
||||
> "$conf_file"
|
||||
config_load "$NAME"
|
||||
|
||||
local stdout stderr user group respawn env conf_inc
|
||||
uci_validate_section "$NAME" init "$init_cfg" \
|
||||
'stdout:bool:1' \
|
||||
'stderr:bool:1' \
|
||||
'user:string' \
|
||||
'group:string' \
|
||||
'respawn:bool:1' \
|
||||
'env:list(string)' \
|
||||
'conf_inc:list(string)'
|
||||
|
||||
local err=$?
|
||||
[ $err -ne 0 ] && {
|
||||
_err "uci_validate_section returned $err"
|
||||
return 1
|
||||
}
|
||||
|
||||
[ -n "$conf_inc" ] && config_list_foreach "$init_cfg" conf_inc cat >> "$conf_file"
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" -c "$conf_file"
|
||||
procd_set_param file $conf_file
|
||||
procd_set_param stdout $stdout
|
||||
procd_set_param stderr $stderr
|
||||
[ -n "$user" ] && procd_set_param user "$user"
|
||||
[ -n "$group" ] && procd_set_param group "$group"
|
||||
[ $respawn -eq 1 ] && procd_set_param respawn
|
||||
[ -n "$env" ] && config_list_foreach "$init_cfg" env "procd_append_param env"
|
||||
procd_close_instance
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
upgrade() {
|
||||
local section=$1
|
||||
local name
|
||||
[ "$section" != "common" ] || return 0
|
||||
config_get name $section name
|
||||
if [ -z "$name" ]; then
|
||||
uci_set frpc "$section" name "$section"
|
||||
uci_commit frpc
|
||||
fi
|
||||
}
|
||||
|
||||
config_load frpc
|
||||
config_foreach upgrade conf
|
||||
|
||||
exit 0
|
@ -1,16 +0,0 @@
|
||||
config init
|
||||
option stdout 1
|
||||
option stderr 1
|
||||
option user frps
|
||||
option group frps
|
||||
option respawn 1
|
||||
# OS environments pass to frp for config file template, see
|
||||
# https://github.com/fatedier/frp#configuration-file-template
|
||||
# list env 'ENV_NAME=value'
|
||||
# Config files include in temporary config file.
|
||||
# list conf_inc '/etc/frp/frps.d/frps_full.ini'
|
||||
|
||||
config conf 'common'
|
||||
option bind_port 7000
|
||||
# List options with name="_" will be directly appended to config file
|
||||
# list _ '# Key-A=Value-A'
|
@ -1,78 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
USE_PROCD=1
|
||||
|
||||
NAME=frps
|
||||
PROG=/usr/bin/$NAME
|
||||
|
||||
_err() {
|
||||
echo "$*" >&2
|
||||
logger -p daemon.err -t "$NAME" "$*"
|
||||
}
|
||||
|
||||
config_cb() {
|
||||
[ $# -eq 0 ] && return
|
||||
|
||||
local type="$1"
|
||||
local name="$2"
|
||||
if [ "$type" = "conf" ]; then
|
||||
echo "[$name]" >> "$conf_file"
|
||||
option_cb() {
|
||||
local option="$1"
|
||||
local value="$2"
|
||||
echo "$option = $value" >> "$conf_file"
|
||||
}
|
||||
list_cb() {
|
||||
local name="$1"
|
||||
local value="$2"
|
||||
[ "$name" = "_" ] && echo "$value" >> "$conf_file"
|
||||
}
|
||||
else
|
||||
[ "$type" = "init" ] && init_cfg="$name"
|
||||
option_cb() { return 0; }
|
||||
list_cb() { return 0; }
|
||||
fi
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "$NAME"
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local init_cfg=" "
|
||||
local conf_file="/var/etc/$NAME.ini"
|
||||
|
||||
> "$conf_file"
|
||||
config_load "$NAME"
|
||||
|
||||
local stdout stderr user group respawn env conf_inc
|
||||
uci_validate_section "$NAME" init "$init_cfg" \
|
||||
'stdout:bool:1' \
|
||||
'stderr:bool:1' \
|
||||
'user:string' \
|
||||
'group:string' \
|
||||
'respawn:bool:1' \
|
||||
'env:list(string)' \
|
||||
'conf_inc:list(string)'
|
||||
|
||||
local err=$?
|
||||
[ $err -ne 0 ] && {
|
||||
_err "uci_validate_section returned $err"
|
||||
return 1
|
||||
}
|
||||
|
||||
[ -n "$conf_inc" ] && config_list_foreach "$init_cfg" conf_inc cat >> "$conf_file"
|
||||
|
||||
procd_open_instance
|
||||
procd_set_param command "$PROG" -c "$conf_file"
|
||||
procd_set_param file $conf_file
|
||||
procd_set_param stdout $stdout
|
||||
procd_set_param stderr $stderr
|
||||
[ -n "$user" ] && procd_set_param user "$user"
|
||||
[ -n "$group" ] && procd_set_param group "$group"
|
||||
[ $respawn -eq 1 ] && procd_set_param respawn
|
||||
[ -n "$env" ] && config_list_foreach "$init_cfg" env "procd_append_param env"
|
||||
procd_close_instance
|
||||
}
|
@ -1,3 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
$1 -v 2>&1 | grep -F "$PKG_VERSION"
|
117
gn/Makefile
117
gn/Makefile
@ -1,61 +1,58 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gn
|
||||
PKG_RELEASE:=10
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://gn.googlesource.com/gn.git
|
||||
PKG_SOURCE_DATE:=2023-04-05
|
||||
PKG_SOURCE_VERSION:=28b7b6c507eb808567e3aea446cd259f7691fddc
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
#
|
||||
# Copyright (C) 2022 ImmortalWrt.org
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gn
|
||||
PKG_RELEASE:=11
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://gn.googlesource.com/gn.git
|
||||
PKG_SOURCE_DATE:=2024-01-24
|
||||
PKG_SOURCE_VERSION:=a2e2717ea670249a34b0de4b3e54f268d320bdfa
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
PKG_LICENSE:=BSD 3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
ifneq ($(wildcard $(TOPDIR)/feeds/packages/devel/ninja/ninja.mk),)
|
||||
PKG_BUILD_DEPENDS+= ninja/host
|
||||
endif
|
||||
PKG_HOST_ONLY:=1
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/gn
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
TITLE:=A meta-build system that generates build files for Ninja
|
||||
URL:=https://gn.googlesource.com/gn/
|
||||
BUILDONLY:=1
|
||||
endef
|
||||
|
||||
define Package/gn/description
|
||||
GN can generate Ninja build files for C, C++, Rust, Objective C,
|
||||
and Swift source on most popular platforms.
|
||||
endef
|
||||
|
||||
define Host/Configure
|
||||
$(PYTHON) $(HOST_BUILD_DIR)/build/gen.py \
|
||||
--no-last-commit-position
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
ninja -C $(HOST_BUILD_DIR)/out
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/out/gn $(STAGING_DIR_HOSTPKG)/bin/
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
$(RM) $(STAGING_DIR_HOSTPKG)/bin/gn
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,gn))
|
||||
|
||||
PKG_LICENSE:=BSD 3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
|
||||
PKG_HOST_ONLY:=1
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/gn
|
||||
SECTION:=devel
|
||||
CATEGORY:=Development
|
||||
TITLE:=A meta-build system that generates build files for Ninja
|
||||
URL:=https://gn.googlesource.com/gn/
|
||||
BUILDONLY:=1
|
||||
endef
|
||||
|
||||
define Package/gn/description
|
||||
GN can generate Ninja build files for C, C++, Rust, Objective C,
|
||||
and Swift source on most popular platforms.
|
||||
endef
|
||||
|
||||
define Host/Configure
|
||||
$(PYTHON) $(HOST_BUILD_DIR)/build/gen.py \
|
||||
--no-last-commit-position
|
||||
endef
|
||||
|
||||
define Host/Compile
|
||||
+$(NINJA) -C $(HOST_BUILD_DIR)/out
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin/
|
||||
$(INSTALL_BIN) $(HOST_BUILD_DIR)/out/gn $(STAGING_DIR_HOSTPKG)/bin/
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
$(RM) $(STAGING_DIR_HOSTPKG)/bin/gn
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
$(eval $(call BuildPackage,gn))
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- a/build/gen.py
|
||||
+++ b/build/gen.py
|
||||
@@ -368,7 +368,7 @@ def WriteGNNinja(path, platform, host, o
|
||||
cxx = os.environ.get('CXX', 'g++')
|
||||
ld = os.environ.get('LD', 'g++')
|
||||
ar = os.environ.get('AR', 'ar -X64')
|
||||
- elif platform.is_msys() or platform.is_mingw():
|
||||
+ elif platform.is_msys() or platform.is_mingw() or platform.is_linux():
|
||||
cxx = os.environ.get('CXX', 'g++')
|
||||
ld = os.environ.get('LD', 'g++')
|
||||
ar = os.environ.get('AR', 'ar')
|
@ -1,9 +1,9 @@
|
||||
// Generated by build/gen.py.
|
||||
|
||||
#ifndef OUT_LAST_COMMIT_POSITION_H_
|
||||
#define OUT_LAST_COMMIT_POSITION_H_
|
||||
|
||||
#define LAST_COMMIT_POSITION_NUM 2085
|
||||
#define LAST_COMMIT_POSITION "2085 (28b7b6c507eb)"
|
||||
|
||||
#endif // OUT_LAST_COMMIT_POSITION_H_
|
||||
// Generated by build/gen.py.
|
||||
|
||||
#ifndef OUT_LAST_COMMIT_POSITION_H_
|
||||
#define OUT_LAST_COMMIT_POSITION_H_
|
||||
|
||||
#define LAST_COMMIT_POSITION_NUM 2143
|
||||
#define LAST_COMMIT_POSITION "2143 (a2e2717ea670)"
|
||||
|
||||
#endif // OUT_LAST_COMMIT_POSITION_H_
|
||||
|
Loading…
Reference in New Issue
Block a user