forked from AlexZhuo/openwrt-shadowsocksr
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
78 lines (60 loc) · 2.15 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
include $(TOPDIR)/rules.mk
PKG_NAME:=shadowsocksr
PKG_VERSION:=20181121
PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.gz
PKG_SOURCE_URL:=https://github.com/shadowsocksrr/shadowsocksr-libev.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=ed6c9eb12530a7ecbdf3f5801fe59b177fe74779
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_MAINTAINER:=breakwa11
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
PKG_INSTALL:=1
PKG_FIXUP:=autoreconf
PKG_USE_MIPS16:=0
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
define Package/shadowsocksr/Default
SECTION:=net
CATEGORY:=Network
TITLE:=Lightweight Secured Socks5 Proxy for koolss
URL:=https://github.com/shadowsocksr/shadowsocksr-libev
endef
define Package/shadowsocksr
$(call Package/shadowsocksr/Default)
TITLE+= (OpenSSL)
VARIANT:=openssl
DEPENDS:=+libopenssl +libpcre +libpthread +zlib +libsodium
endef
define Package/shadowsocksr-server
$(call Package/shadowsocksr/Default)
TITLE+= (OpenSSL)
VARIANT:=openssl
DEPENDS:=+libopenssl +libpthread +libpcre +zlib +libsodium
endef
define Package/shadowsocksr/description
ShadowsocksR-libev is a lightweight secured socks5 proxy for embedded devices and low end boxes.
endef
Package/shadowsocksr-server/description=$(Package/shadowsocksr/description)
CONFIGURE_ARGS += --disable-ssp --disable-documentation --disable-assert
ifeq ($(BUILD_VARIANT),openssl)
CONFIGURE_ARGS += --with-crypto-library=openssl
endif
ifeq ($(BUILD_VARIANT),polarssl)
CONFIGURE_ARGS += --with-crypto-library=polarssl
endif
ifeq ($(BUILD_VARIANT),mbedtls)
CONFIGURE_ARGS += --with-crypto-library=mbedtls
endif
define Package/shadowsocksr/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-local $(1)/usr/bin/ssr-local
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-redir $(1)/usr/bin/ssr-redir
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-local $(1)/usr/bin/ssr-tunnel
endef
define Package/shadowsocksr-server/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-server $(1)/usr/bin/ssr-server
endef
$(eval $(call BuildPackage,shadowsocksr))
$(eval $(call BuildPackage,shadowsocksr-server))