mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-10-29 18:55:13 +08:00
update 2026-05-27 23:25:57
This commit is contained in:
1 parent
84f707b52b
commit
d0159b49a5
759 files changed
+362365
No files matched your search
@@ -0,0 +1,84 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=shadowsocksr-libev
|
||||
PKG_VERSION:=2.5.10
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/kenzok8/shadowsocksr-libev/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=7699d420bea841f6314a7b9d5c5fa996e02139812c79d39bbc4f786c65c4fffc
|
||||
|
||||
PKG_LICENSE:=GPL-3.0
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_USE_MIPS16:=0
|
||||
PKG_BUILD_FLAGS:=no-mips16
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_FIXUP:=autoreconf
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/shadowsocksr-libev/Default
|
||||
define Package/shadowsocksr-libev-ssr-$(1)
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
SUBMENU:=Web Servers/Proxies
|
||||
TITLE:=shadowsocksr-libev ssr-$(1)
|
||||
URL:=https://github.com/kenzok8/shadowsocksr-libev
|
||||
DEPENDS:=+libev +libsodium +libopenssl +libpthread +libpcre2 +libudns +zlib +libopenssl-legacy
|
||||
endef
|
||||
|
||||
define Package/shadowsocksr-libev-ssr-$(1)/install
|
||||
$$(INSTALL_DIR) $$(1)/usr/bin
|
||||
$$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/usr/bin/ss-$(1) $$(1)/usr/bin/ssr-$(1)
|
||||
endef
|
||||
endef
|
||||
|
||||
SHADOWSOCKSR_COMPONENTS:=check local nat redir server
|
||||
define shadowsocksr-libev/templates
|
||||
$(foreach component,$(SHADOWSOCKSR_COMPONENTS),
|
||||
$(call Package/shadowsocksr-libev/Default,$(component))
|
||||
)
|
||||
endef
|
||||
$(eval $(call shadowsocksr-libev/templates))
|
||||
|
||||
define Build/Prepare
|
||||
$(call Build/Prepare/Default)
|
||||
# Patch configure: use pcre2 instead of pcre1 (OpenWrt 24.10 only provides pcre2)
|
||||
sed -i \
|
||||
-e 's/pcre-config/pcre2-config/g' \
|
||||
-e 's/PCRE_CONFIG --libs/PCRE_CONFIG --libs8/g' \
|
||||
-e 's/pcre_exec/pcre2_match_8/g' \
|
||||
-e '/for ac_lib in/{s/ pcre;/ pcre2-8;/}' \
|
||||
-e 's/pcre\.h/pcre2.h/g' \
|
||||
-e 's/pcre\/pcre\.h/pcre2\/pcre2.h/g' \
|
||||
$(PKG_BUILD_DIR)/configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(call Build/Compile/Default)
|
||||
$(TARGET_CC) $(TARGET_CFLAGS) -o $(PKG_BUILD_DIR)/ss-check $(CURDIR)/src/server/check.c
|
||||
endef
|
||||
|
||||
define Build/Install
|
||||
$(call Build/Install/Default)
|
||||
$(INSTALL_DIR) $(PKG_INSTALL_DIR)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ss-check $(PKG_INSTALL_DIR)/usr/bin/ss-check
|
||||
endef
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--disable-documentation \
|
||||
--disable-ssp \
|
||||
--disable-assert \
|
||||
--enable-system-shared-lib \
|
||||
--with-pcre=$(STAGING_DIR)/usr
|
||||
|
||||
TARGET_CFLAGS += -flto
|
||||
TARGET_CFLAGS += -Wno-error=use-after-free
|
||||
TARGET_CPPFLAGS += -DPCRE2_CODE_UNIT_WIDTH=8
|
||||
TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed
|
||||
|
||||
$(foreach component,$(SHADOWSOCKSR_COMPONENTS), \
|
||||
$(eval $(call BuildPackage,shadowsocksr-libev-ssr-$(component))) \
|
||||
)
|
||||
Reference in new issue
Block a user