BUILD 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. package(default_visibility = ["//visibility:public"])
  2. load("//infra/bazel:zip.bzl", "pkg_zip")
  3. load("//release:mapping.bzl", "gen_mappings")
  4. filegroup(
  5. name = "config_json",
  6. srcs = [
  7. "config/config.json",
  8. "config/vpoint_socks_vmess.json",
  9. "config/vpoint_vmess_freedom.json",
  10. ],
  11. )
  12. filegroup(
  13. name = "systemd",
  14. srcs = [
  15. "config/systemd/system/v2ray.service",
  16. "config/systemd/system/v2ray@.service",
  17. ],
  18. )
  19. filegroup(
  20. name = "doc",
  21. srcs = glob(["doc/*.md"]),
  22. )
  23. filegroup(
  24. name = "geodata",
  25. srcs = [
  26. "config/geoip.dat",
  27. "config/geosite.dat",
  28. ],
  29. )
  30. pkg_zip(
  31. name = "v2ray_darwin_amd64_package",
  32. srcs = [
  33. ":config_json",
  34. ":doc",
  35. ":geodata",
  36. "//infra/control/main:v2ctl_darwin_amd64",
  37. "//main:v2ray_darwin_amd64",
  38. ],
  39. out = "v2ray-macos-64.zip",
  40. mappings = gen_mappings("darwin", "amd64", "0"),
  41. )
  42. pkg_zip(
  43. name = "v2ray_windows_amd64_package",
  44. srcs = [
  45. ":config_json",
  46. ":doc",
  47. ":geodata",
  48. "//infra/control/main:v2ctl_windows_amd64",
  49. "//main:v2ray_windows_amd64",
  50. "//main:v2ray_windows_amd64_nowindow",
  51. ],
  52. out = "v2ray-windows-64.zip",
  53. mappings = gen_mappings("windows", "amd64", "0"),
  54. )
  55. pkg_zip(
  56. name = "v2ray_windows_x86_package",
  57. srcs = [
  58. ":config_json",
  59. ":doc",
  60. ":geodata",
  61. "//infra/control/main:v2ctl_windows_386",
  62. "//main:v2ray_windows_386",
  63. "//main:v2ray_windows_386_nowindow",
  64. ],
  65. out = "v2ray-windows-32.zip",
  66. mappings = gen_mappings("windows", "386", "0"),
  67. )
  68. pkg_zip(
  69. name = "v2ray_windows_armv7_package",
  70. srcs = [
  71. ":config_json",
  72. ":doc",
  73. ":geodata",
  74. "//infra/control/main:v2ctl_windows_arm_7",
  75. "//main:v2ray_windows_arm_7",
  76. "//main:v2ray_windows_arm_7_nowindow",
  77. ],
  78. out = "v2ray-windows-arm32-v7a.zip",
  79. mappings = gen_mappings("windows", "arm", "7"),
  80. )
  81. pkg_zip(
  82. name = "v2ray_freebsd_amd64_package",
  83. srcs = [
  84. ":config_json",
  85. ":doc",
  86. ":geodata",
  87. "//infra/control/main:v2ctl_freebsd_amd64",
  88. "//main:v2ray_freebsd_amd64",
  89. ],
  90. out = "v2ray-freebsd-64.zip",
  91. mappings = gen_mappings("freebsd", "amd64", "0"),
  92. )
  93. pkg_zip(
  94. name = "v2ray_freebsd_x86_package",
  95. srcs = [
  96. ":config_json",
  97. ":doc",
  98. ":geodata",
  99. "//infra/control/main:v2ctl_freebsd_386",
  100. "//main:v2ray_freebsd_386",
  101. ],
  102. out = "v2ray-freebsd-32.zip",
  103. mappings = gen_mappings("freebsd", "386", "0"),
  104. )
  105. pkg_zip(
  106. name = "v2ray_openbsd_amd64_package",
  107. srcs = [
  108. ":config_json",
  109. ":doc",
  110. ":geodata",
  111. "//infra/control/main:v2ctl_openbsd_amd64",
  112. "//main:v2ray_openbsd_amd64",
  113. ],
  114. out = "v2ray-openbsd-64.zip",
  115. mappings = gen_mappings("openbsd", "amd64", "0"),
  116. )
  117. pkg_zip(
  118. name = "v2ray_openbsd_x86_package",
  119. srcs = [
  120. ":config_json",
  121. ":doc",
  122. ":geodata",
  123. "//infra/control/main:v2ctl_openbsd_386",
  124. "//main:v2ray_openbsd_386",
  125. ],
  126. out = "v2ray-openbsd-32.zip",
  127. mappings = gen_mappings("openbsd", "386", "0"),
  128. )
  129. pkg_zip(
  130. name = "v2ray_dragonfly_amd64_package",
  131. srcs = [
  132. ":config_json",
  133. ":doc",
  134. ":geodata",
  135. "//infra/control/main:v2ctl_dragonfly_amd64",
  136. "//main:v2ray_dragonfly_amd64",
  137. ],
  138. out = "v2ray-dragonfly-64.zip",
  139. mappings = gen_mappings("dragonfly", "amd64", "0"),
  140. )
  141. pkg_zip(
  142. name = "v2ray_linux_amd64_package",
  143. srcs = [
  144. ":config_json",
  145. ":doc",
  146. ":geodata",
  147. ":systemd",
  148. "//infra/control/main:v2ctl_linux_amd64",
  149. "//main:v2ray_linux_amd64",
  150. ],
  151. out = "v2ray-linux-64.zip",
  152. mappings = gen_mappings("linux", "amd64", "0"),
  153. )
  154. pkg_zip(
  155. name = "v2ray_linux_x86_package",
  156. srcs = [
  157. ":config_json",
  158. ":doc",
  159. ":geodata",
  160. ":systemd",
  161. "//infra/control/main:v2ctl_linux_386",
  162. "//main:v2ray_linux_386",
  163. ],
  164. out = "v2ray-linux-32.zip",
  165. mappings = gen_mappings("linux", "386", "0"),
  166. )
  167. pkg_zip(
  168. name = "v2ray_linux_arm64_package",
  169. srcs = [
  170. ":config_json",
  171. ":doc",
  172. ":geodata",
  173. ":systemd",
  174. "//infra/control/main:v2ctl_linux_arm64",
  175. "//main:v2ray_linux_arm64",
  176. ],
  177. out = "v2ray-linux-arm64-v8a.zip",
  178. mappings = gen_mappings("linux", "arm64", "0"),
  179. )
  180. pkg_zip(
  181. name = "v2ray_linux_armv7_package",
  182. srcs = [
  183. ":config_json",
  184. ":doc",
  185. ":geodata",
  186. ":systemd",
  187. "//infra/control/main:v2ctl_linux_arm_7",
  188. "//main:v2ray_linux_arm_7",
  189. ],
  190. out = "v2ray-linux-arm32-v7a.zip",
  191. mappings = gen_mappings("linux", "arm", "7"),
  192. )
  193. pkg_zip(
  194. name = "v2ray_linux_armv6_package",
  195. srcs = [
  196. ":config_json",
  197. ":doc",
  198. ":geodata",
  199. ":systemd",
  200. "//infra/control/main:v2ctl_linux_arm_6",
  201. "//main:v2ray_linux_arm_6",
  202. ],
  203. out = "v2ray-linux-arm32-v6.zip",
  204. mappings = gen_mappings("linux", "arm", "6"),
  205. )
  206. pkg_zip(
  207. name = "v2ray_linux_armv5_package",
  208. srcs = [
  209. ":config_json",
  210. ":doc",
  211. ":geodata",
  212. ":systemd",
  213. "//infra/control/main:v2ctl_linux_arm_5",
  214. "//main:v2ray_linux_arm_5",
  215. ],
  216. out = "v2ray-linux-arm32-v5.zip",
  217. mappings = gen_mappings("linux", "arm", "5"),
  218. )
  219. pkg_zip(
  220. name = "v2ray_linux_mips32_package",
  221. srcs = [
  222. ":config_json",
  223. ":doc",
  224. ":geodata",
  225. ":systemd",
  226. "//infra/control/main:v2ctl_linux_mips",
  227. "//infra/control/main:v2ctl_linux_mips_softfloat",
  228. "//main:v2ray_linux_mips",
  229. "//main:v2ray_linux_mips_softfloat",
  230. ],
  231. out = "v2ray-linux-mips32.zip",
  232. mappings = gen_mappings("linux", "mips", "0"),
  233. )
  234. pkg_zip(
  235. name = "v2ray_linux_mips32le_package",
  236. srcs = [
  237. ":config_json",
  238. ":doc",
  239. ":geodata",
  240. ":systemd",
  241. "//infra/control/main:v2ctl_linux_mipsle",
  242. "//infra/control/main:v2ctl_linux_mipsle_softfloat",
  243. "//main:v2ray_linux_mipsle",
  244. "//main:v2ray_linux_mipsle_softfloat",
  245. ],
  246. out = "v2ray-linux-mips32le.zip",
  247. mappings = gen_mappings("linux", "mipsle", "0"),
  248. )
  249. pkg_zip(
  250. name = "v2ray_linux_mips64_package",
  251. srcs = [
  252. ":config_json",
  253. ":doc",
  254. ":geodata",
  255. ":systemd",
  256. "//infra/control/main:v2ctl_linux_mips64",
  257. "//main:v2ray_linux_mips64",
  258. ],
  259. out = "v2ray-linux-mips64.zip",
  260. mappings = gen_mappings("linux", "mips64", "0"),
  261. )
  262. pkg_zip(
  263. name = "v2ray_linux_mips64le_package",
  264. srcs = [
  265. ":config_json",
  266. ":doc",
  267. ":geodata",
  268. ":systemd",
  269. "//infra/control/main:v2ctl_linux_mips64le",
  270. "//main:v2ray_linux_mips64le",
  271. ],
  272. out = "v2ray-linux-mips64le.zip",
  273. mappings = gen_mappings("linux", "mips64le", "0"),
  274. )
  275. pkg_zip(
  276. name = "v2ray_linux_riscv64_package",
  277. srcs = [
  278. ":config_json",
  279. ":doc",
  280. ":geodata",
  281. ":systemd",
  282. "//infra/control/main:v2ctl_linux_riscv64",
  283. "//main:v2ray_linux_riscv64",
  284. ],
  285. out = "v2ray-linux-riscv64.zip",
  286. mappings = gen_mappings("linux", "riscv64", "0"),
  287. )
  288. pkg_zip(
  289. name = "v2ray_linux_s390x_package",
  290. srcs = [
  291. ":config_json",
  292. ":doc",
  293. ":geodata",
  294. ":systemd",
  295. "//infra/control/main:v2ctl_linux_s390x",
  296. "//main:v2ray_linux_s390x",
  297. ],
  298. out = "v2ray-linux-s390x.zip",
  299. mappings = gen_mappings("linux", "s390x", "0"),
  300. )
  301. pkg_zip(
  302. name = "v2ray_linux_ppc64_package",
  303. srcs = [
  304. ":config_json",
  305. ":doc",
  306. ":geodata",
  307. ":systemd",
  308. "//infra/control/main:v2ctl_linux_ppc64",
  309. "//main:v2ray_linux_ppc64",
  310. ],
  311. out = "v2ray-linux-ppc64.zip",
  312. mappings = gen_mappings("linux", "ppc64", "0"),
  313. )
  314. pkg_zip(
  315. name = "v2ray_linux_ppc64le_package",
  316. srcs = [
  317. ":config_json",
  318. ":doc",
  319. ":geodata",
  320. ":systemd",
  321. "//infra/control/main:v2ctl_linux_ppc64le",
  322. "//main:v2ray_linux_ppc64le",
  323. ],
  324. out = "v2ray-linux-ppc64le.zip",
  325. mappings = gen_mappings("linux", "ppc64le", "0"),
  326. )