mirror of
https://github.com/kiddin9/op-packages.git
synced 2026-10-26 23:42:51 +08:00
105 lines
3.0 KiB
Makefile
105 lines
3.0 KiB
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=honk
|
|
PKG_VERSION:=2026.10.8_pre1
|
|
PKG_RELEASE:=13
|
|
|
|
# Raw upstream release tag. It keeps the dots in qualifiers (e.g. v0.0.1.beta.49)
|
|
# because that is what the GitHub release asset name uses.
|
|
HONK_RELEASE_TAG:=debug.2026.10.8.native-api.1
|
|
HONK_ASSET_TAG:=debug
|
|
|
|
# SHA256 of each release tarball, kept in sync by scripts/update_honk_version.sh.
|
|
HONK_HASH_X86_64:=edf2ff65507e89bc32d3fe643c3efa89ac35537931e80f9bce882488a3f289f4
|
|
HONK_HASH_AARCH64:=11e6552df24fe9437903cdc00ac54334edf73f3aebce9c3f3e923ec1b690d4cb
|
|
|
|
PKG_LICENSE:=AGPL-3.0-only
|
|
PKG_LICENSE_FILE:=LICENSE
|
|
PKG_MAINTAINER:=luci-app-honk maintainers
|
|
|
|
ifeq ($(ARCH),x86_64)
|
|
HONK_TARGET:=x86_64-unknown-linux-musl
|
|
HONK_HASH:=$(HONK_HASH_X86_64)
|
|
else ifeq ($(ARCH),aarch64)
|
|
HONK_TARGET:=aarch64-unknown-linux-musl
|
|
HONK_HASH:=$(HONK_HASH_AARCH64)
|
|
endif
|
|
|
|
# Default to the stock-malloc build: lower RSS high-water on small gateways.
|
|
# Use an empty suffix to switch back to the mimalloc build (faster QUIC).
|
|
HONK_SUFFIX:=-stock
|
|
HONK_ASSET:=honk-core-$(HONK_ASSET_TAG)-$(HONK_TARGET)$(HONK_SUFFIX).tar.gz
|
|
|
|
PKG_SOURCE:=$(HONK_ASSET)
|
|
PKG_SOURCE_URL:=https://github.com/Glassyiris/honk/releases/download/$(HONK_RELEASE_TAG)/
|
|
PKG_HASH:=skip
|
|
|
|
include $(INCLUDE_DIR)/package.mk
|
|
|
|
define Package/honk
|
|
SECTION:=net
|
|
CATEGORY:=Network
|
|
SUBMENU:=Web Servers/Proxies
|
|
TITLE:=honk - eBPF transparent proxy engine (dae-compatible)
|
|
URL:=https://github.com/Glassyiris/honk
|
|
DEPENDS:=@(x86_64||aarch64) \
|
|
+ca-bundle +ip-full \
|
|
+kmod-sched-core +kmod-sched-bpf +kmod-veth +kmod-nft-queue \
|
|
+v2ray-geoip +v2ray-geosite \
|
|
+@KERNEL_XDP_SOCKETS \
|
|
+HONK_USE_VMLINUX_BTF:vmlinux-btf
|
|
endef
|
|
|
|
define Package/honk/config
|
|
choice
|
|
prompt "BTF source for CO-RE"
|
|
default HONK_USE_KERNEL_BTF
|
|
depends on PACKAGE_honk
|
|
|
|
config HONK_USE_KERNEL_BTF
|
|
bool "Use kernel BTF (integrated)"
|
|
depends on KERNEL_DEBUG_INFO_BTF
|
|
|
|
config HONK_USE_VMLINUX_BTF
|
|
bool "Use vmlinux-btf package"
|
|
endchoice
|
|
endef
|
|
|
|
define Package/honk/conffiles
|
|
/etc/honk/config.dae
|
|
/etc/honk/config.d/
|
|
/etc/honk/state/
|
|
/etc/config/honk
|
|
endef
|
|
|
|
define Build/Prepare
|
|
mkdir -p $(PKG_BUILD_DIR)
|
|
$(TAR) -xzf $(DL_DIR)/$(PKG_SOURCE) -C $(PKG_BUILD_DIR) --strip-components=1
|
|
endef
|
|
|
|
define Build/Compile
|
|
true
|
|
endef
|
|
|
|
define Package/honk/install
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/honk-core $(1)/usr/bin/honk-core
|
|
|
|
$(INSTALL_DIR) $(1)/etc/honk/config.d
|
|
$(INSTALL_CONF) $(CURDIR)/files/config.dae $(1)/etc/honk/config.dae
|
|
$(INSTALL_CONF) $(CURDIR)/files/config.d/node.dae $(1)/etc/honk/config.d/node.dae
|
|
$(INSTALL_CONF) $(CURDIR)/files/config.d/route.dae $(1)/etc/honk/config.d/route.dae
|
|
$(INSTALL_CONF) $(CURDIR)/files/config.d/dns.dae $(1)/etc/honk/config.d/dns.dae
|
|
$(INSTALL_CONF) $(CURDIR)/files/config.d/api.dae $(1)/etc/honk/config.d/api.dae
|
|
|
|
$(INSTALL_DIR) $(1)/etc/config
|
|
$(INSTALL_CONF) $(CURDIR)/files/honk.config $(1)/etc/config/honk
|
|
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
$(INSTALL_BIN) $(CURDIR)/files/honk.init $(1)/etc/init.d/honk
|
|
endef
|
|
|
|
$(eval $(call BuildPackage,honk))
|