Merge Mainline
Fixes: #272 Signed-off-by: CN_SZTL <cnsztl@project-openwrt.eu.org>
This commit is contained in:
commit
29412d2c82
@ -36,6 +36,7 @@ boot() {
|
||||
ln -sf /tmp/resolv.conf.d/resolv.conf.auto /tmp/resolv.conf.auto
|
||||
grep -q debugfs /proc/filesystems && /bin/mount -o noatime -t debugfs debugfs /sys/kernel/debug
|
||||
grep -q bpf /proc/filesystems && /bin/mount -o nosuid,nodev,noexec,noatime,mode=0700 -t bpf bpffs /sys/fs/bpf
|
||||
grep -q pstore /proc/filesystems && /bin/mount -o noatime -t pstore pstore /sys/fs/pstore
|
||||
[ "$FAILSAFE" = "true" ] && touch /tmp/.failsafe
|
||||
|
||||
/sbin/kmodloader
|
||||
|
||||
@ -2,10 +2,10 @@ config AdGuardHome 'AdGuardHome'
|
||||
option enabled '0'
|
||||
option httpport '3000'
|
||||
option redirect 'none'
|
||||
option configpath '/etc/AdGuardHome.yaml'
|
||||
option workdir '/usr/bin/AdGuardHome'
|
||||
option configpath '/etc/AdGuardHome/AdGuardHome.yaml'
|
||||
option workdir '/etc/AdGuardHome'
|
||||
option logfile '/tmp/AdGuardHome.log'
|
||||
option verbose '0'
|
||||
option binpath '/usr/bin/AdGuardHome/AdGuardHome'
|
||||
option binpath '/usr/bin/AdGuardHome'
|
||||
option upxflag ''
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=nps
|
||||
PKG_VERSION:=0.26.9
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/ehang-io/nps/tar.gz/v$(PKG_VERSION)?
|
||||
@ -17,6 +17,7 @@ PKG_HASH:=7df414180ed4f0049dc08f0e3c625a6de4ebed34da591515f9514b3763dd578d
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
PKG_LICENSE_FILE:=LICENSE
|
||||
PKG_MAINTAINTER:=CN_SZTL <cnsztl@project-openwrt.eu.org>
|
||||
|
||||
PKG_CONFIG_DEPENDS := \
|
||||
CONFIG_NPC_COMPRESS_UPX \
|
||||
@ -71,24 +72,13 @@ define Package/nps/config
|
||||
default y
|
||||
endef
|
||||
|
||||
define Package/nps/install/template
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/bin/
|
||||
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/$(2) $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
define Package/npc/install
|
||||
$(call Package/nps/install/template,$(1),npc)
|
||||
define Build/Compile
|
||||
$(call GoPackage/Build/Compile)
|
||||
ifeq ($(CONFIG_NPC_COMPRESS_UPX),y)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(1)/usr/bin/*
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/npc
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/nps/install
|
||||
$(call Package/nps/install/template,$(1),nps)
|
||||
ifeq ($(CONFIG_NPS_COMPRESS_UPX),y)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(1)/usr/bin/*
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/nps
|
||||
endif
|
||||
endef
|
||||
|
||||
|
||||
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tinyfecVPN
|
||||
PKG_VERSION:=20180820.0
|
||||
PKG_RELEASE:=2
|
||||
PKG_VERSION:=20210116.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/wangyu-/tinyfecVPN/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=ab758480e3ae43e851d2285a4441dee9c0b524b1a279e38e701302aa61617a5d
|
||||
PKG_HASH:=4e7494dcee9398a51497689c319bea7184152780fc06a2e05b6f9c16a6a9ea6e
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_MAINTAINER:=Yu Wang
|
||||
|
||||
@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=strace
|
||||
PKG_VERSION:=5.9
|
||||
PKG_VERSION:=5.10
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=https://strace.io/files/$(PKG_VERSION)
|
||||
PKG_HASH:=39473eb8465546c3e940fb663cb381eba5613160c7302794699d194a4d5d66d9
|
||||
PKG_HASH:=fe3982ea4cd9aeb3b4ba35f6279f0b577a37175d3282be24b9a5537b56b8f01c
|
||||
|
||||
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
|
||||
PKG_LICENSE:=LGPL-2.1-or-later
|
||||
|
||||
@ -10,11 +10,11 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=vlmcsd
|
||||
PKG_VERSION:=svn1113
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/Wind4/vlmcsd/tar.gz/$(PKG_VERSION)?
|
||||
PKG_HASH:=9510cf4e48e809b09fea60f29e41d3a0fb0f58257644dc60929ad503e8a156af
|
||||
PKG_HASH:=62f55c48f5de1249c2348ab6b96dabbe7e38899230954b0c8774efb01d9c42cc
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
@ -24,8 +24,6 @@ PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
TAR_CMD:=$(HOST_TAR) -C $(PKG_BUILD_DIR) $(TAR_OPTIONS)
|
||||
|
||||
define Package/vlmcsd
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
@ -39,12 +37,10 @@ define Package/vlmcsd/description
|
||||
Solaris, Minix, Mac OS, iOS, Windows with or without Cygwin)
|
||||
endef
|
||||
|
||||
MAKE_PATH:=vlmcsd
|
||||
|
||||
define Package/vlmcsd/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
#$(INSTALL_BIN) $(PKG_BUILD_DIR)/vlmcsd/bin/vlmcs $(1)/usr/bin/vlmcs
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/vlmcsd/bin/vlmcsd $(1)/usr/bin/vlmcsd
|
||||
#$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vlmcs $(1)/usr/bin/vlmcs
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/vlmcsd $(1)/usr/bin/vlmcsd
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_BIN) ./files/vlmcsd.ini $(1)/etc/vlmcsd.ini
|
||||
|
||||
@ -9,13 +9,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=xray
|
||||
PKG_VERSION:=1.2.3
|
||||
PKG_VERSION:=1.2.4
|
||||
PKG_RELEASE:=1
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/Xray-core-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=xray-core-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/XTLS/xray-core/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=1deed281d2b976c0132b57194a09b62a1b978ec1b35d8329894b80f8d47befb7
|
||||
PKG_HASH:=25f6c9edec0ac1f98328943cd2bb760ac7b69107582f9d27e43559da39dc01ed
|
||||
|
||||
PKG_LICENSE:=MPL
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@ -66,11 +66,23 @@ function get_valid_nodes()
|
||||
if e.port and e.address then
|
||||
local address = e.address
|
||||
if datatypes.ipaddr(address) or datatypes.hostname(address) then
|
||||
local type2 = e.type
|
||||
local address2 = address
|
||||
if type2 == "Xray" and e.protocol then
|
||||
local protocol = e.protocol
|
||||
if protocol == "vmess" then
|
||||
protocol = "VMess"
|
||||
elseif protocol == "vless" then
|
||||
protocol = "VLESS"
|
||||
else
|
||||
protocol = protocol:gsub("^%l",string.upper)
|
||||
end
|
||||
type2 = type2 .. " " .. protocol
|
||||
end
|
||||
if datatypes.ip6addr(address) then address2 = "[" .. address .. "]" end
|
||||
e.remarks_name = "%s:[%s] %s:%s" % {e.type, e.remarks, address2, e.port}
|
||||
e.remarks_name = "%s:[%s] %s:%s" % {type2, e.remarks, address2, e.port}
|
||||
if e.use_kcp and e.use_kcp == "1" then
|
||||
e.remarks_name = "%s+%s:[%s] %s" % {e.type, "Kcptun", e.remarks, address2}
|
||||
e.remarks_name = "%s+%s:[%s] %s" % {type2, "Kcptun", e.remarks, address2}
|
||||
end
|
||||
e.node_type = "normal"
|
||||
nodes[#nodes + 1] = e
|
||||
@ -87,10 +99,22 @@ function get_full_node_remarks(n)
|
||||
if n.protocol and (n.protocol == "_balancing" or n.protocol == "_shunt") then
|
||||
remarks = "%s:[%s] " % {i18n.translatef(n.type .. n.protocol), n.remarks}
|
||||
else
|
||||
local type2 = n.type
|
||||
if n.type == "Xray" and n.protocol then
|
||||
local protocol = n.protocol
|
||||
if protocol == "vmess" then
|
||||
protocol = "VMess"
|
||||
elseif protocol == "vless" then
|
||||
protocol = "VLESS"
|
||||
else
|
||||
protocol = protocol:gsub("^%l",string.upper)
|
||||
end
|
||||
type2 = type2 .. " " .. protocol
|
||||
end
|
||||
if n.use_kcp and n.use_kcp == "1" then
|
||||
remarks = "%s+%s:[%s] %s" % {n.type, "Kcptun", n.remarks, n.address}
|
||||
remarks = "%s+%s:[%s] %s" % {type2, "Kcptun", n.remarks, n.address}
|
||||
else
|
||||
remarks = "%s:[%s] %s:%s" % {n.type, n.remarks, n.address, n.port}
|
||||
remarks = "%s:[%s] %s:%s" % {type2, n.remarks, n.address, n.port}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -114,6 +114,13 @@ if current_node and current_node ~= "" and current_node ~= "nil" then
|
||||
local r = api.get_full_node_remarks(uci:get_all(appname, n[id]))
|
||||
tcp_node.description = tcp_node.description .. remarks .. ":" .. string.format('<a href="%s">%s</a>', url, r) .. "<br />"
|
||||
end
|
||||
local id = "main_node"
|
||||
local remarks = translate("Default") .. translate("Preproxy")
|
||||
if n[id] and n[id] ~= "nil" then
|
||||
local url = api.url("node_config", n[id])
|
||||
local r = api.get_full_node_remarks(uci:get_all(appname, n[id]))
|
||||
tcp_node.description = tcp_node.description .. remarks .. ":" .. string.format('<a href="%s">%s</a>', url, r) .. "<br />"
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@ -65,10 +65,17 @@ if nodes_display:find("compact_display_nodes") then
|
||||
if type == "Xray" then
|
||||
local protocol = m:get(n, "protocol")
|
||||
if protocol == "_balancing" then
|
||||
type = type .. " 负载均衡"
|
||||
protocol = "负载均衡"
|
||||
elseif protocol == "_shunt" then
|
||||
type = type .. " 分流"
|
||||
protocol = "分流"
|
||||
elseif protocol == "vmess" then
|
||||
protocol = "VMess"
|
||||
elseif protocol == "vless" then
|
||||
protocol = "VLESS"
|
||||
else
|
||||
protocol = protocol:gsub("^%l",string.upper)
|
||||
end
|
||||
type = type .. " " .. protocol
|
||||
end
|
||||
local address = m:get(n, "address") or ""
|
||||
local port = m:get(n, "port") or ""
|
||||
@ -108,10 +115,17 @@ else
|
||||
if v == "Xray" then
|
||||
local protocol = m:get(n, "protocol")
|
||||
if protocol == "_balancing" then
|
||||
result = result .. " 负载均衡"
|
||||
protocol = "负载均衡"
|
||||
elseif protocol == "_shunt" then
|
||||
result = result .. " 分流"
|
||||
protocol = "分流"
|
||||
elseif protocol == "vmess" then
|
||||
protocol = "VMess"
|
||||
elseif protocol == "vless" then
|
||||
protocol = "VLESS"
|
||||
else
|
||||
protocol = protocol:gsub("^%l",string.upper)
|
||||
end
|
||||
result = result .. " " .. protocol
|
||||
end
|
||||
end
|
||||
return result
|
||||
|
||||
@ -48,15 +48,14 @@ function o.write(e, e)
|
||||
luci.http.redirect(api.url("log"))
|
||||
end
|
||||
|
||||
filter_enabled = s:option(Flag, "filter_enabled", translate("Filter keyword switch"), translate("When checked, below options can only be take effect."))
|
||||
o.default = 1
|
||||
o.rmempty = false
|
||||
o = s:option(ListValue, "filter_keyword_mode", translate("Filter keyword Mode"))
|
||||
o:value("0", translate("Close"))
|
||||
o:value("1", translate("Discard List"))
|
||||
o:value("2", translate("Keep List"))
|
||||
|
||||
filter_keyword = s:option(DynamicList, "filter_keyword", translate("Filter keyword"))
|
||||
|
||||
o = s:option(Flag, "filter_keyword_discarded", translate("Filter keyword discarded"), translate("When checked, the keywords in the list are discarded. Otherwise, it is not discarded."))
|
||||
o.default = "1"
|
||||
o.rmempty = false
|
||||
o = s:option(DynamicList, "filter_discard_list", translate("Discard List"))
|
||||
|
||||
o = s:option(DynamicList, "filter_keep_list", translate("Keep List"))
|
||||
|
||||
o = s:option(Flag, "allowInsecure", translate("allowInsecure"), translate("Whether unsafe connections are allowed. When checked, Certificate validation will be skipped."))
|
||||
o.default = "1"
|
||||
|
||||
@ -48,6 +48,13 @@ e.cfgvalue = function(t, n)
|
||||
if v then
|
||||
if v == "Xray" then
|
||||
local protocol = m:get(n, "protocol")
|
||||
if protocol == "vmess" then
|
||||
protocol = "VMess"
|
||||
elseif protocol == "vless" then
|
||||
protocol = "VLESS"
|
||||
else
|
||||
protocol = protocol:gsub("^%l",string.upper)
|
||||
end
|
||||
return v .. " -> " .. protocol
|
||||
end
|
||||
return v
|
||||
|
||||
@ -820,20 +820,14 @@ msgstr "手动订阅"
|
||||
msgid "Delete All Subscribe Node"
|
||||
msgstr "删除所有订阅节点"
|
||||
|
||||
msgid "Filter keyword switch"
|
||||
msgstr "过滤关键字开关"
|
||||
msgid "Filter keyword Mode"
|
||||
msgstr "过滤关键字模式"
|
||||
|
||||
msgid "When checked, below options can only be take effect."
|
||||
msgstr "当勾选时,下面的选项才生效。"
|
||||
msgid "Discard List"
|
||||
msgstr "丢弃列表"
|
||||
|
||||
msgid "Filter keyword"
|
||||
msgstr "过滤关键字"
|
||||
|
||||
msgid "Filter keyword discarded"
|
||||
msgstr "关键字丢弃"
|
||||
|
||||
msgid "When checked, the keywords in the list are discarded. Otherwise, it is not discarded."
|
||||
msgstr "当勾选时,将丢弃包含列表里的关键字的节点。否则,将保留列表的关键字的节点(反过来)。"
|
||||
msgid "Keep List"
|
||||
msgstr "保留列表"
|
||||
|
||||
msgid "Add"
|
||||
msgstr "添加"
|
||||
|
||||
@ -58,13 +58,12 @@ config global_app
|
||||
config global_subscribe
|
||||
option subscribe_proxy '0'
|
||||
option auto_update_subscribe '0'
|
||||
option filter_enabled '1'
|
||||
option filter_keyword_discarded '1'
|
||||
option allowInsecure '1'
|
||||
list filter_keyword '过期时间'
|
||||
list filter_keyword '剩余流量'
|
||||
list filter_keyword 'QQ群'
|
||||
list filter_keyword '官网'
|
||||
option filter_keyword_mode '1'
|
||||
list filter_discard_list '过期时间'
|
||||
list filter_discard_list '剩余流量'
|
||||
list filter_discard_list 'QQ群'
|
||||
list filter_discard_list '官网'
|
||||
|
||||
config auto_switch
|
||||
option testing_time '1'
|
||||
|
||||
@ -9,6 +9,7 @@ require 'luci.util'
|
||||
require 'luci.jsonc'
|
||||
require 'luci.sys'
|
||||
local api = require "luci.model.cbi.passwall.api.api"
|
||||
local has_xray = api.is_finded("xray")
|
||||
|
||||
-- these global functions are accessed all the time by the event handler
|
||||
-- so caching them is worth the effort
|
||||
@ -211,28 +212,24 @@ do
|
||||
end
|
||||
|
||||
-- 判断是否过滤节点关键字
|
||||
local filter_keyword_enabled = ucic2:get(application, "@global_subscribe[0]", "filter_enabled")
|
||||
local filter_keyword_table = ucic2:get(application, "@global_subscribe[0]", "filter_keyword")
|
||||
local filter_keyword_discarded = ucic2:get(application, "@global_subscribe[0]", "filter_keyword_discarded")
|
||||
local filter_keyword_mode = ucic2:get(application, "@global_subscribe[0]", "filter_keyword_mode") or "0"
|
||||
local filter_keyword_discard_list = ucic2:get(application, "@global_subscribe[0]", "filter_discard_list") or {}
|
||||
local filter_keyword_keep_list = ucic2:get(application, "@global_subscribe[0]", "filter_keep_list") or {}
|
||||
local function is_filter_keyword(value)
|
||||
if filter_keyword_enabled and filter_keyword_enabled == "1" then
|
||||
if filter_keyword_table then
|
||||
if filter_keyword_discarded and filter_keyword_discarded == "1" then
|
||||
for k,v in ipairs(filter_keyword_table) do
|
||||
if value:find(v) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
else
|
||||
local result = true
|
||||
for k,v in ipairs(filter_keyword_table) do
|
||||
if value:find(v) then
|
||||
result = false
|
||||
end
|
||||
end
|
||||
return result
|
||||
if filter_keyword_mode == "1" then
|
||||
for k,v in ipairs(filter_keyword_discard_list) do
|
||||
if value:find(v) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
elseif filter_keyword_mode == "2" then
|
||||
local result = true
|
||||
for k,v in ipairs(filter_keyword_keep_list) do
|
||||
if value:find(v) then
|
||||
result = false
|
||||
end
|
||||
end
|
||||
return result
|
||||
end
|
||||
return false
|
||||
end
|
||||
@ -436,6 +433,10 @@ local function processData(szType, content, add_mode)
|
||||
content = content:sub(0, idx_sp - 1)
|
||||
end
|
||||
result.type = "Trojan-Plus"
|
||||
if has_xray then
|
||||
result.type = 'Xray'
|
||||
result.protocol = 'trojan'
|
||||
end
|
||||
result.remarks = UrlDecode(alias)
|
||||
if content:find("@") then
|
||||
local Info = split(content, "@")
|
||||
|
||||
@ -1,86 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2015-2016 OpenWrt.org
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE.txt for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=AdGuardHome
|
||||
PKG_VERSION:=0.104.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||
PKG_SOURCE_URL:=https://github.com/AdguardTeam/AdGuardHome
|
||||
PKG_MIRROR_HASH:=ec0d48413778267f4ac81091e58a88e5b5ee2f3c1ab48256ded3438bf171d311
|
||||
|
||||
PKG_LICENSE:=GPL-3.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE.txt
|
||||
PKG_MAINTAINER:=Dobroslaw Kijowski <dobo90@gmail.com>
|
||||
|
||||
PKG_BUILD_DEPENDS:=golang/host node/host
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_USE_MIPS16:=0
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_ADGUARDHOME_COMPRESS_GOPROXY \
|
||||
CONFIG_ADGUARDHOME_COMPRESS_UPX
|
||||
|
||||
GO_PKG:=github.com/AdguardTeam/AdGuardHome
|
||||
GO_PKG_EXCLUDES:=internal/dhcpd/standalone
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
GO_PKG_LDFLAGS_X:=main.version=$(PKG_VERSION) main.channel=release
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
||||
define Package/AdGuardHome
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Network-wide ads and trackers blocking DNS server
|
||||
URL:=https://github.com/AdguardTeam/AdGuardHome
|
||||
DEPENDS:=$(GO_ARCH_DEPENDS) +ca-bundle
|
||||
endef
|
||||
|
||||
define Package/AdGuardHome/description
|
||||
Free and open source, powerful network-wide ads and trackers blocking DNS server.
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
config ADGUARDHOME_COMPRESS_GOPROXY
|
||||
bool "Compiling with GOPROXY proxy"
|
||||
default n
|
||||
|
||||
config ADGUARDHOME_COMPRESS_UPX
|
||||
bool "Compress executable files with UPX"
|
||||
default n
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_ADGUARDHOME_COMPRESS_GOPROXY),y)
|
||||
export GO111MODULE=on
|
||||
export GOPROXY=https://goproxy.io
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
( \
|
||||
cd $(PKG_BUILD_DIR) ; \
|
||||
npm --prefix client ci ; \
|
||||
npm --prefix client run build-prod ; \
|
||||
GOOS=$$$$(go env GOOS) GOARCH=$$$$(go env GOARCH) GO111MODULE=off go get -v github.com/gobuffalo/packr/... ; \
|
||||
"$$$$(go env GOPATH)/bin/packr" -v -z -i $(PKG_BUILD_DIR)/internal/home ; \
|
||||
$(call GoPackage/Build/Compile) ; \
|
||||
)
|
||||
ifeq ($(CONFIG_ADGUARDHOME_COMPRESS_UPX),y)
|
||||
$(STAGING_DIR_HOST)/bin/upx --lzma --best $(GO_PKG_BUILD_BIN_DIR)/AdGuardHome
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/AdGuardHome/install
|
||||
$(call GoPackage/Package/Install/Bin,$(PKG_INSTALL_DIR))
|
||||
$(INSTALL_DIR) $(1)/usr/bin/AdGuardHome
|
||||
$(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/AdGuardHome $(1)/usr/bin/AdGuardHome/AdGuardHome
|
||||
endef
|
||||
|
||||
$(eval $(call GoBinPackage,AdGuardHome))
|
||||
$(eval $(call BuildPackage,AdGuardHome))
|
||||
@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ca-certificates
|
||||
PKG_VERSION:=20200601
|
||||
PKG_VERSION:=20210119
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=http://ftp.debian.org/debian/pool/main/c/ca-certificates
|
||||
PKG_HASH:=43766d5a436519503dfd65ab83488ae33ab4d4ca3d0993797b58c92eb9ed4e63
|
||||
PKG_HASH:=daa3afae563711c30a0586ddae4336e8e3974c2b627faaca404c4e0141b64665
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
4
rules.mk
4
rules.mk
@ -433,8 +433,8 @@ $(shell \
|
||||
)
|
||||
endef
|
||||
|
||||
COMMITCOUNT = $(if $(DUMP),,$(call commitcount))
|
||||
AUTORELEASE = $(if $(DUMP),,$(call commitcount,1))
|
||||
COMMITCOUNT = $(if $(DUMP),0,$(call commitcount))
|
||||
AUTORELEASE = $(if $(DUMP),0,$(call commitcount,1))
|
||||
|
||||
all:
|
||||
FORCE: ;
|
||||
|
||||
@ -12,8 +12,8 @@ PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=d3cb8f6222a3cb955712b720d7c0c0dba37898f9
|
||||
PKG_MIRROR_HASH:=c3e97ad622eafaf539b733a18c0d62e9fb4c0f18d190b7bcc0e93611e582fb1e
|
||||
PKG_SOURCE_VERSION:=760e1d287825fa91d4d5a0cc921340c740d803e2
|
||||
PKG_MIRROR_HASH:=3ea50e679a241faec8d0e90c9db84a19a42e03dd08328aee406a9ec56393104d
|
||||
PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
|
||||
@ -76,6 +76,7 @@ $(curdir)/squashfs/compile := $(curdir)/lzma-old/compile
|
||||
$(curdir)/squashfskit4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile
|
||||
$(curdir)/upx/compile := $(curdir)/ucl/compile
|
||||
$(curdir)/zlib/compile := $(curdir)/cmake/compile
|
||||
$(curdir)/zstd/compile := $(curdir)/cmake/compile
|
||||
|
||||
ifneq ($(HOST_OS),Linux)
|
||||
$(curdir)/squashfskit4/compile += $(curdir)/coreutils/compile
|
||||
@ -85,7 +86,7 @@ endif
|
||||
ifneq ($(CONFIG_CCACHE)$(CONFIG_SDK),)
|
||||
$(foreach tool, $(filter-out xz zstd patch pkgconf libressl cmake,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/ccache/compile))
|
||||
tools-y += ccache
|
||||
$(curdir)/ccache/compile := $(curdir)/cmake/compile $(curdir)/zstd/compile
|
||||
$(curdir)/ccache/compile := $(curdir)/zstd/compile
|
||||
endif
|
||||
|
||||
# in case there is no patch tool on the host we need to make patch tool a
|
||||
|
||||
@ -1,22 +1,26 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zstd
|
||||
PKG_VERSION:=1.4.4
|
||||
PKG_VERSION:=1.4.8
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL_FILE:=v$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/facebook/zstd/archive/
|
||||
PKG_HASH:=a364f5162c7d1a455cc915e8e3cf5f4bd8b75d09bc0f53965b0c9ca1383c52c8
|
||||
PKG_SOURCE_URL:=https://github.com/facebook/zstd/releases/download/v$(PKG_VERSION)
|
||||
PKG_HASH:=32478297ca1500211008d596276f5367c54198495cf677e9439f4791a4c69f24
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_CPE_ID:=cpe:/a:facebook:zstandard
|
||||
|
||||
CMAKE_SOURCE_SUBDIR:=build/cmake
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
HOSTCC := $(HOSTCC_NOCACHE)
|
||||
HOST_MAKE_FLAGS = PREFIX=$(HOST_BUILD_PREFIX) HAVE_ZLIB=0 HAVE_LZMA=0 HAVE_LZ4=0
|
||||
CMAKE_HOST_OPTIONS += \
|
||||
-DBUILD_TESTING=OFF \
|
||||
-DCMAKE_C_COMPILER_LAUNCHER="" \
|
||||
-DCMAKE_C_COMPILER=$(HOSTCC_NOCACHE) \
|
||||
-DZSTD_LEGACY_SUPPORT=OFF
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
||||
@ -1,61 +0,0 @@
|
||||
From 06a57cf57e3c4e887cadcf688e3081154f3f6db4 Mon Sep 17 00:00:00 2001
|
||||
Message-Id: <06a57cf57e3c4e887cadcf688e3081154f3f6db4.1589392463.git.mschiffer@universe-factory.net>
|
||||
From: Bimba Shrestha <bimbashrestha@fb.com>
|
||||
Date: Thu, 6 Feb 2020 14:10:51 -0800
|
||||
Subject: [PATCH] [build-issue] More portable header prefix usage (#) (#1987)
|
||||
|
||||
* make 4.3 build issue fix
|
||||
|
||||
* Changing header name and adding comment
|
||||
---
|
||||
programs/Makefile | 11 +++++++----
|
||||
1 file changed, 7 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/programs/Makefile b/programs/Makefile
|
||||
index b75314a83f43..a9ee3cb5311b 100644
|
||||
--- a/programs/Makefile
|
||||
+++ b/programs/Makefile
|
||||
@@ -94,9 +94,12 @@ endif
|
||||
|
||||
VOID = /dev/null
|
||||
|
||||
+# Make 4.3 doesn't support '\#' anymore (https://lwn.net/Articles/810071/)
|
||||
+NUM_SYMBOL := \#
|
||||
+
|
||||
# thread detection
|
||||
NO_THREAD_MSG := ==> no threads, building without multithreading support
|
||||
-HAVE_PTHREAD := $(shell printf '\#include <pthread.h>\nint main(void) { return 0; }' > have_pthread.c && $(CC) $(FLAGS) -o have_pthread$(EXT) have_pthread.c -pthread 2> $(VOID) && rm have_pthread$(EXT) && echo 1 || echo 0; rm have_pthread.c)
|
||||
+HAVE_PTHREAD := $(shell printf '$(NUM_SYMBOL)include <pthread.h>\nint main(void) { return 0; }' > have_pthread.c && $(CC) $(FLAGS) -o have_pthread$(EXT) have_pthread.c -pthread 2> $(VOID) && rm have_pthread$(EXT) && echo 1 || echo 0; rm have_pthread.c)
|
||||
HAVE_THREAD := $(shell [ "$(HAVE_PTHREAD)" -eq "1" -o -n "$(filter Windows%,$(OS))" ] && echo 1 || echo 0)
|
||||
ifeq ($(HAVE_THREAD), 1)
|
||||
THREAD_MSG := ==> building with threading support
|
||||
@@ -108,7 +111,7 @@ endif
|
||||
|
||||
# zlib detection
|
||||
NO_ZLIB_MSG := ==> no zlib, building zstd without .gz support
|
||||
-HAVE_ZLIB := $(shell printf '\#include <zlib.h>\nint main(void) { return 0; }' > have_zlib.c && $(CC) $(FLAGS) -o have_zlib$(EXT) have_zlib.c -lz 2> $(VOID) && rm have_zlib$(EXT) && echo 1 || echo 0; rm have_zlib.c)
|
||||
+HAVE_ZLIB := $(shell printf '$(NUM_SYMBOL)include <zlib.h>\nint main(void) { return 0; }' > have_zlib.c && $(CC) $(FLAGS) -o have_zlib$(EXT) have_zlib.c -lz 2> $(VOID) && rm have_zlib$(EXT) && echo 1 || echo 0; rm have_zlib.c)
|
||||
ifeq ($(HAVE_ZLIB), 1)
|
||||
ZLIB_MSG := ==> building zstd with .gz compression support
|
||||
ZLIBCPP = -DZSTD_GZCOMPRESS -DZSTD_GZDECOMPRESS
|
||||
@@ -119,7 +122,7 @@ endif
|
||||
|
||||
# lzma detection
|
||||
NO_LZMA_MSG := ==> no liblzma, building zstd without .xz/.lzma support
|
||||
-HAVE_LZMA := $(shell printf '\#include <lzma.h>\nint main(void) { return 0; }' > have_lzma.c && $(CC) $(FLAGS) -o have_lzma$(EXT) have_lzma.c -llzma 2> $(VOID) && rm have_lzma$(EXT) && echo 1 || echo 0; rm have_lzma.c)
|
||||
+HAVE_LZMA := $(shell printf '$(NUM_SYMBOL)include <lzma.h>\nint main(void) { return 0; }' > have_lzma.c && $(CC) $(FLAGS) -o have_lzma$(EXT) have_lzma.c -llzma 2> $(VOID) && rm have_lzma$(EXT) && echo 1 || echo 0; rm have_lzma.c)
|
||||
ifeq ($(HAVE_LZMA), 1)
|
||||
LZMA_MSG := ==> building zstd with .xz/.lzma compression support
|
||||
LZMACPP = -DZSTD_LZMACOMPRESS -DZSTD_LZMADECOMPRESS
|
||||
@@ -130,7 +133,7 @@ endif
|
||||
|
||||
# lz4 detection
|
||||
NO_LZ4_MSG := ==> no liblz4, building zstd without .lz4 support
|
||||
-HAVE_LZ4 := $(shell printf '\#include <lz4frame.h>\n\#include <lz4.h>\nint main(void) { return 0; }' > have_lz4.c && $(CC) $(FLAGS) -o have_lz4$(EXT) have_lz4.c -llz4 2> $(VOID) && rm have_lz4$(EXT) && echo 1 || echo 0; rm have_lz4.c)
|
||||
+HAVE_LZ4 := $(shell printf '$(NUM_SYMBOL)include <lz4frame.h>\n\#include <lz4.h>\nint main(void) { return 0; }' > have_lz4.c && $(CC) $(FLAGS) -o have_lz4$(EXT) have_lz4.c -llz4 2> $(VOID) && rm have_lz4$(EXT) && echo 1 || echo 0; rm have_lz4.c)
|
||||
ifeq ($(HAVE_LZ4), 1)
|
||||
LZ4_MSG := ==> building zstd with .lz4 compression support
|
||||
LZ4CPP = -DZSTD_LZ4COMPRESS -DZSTD_LZ4DECOMPRESS
|
||||
--
|
||||
2.26.2
|
||||
|
||||
Loading…
Reference in New Issue
Block a user