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.

74 lines
2.2 KiB

  1. #
  2. # Copyright (C) 2015 OpenWrt.org
  3. # Copyright (C) 2017 Yousong Zhou <yszhou4tech@gmail.com>
  4. #
  5. # This is free software, licensed under the GNU General Public License v2.
  6. # See /LICENSE for more information.
  7. #
  8. include $(TOPDIR)/rules.mk
  9. PKG_NAME:=shadowsocks-libev
  10. PKG_VERSION:=3.0.6
  11. PKG_RELEASE:=1
  12. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
  13. PKG_SOURCE_URL:=https://github.com/shadowsocks/shadowsocks-libev/releases/download/v$(PKG_VERSION)
  14. PKG_HASH:=7d9b43b0235a57c115bfe160efd54abef96bffcbfff61c5496e7c2800f0734ca
  15. PKG_MAINTAINER:=Jian Chang <aa65535@live.com>
  16. PKG_LICENSE:=GPLv2
  17. PKG_LICENSE_FILES:=LICENSE
  18. PKG_INSTALL:=1
  19. PKG_FIXUP:=autoreconf
  20. PKG_USE_MIPS16:=0
  21. PKG_BUILD_PARALLEL:=1
  22. include $(INCLUDE_DIR)/package.mk
  23. define Package/shadowsocks-libev
  24. SECTION:=net
  25. CATEGORY:=Network
  26. TITLE:=Lightweight Secured Socks5 Proxy
  27. URL:=https://github.com/shadowsocks/shadowsocks-libev
  28. DEPENDS:=+libev +libmbedtls +libpthread +libsodium +libudns \
  29. +ipset +ip +iptables-mod-tproxy +libpcre +zlib
  30. endef
  31. define Package/shadowsocks-libev/description
  32. Shadowsocks-libev is a lightweight secured socks5 proxy for embedded devices and low end boxes.
  33. endef
  34. define Package/shadowsocks-libev/conffiles
  35. /etc/config/shadowsocks-libev
  36. endef
  37. define Package/shadowsocks-libev/postinst
  38. #!/bin/sh
  39. uci -q batch <<-EOF >/dev/null
  40. delete firewall.shadowsocks_libev
  41. set firewall.shadowsocks_libev=include
  42. set firewall.shadowsocks_libev.type=script
  43. set firewall.shadowsocks_libev.path=/usr/share/shadowsocks-libev/firewall.include
  44. set firewall.shadowsocks_libev.reload=1
  45. commit firewall
  46. EOF
  47. exit 0
  48. endef
  49. define Package/shadowsocks-libev/install
  50. $(INSTALL_DIR) $(1)/usr/bin
  51. $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/ss-{redir,tunnel} $(1)/usr/bin
  52. $(INSTALL_BIN) ./files/ss-rules $(1)/usr/bin
  53. $(INSTALL_DIR) $(1)/etc/config
  54. $(INSTALL_DATA) ./files/shadowsocks-libev.config $(1)/etc/config/shadowsocks-libev
  55. $(INSTALL_DIR) $(1)/etc/init.d
  56. $(INSTALL_BIN) ./files/shadowsocks-libev.init $(1)/etc/init.d/shadowsocks-libev
  57. $(INSTALL_DIR) $(1)/usr/share/shadowsocks-libev
  58. $(INSTALL_DATA) ./files/firewall.include $(1)/usr/share/shadowsocks-libev/firewall.include
  59. endef
  60. CONFIGURE_ARGS += --disable-documentation
  61. $(eval $(call BuildPackage,shadowsocks-libev))