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.

144 lines
4.0 KiB

  1. include $(TOPDIR)/rules.mk
  2. PKG_NAME:=snowflake
  3. PKG_VERSION:=2.3.0
  4. PKG_RELEASE:=2
  5. PKG_SOURCE_PROTO:=git
  6. PKG_SOURCE_URL=https://git.torproject.org/pluggable-transports/snowflake.git
  7. PKG_SOURCE_VERSION:=v$(PKG_VERSION)
  8. PKG_MIRROR_HASH:=e323598c959ea336927bf8dc4a96b02e88de73cb8cf165221465ca2b76cd2c48
  9. PKG_LICENSE:=BSD-3-Clause
  10. PKG_LICENSE_FILES:=LICENSE
  11. PKG_MAINTAINER:=Daniel Golle <daniel@makrotopia.org>, Nick Hainke <vincent@systemli.org>
  12. PKG_BUILD_DEPENDS:=golang/host
  13. PKG_BUILD_PARALLEL:=1
  14. PKG_USE_MIPS16:=0
  15. GO_PKG:=git.torproject.org/pluggable-transports/snowflake.git/v2
  16. include $(INCLUDE_DIR)/package.mk
  17. include ../../lang/golang/golang-package.mk
  18. define Package/snowflake/Default
  19. TITLE:=Snowflake
  20. URL:=https://snowflake.torproject.org/
  21. DEPENDS:=$(GO_ARCH_DEPENDS)
  22. SECTION:=net
  23. CATEGORY:=Network
  24. USERID:=snowflake:snowflake
  25. endef
  26. define Package/snowflake-broker
  27. $(call Package/snowflake/Default)
  28. TITLE+= Broker
  29. endef
  30. define Package/snowflake-client
  31. $(call Package/snowflake/Default)
  32. TITLE+= Client
  33. endef
  34. define Package/snowflake-distinctcounter
  35. $(call Package/snowflake/Default)
  36. TITLE+= Distinct Counter
  37. endef
  38. define Package/snowflake-probetest
  39. $(call Package/snowflake/Default)
  40. TITLE+= Probe test
  41. endef
  42. define Package/snowflake-proxy
  43. $(call Package/snowflake/Default)
  44. TITLE+= Proxy
  45. endef
  46. define Package/snowflake-server
  47. $(call Package/snowflake/Default)
  48. TITLE+= Server
  49. endef
  50. define Package/snowflake/description/Default
  51. Snowflake is a system that allows people from all over the world to
  52. access censored websites and applications. Similar to how VPNs assist
  53. users in getting around Internet censorship, Snowflake helps you avoid
  54. being noticed by Internet censors by making your Internet activity appear
  55. as though you're using the Internet for a regular video or voice call.
  56. endef
  57. define Package/snowflake-broker/description
  58. $(call Package/snowflake/description/Default)
  59. This package provides the Snowflake broker service.
  60. endef
  61. define Package/snowflake-client/description
  62. $(call Package/snowflake/description/Default)
  63. This package contains the Snowflake client which provides the bridge to TOR.
  64. endef
  65. define Package/snowflake-distinctcounter/description
  66. $(call Package/snowflake/description/Default)
  67. This package provides the Snowflake distinct counter service.
  68. endef
  69. define Package/snowflake-probetest/description
  70. $(call Package/snowflake/description/Default)
  71. This package provides the Snowflake probe test.
  72. endef
  73. define Package/snowflake-proxy/description
  74. $(call Package/snowflake/description/Default)
  75. This package provides the standalone Snowflake proxy.
  76. endef
  77. define Package/snowflake-server/description
  78. $(call Package/snowflake/description/Default)
  79. This package provides the Snowflake server.
  80. endef
  81. define Package/snowflake-broker/install
  82. $(INSTALL_DIR) $(1)/usr/bin
  83. $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/broker $(1)/usr/bin/snowflake-broker
  84. endef
  85. define Package/snowflake-client/install
  86. $(INSTALL_DIR) $(1)/usr/bin
  87. $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/client $(1)/usr/bin/snowflake-client
  88. endef
  89. define Package/snowflake-distinctcounter/install
  90. $(INSTALL_DIR) $(1)/usr/bin
  91. $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/distinctcounter $(1)/usr/bin/snowflake-distinctcounter
  92. endef
  93. define Package/snowflake-probetest/install
  94. $(INSTALL_DIR) $(1)/usr/bin
  95. $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/probetest $(1)/usr/bin/snowflake-probetest
  96. endef
  97. define Package/snowflake-proxy/install
  98. $(INSTALL_DIR) $(1)/usr/bin $(1)/etc/init.d
  99. $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/proxy $(1)/usr/bin/snowflake-proxy
  100. $(INSTALL_BIN) ./files/snowflake-proxy.init $(1)/etc/init.d/snowflake-proxy
  101. endef
  102. define Package/snowflake-server/install
  103. $(INSTALL_DIR) $(1)/usr/bin
  104. $(INSTALL_BIN) $(GO_PKG_BUILD_BIN_DIR)/server $(1)/usr/bin/snowflake-server
  105. endef
  106. $(eval $(call BuildPackage,snowflake-broker))
  107. $(eval $(call BuildPackage,snowflake-client))
  108. $(eval $(call BuildPackage,snowflake-distinctcounter))
  109. $(eval $(call BuildPackage,snowflake-probetest))
  110. $(eval $(call BuildPackage,snowflake-proxy))
  111. $(eval $(call BuildPackage,snowflake-server))