You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

80 lines
2.3 KiB

9 years ago
10 years ago
10 years ago
11 years ago
10 years ago
11 years ago
  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=shadowsocks-libev
  3. PKG_VERSION:=2.4.1
  4. PKG_RELEASE=$(PKG_SOURCE_VERSION)
  5. PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/archive
  6. PKG_SOURCE:=v$(PKG_VERSION).tar.gz
  7. PKG_MAINTAINER:=Max Lv <max.c.lv@gmail.com>
  8. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
  9. PKG_INSTALL:=1
  10. PKG_FIXUP:=autoreconf
  11. PKG_USE_MIPS16:=0
  12. PKG_BUILD_PARALLEL:=1
  13. include $(INCLUDE_DIR)/package.mk
  14. define Package/shadowsocks-libev/Default
  15. SECTION:=net
  16. CATEGORY:=Network
  17. TITLE:=Lightweight Secured Socks5 Proxy
  18. URL:=https://github.com/madeye/shadowsocks-libev
  19. endef
  20. define Package/shadowsocks-libev
  21. $(call Package/shadowsocks-libev/Default)
  22. TITLE+= (OpenSSL)
  23. VARIANT:=openssl
  24. DEPENDS:=+libopenssl +libpthread
  25. endef
  26. define Package/shadowsocks-libev-polarssl
  27. $(call Package/shadowsocks-libev/Default)
  28. TITLE+= (PolarSSL)
  29. VARIANT:=polarssl
  30. DEPENDS:=+libpolarssl +libpthread
  31. endef
  32. define Package/shadowsocks-libev-mbedtls
  33. $(call Package/shadowsocks-libev/Default)
  34. TITLE+= (mbedTLS)
  35. VARIANT:=mbedtls
  36. DEPENDS:=+libmbedtls +libpthread
  37. endef
  38. define Package/shadowsocks-libev/description
  39. Shadowsocks-libev is a lightweight secured socks5 proxy for embedded devices and low end boxes.
  40. endef
  41. Package/shadowsocks-libev-polarssl/description=$(Package/shadowsocks-libev/description)
  42. Package/shadowsocks-libev-mbedtls/description=$(Package/shadowsocks-libev/description)
  43. define Package/shadowsocks-libev/conffiles
  44. /etc/shadowsocks.json
  45. endef
  46. ifeq ($(BUILD_VARIANT),polarssl)
  47. CONFIGURE_ARGS += --with-crypto-library=polarssl
  48. endif
  49. ifeq ($(BUILD_VARIANT),mbedtls)
  50. CONFIGURE_ARGS += --with-crypto-library=mbedtls
  51. endif
  52. define Package/shadowsocks-libev/install
  53. $(INSTALL_DIR) $(1)/etc/init.d
  54. $(INSTALL_CONF) ./files/shadowsocks.json $(1)/etc
  55. $(INSTALL_BIN) ./files/shadowsocks.init $(1)/etc/init.d/shadowsocks
  56. $(INSTALL_DIR) $(1)/usr/bin
  57. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-{local,redir,tunnel} $(1)/usr/bin
  58. endef
  59. Package/shadowsocks-libev-polarssl/install=$(Package/shadowsocks-libev/install)
  60. Package/shadowsocks-libev-mbedtls/install=$(Package/shadowsocks-libev/install)
  61. $(eval $(call BuildPackage,shadowsocks-libev))
  62. $(eval $(call BuildPackage,shadowsocks-libev-polarssl))
  63. $(eval $(call BuildPackage,shadowsocks-libev-mbedtls))