small/shadowsocks-rust/Makefile

54 lines
1.5 KiB
Makefile
Raw Normal View History

2023-09-23 21:15:07 +08:00
# SPDX-License-Identifier: GPL-2.0-only
#
# Copyright (C) 2017-2020 Yousong Zhou <yszhou4tech@gmail.com>
2023-09-24 23:39:04 +08:00
# Copyright (C) 2021-2023 ImmortalWrt.org
2023-09-23 21:15:07 +08:00
include $(TOPDIR)/rules.mk
PKG_NAME:=shadowsocks-rust
2023-09-23 22:23:13 +08:00
PKG_VERSION:=1.16.2
2023-09-23 21:15:07 +08:00
PKG_RELEASE:=1
2023-09-24 23:39:04 +08:00
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/shadowsocks/shadowsocks-rust/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=04fb797d8d04b8af9c4746ab9c1d659a3575a677892c2d5d9194a4b0e210e2ab
2023-09-23 21:15:07 +08:00
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
2023-09-24 23:39:04 +08:00
PKG_BUILD_DEPENDS:=rust/host
RUST_PKG_FEATURES:=local-redir
2023-09-23 21:15:07 +08:00
2023-09-24 23:39:04 +08:00
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/packages/lang/rust/rust-package.mk
2023-09-23 21:15:07 +08:00
define Package/shadowsocks-rust/Default
define Package/shadowsocks-rust-$(1)
SECTION:=net
CATEGORY:=Network
SUBMENU:=Web Servers/Proxies
TITLE:=shadowsocks-rust $(1)
URL:=https://github.com/shadowsocks/shadowsocks-rust
2023-09-24 23:39:04 +08:00
DEPENDS:=$$(RUST_ARCH_DEPENDS)
2023-09-23 21:15:07 +08:00
endef
define Package/shadowsocks-rust-$(1)/install
$$(INSTALL_DIR) $$(1)/usr/bin
2023-09-24 23:39:04 +08:00
$$(INSTALL_BIN) $$(PKG_INSTALL_DIR)/bin/$(1) $$(1)/usr/bin/
2023-09-23 21:15:07 +08:00
endef
endef
SHADOWSOCKS_COMPONENTS:=sslocal ssmanager ssserver ssurl ssservice
define shadowsocks-rust/templates
$(foreach component,$(SHADOWSOCKS_COMPONENTS),
$(call Package/shadowsocks-rust/Default,$(component))
)
endef
$(eval $(call shadowsocks-rust/templates))
$(foreach component,$(SHADOWSOCKS_COMPONENTS), \
$(eval $(call BuildPackage,shadowsocks-rust-$(component))) \
)