blob: d8f17533ea45eef002e5785bdbbe7571a6c84d73 [file] [log] [blame]
Philipp Schrader0e19c602018-03-07 21:07:22 -08001load(
Philipp Schraderd0e33a42022-01-22 21:55:15 -08002 ":apache2.bzl",
3 apache2_debs = "files",
4)
5load(
Philipp Schrader41011a12022-03-13 12:49:32 -07006 ":postgresql_amd64.bzl",
7 postgresql_amd64_debs = "files",
8)
9load(
Brian Silverman7bda6212018-08-05 11:42:11 -070010 ":patch.bzl",
11 patch_debs = "files",
12)
Brian Silverman7297c0c2018-08-05 13:43:00 -070013load(
Austin Schuh71f6fa72019-08-31 18:23:02 -070014 ":rsync.bzl",
15 rsync_debs = "files",
16)
17load(
18 ":ssh.bzl",
19 ssh_debs = "files",
20)
21load(
Brian Silverman7297c0c2018-08-05 13:43:00 -070022 ":pandoc.bzl",
23 pandoc_debs = "files",
24)
Brian Silverman4f6ba442018-08-05 14:34:58 -070025load(
26 ":libusb.bzl",
27 libusb_debs = "files",
28)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -070029load(
30 ":mingw_compiler.bzl",
31 mingw_compiler_debs = "files",
32)
Brian Silverman6470f442018-08-05 12:08:16 -070033load(
34 ":patchelf.bzl",
35 patchelf_debs = "files",
36)
37load(
Brian Silverman50b9ac02018-08-12 13:24:10 -070038 ":arm_frc_gnueabi_deps.bzl",
39 arm_frc_gnueabi_deps_debs = "files",
40)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070041load(
Philipp Schraderfd5489f2022-09-17 17:31:09 -070042 ":gtk_runtime.bzl",
43 gtk_runtime_debs = "files",
44)
45load(
Philipp Schraderf1bbf342022-02-05 14:30:15 -080046 ":opencv_arm64.bzl",
47 opencv_arm64_debs = "files",
48)
49load(
Brian Silvermand97a47c2020-01-16 00:47:53 -080050 ":opencv_amd64.bzl",
51 opencv_amd64_debs = "files",
52)
Tyler Chatow60671d32020-02-26 19:49:30 -080053load(
54 ":gstreamer_amd64.bzl",
55 gstreamer_amd64_debs = "files",
56)
57load(
Tyler Chatow6eda82c2022-03-27 22:37:38 -070058 ":gstreamer_arm64.bzl",
59 gstreamer_arm64_debs = "files",
60)
61load(
Brian Silvermanf59fe3f2020-09-22 21:04:09 -070062 ":lzma_amd64.bzl",
63 lzma_amd64_debs = "files",
64)
65load(
66 ":lzma_arm64.bzl",
67 lzma_arm64_debs = "files",
68)
Tyler Chatow8a51ac62022-03-15 13:23:12 -070069load(
70 ":libtinfo5_amd64.bzl",
71 libtinfo5_amd64_debs = "files",
72)
Tyler Chatowec100e22022-03-22 16:23:04 -070073load(
74 ":libtinfo5_arm64.bzl",
75 libtinfo5_arm64_debs = "files",
76)
Philipp Schraderf60e7d72023-02-19 17:07:22 -080077load(
78 ":xvfb_amd64.bzl",
79 xvfb_amd64_debs = "files",
80)
Brian Silvermanf59fe3f2020-09-22 21:04:09 -070081load(":packages.bzl", "download_packages", "generate_deb_tarball")
Philipp Schrader0e19c602018-03-07 21:07:22 -080082
Philipp Schradercc016b32021-12-30 08:59:58 -080083package(default_visibility = ["//visibility:public"])
84
Philipp Schrader0e19c602018-03-07 21:07:22 -080085py_binary(
86 name = "download_packages",
87 srcs = [
88 "download_packages.py",
89 ],
Philipp Schrader0e19c602018-03-07 21:07:22 -080090 main = "download_packages.py",
Philipp Schraderdada1072020-11-24 11:34:46 -080091 target_compatible_with = ["@platforms//os:linux"],
Philipp Schrader0e19c602018-03-07 21:07:22 -080092)
93
94download_packages(
Philipp Schraderd0e33a42022-01-22 21:55:15 -080095 name = "download_apache2_packages",
96 excludes = [
97 "libaprutil1-dbd-mysql",
98 "libaprutil1-dbd-odbc",
99 "libaprutil1-dbd-pgsql",
100 "libaprutil1-dbd-freetds",
101 "libstdc++6",
102 "lsb-base",
103 "debconf",
104 "libc6-dev",
105 ],
106 force_includes = [
107 "libaprutil1",
108 ],
109 packages = [
110 "apache2",
111 ],
112)
113
114download_packages(
James Kuszmaulc6ea63a2023-09-06 20:36:46 -0700115 name = "download_rsync_packages",
116 excludes = [
117 ],
118 packages = [
119 "rsync",
120 ],
121)
122
123download_packages(
124 name = "download_ssh_packages",
125 excludes = [
126 "libcbor0.8",
127 "libsemanage2",
128 "libsepol2",
129 ],
130 packages = [
131 "ssh",
132 ],
133)
134
135download_packages(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700136 name = "download_gtk_runtime",
137 excludes = [
138 "libstdc++6",
139 "lsb-base",
140 "libglib2.0-dev-bin",
141 "fonts-freefont",
142 "gsettings-backend",
143 "libpng-dev",
144 "libz-dev",
145 "libstdc++-dev",
146 "libc6-dev",
147 ],
148 # Since "libglib2.0-0" pulls in glibc, we need to forcibly remove it again.
149 force_excludes = [
150 "libc6",
151 "libgcc-s1",
152 ],
153 force_includes = [
154 "libglib2.0-0",
155 ],
156 packages = [
157 "gir1.2-gtk-3.0",
158 "libgtk-3-dev",
Philipp Schrader7520ee62022-12-10 14:04:40 -0800159 "librsvg2-common",
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700160 ],
161)
162
163download_packages(
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800164 name = "download_clang_deps",
165 excludes = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800166 "lib32stdc++6",
167 "libstdc++6",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800168 ],
169 force_includes = [
170 "libc6",
171 "libc6-dev",
172 ],
173 packages = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800174 "clang-6.0",
175 "clang-format-6.0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800176 "gcc",
177 "gfortran",
178 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800179 target_compatible_with = ["@platforms//os:linux"],
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800180)
181
Brian Silverman7bda6212018-08-05 11:42:11 -0700182download_packages(
Philipp Schrader41011a12022-03-13 12:49:32 -0700183 name = "download_postgresql_deps",
184 excludes = [
185 "adduser",
186 "debconf",
187 "debconf-2.0",
188 "libsystemd0",
189 "lsb-base",
190 "libstdc++6",
191 "libc-bin",
192 "libc-l10n",
193 "netbase",
194 "ucf",
195 "locales",
196 "locales-all",
197 ],
198 packages = [
199 "postgresql",
200 ],
201 target_compatible_with = ["@platforms//os:linux"],
202)
203
204download_packages(
Brian Silverman7bda6212018-08-05 11:42:11 -0700205 name = "download_patch_deps",
206 packages = [
207 "patch",
208 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800209 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7bda6212018-08-05 11:42:11 -0700210)
211
Brian Silverman7297c0c2018-08-05 13:43:00 -0700212download_packages(
213 name = "download_pandoc_deps",
214 packages = [
215 "pandoc",
216 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800217 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7297c0c2018-08-05 13:43:00 -0700218)
219
Brian Silverman4f6ba442018-08-05 14:34:58 -0700220download_packages(
221 name = "download_libusb_deps",
222 packages = [
223 "libusb-0.1-4",
224 "libusb-1.0-0",
225 "libusb-1.0-0-dev",
226 "libusb-dev",
227 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800228 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4f6ba442018-08-05 14:34:58 -0700229)
230
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700231download_packages(
232 name = "download_mingw_compiler_deps",
233 packages = [
234 "g++-mingw-w64-x86-64",
235 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800236 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700237)
238
Brian Silverman6470f442018-08-05 12:08:16 -0700239download_packages(
240 name = "download_patchelf_deps",
241 packages = [
242 "patchelf",
243 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800244 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700245)
246
Brian Silverman50b9ac02018-08-12 13:24:10 -0700247# This list was obtained by manually looking at the output from:
248# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
249download_packages(
250 name = "download_arm_frc_gnueabi_deps",
251 packages = [
252 "libexpat1",
253 "libgmp10",
254 "libisl10",
255 "liblzma5",
256 "libmpc3",
257 "libmpfr4",
258 "libncurses5",
259 "libtinfo5",
260 "zlib1g",
261 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800262 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman50b9ac02018-08-12 13:24:10 -0700263)
264
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800265generate_deb_tarball(
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800266 name = "apache2",
267 files = apache2_debs,
268 target_compatible_with = ["@platforms//os:linux"],
269)
270
271generate_deb_tarball(
Philipp Schrader41011a12022-03-13 12:49:32 -0700272 name = "postgresql_amd64",
273 files = postgresql_amd64_debs,
274 target_compatible_with = ["@platforms//os:linux"],
275)
276
277generate_deb_tarball(
Brian Silverman7bda6212018-08-05 11:42:11 -0700278 name = "patch",
279 files = patch_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800280 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7bda6212018-08-05 11:42:11 -0700281)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700282
283generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700284 name = "rsync",
285 files = rsync_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800286 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh71f6fa72019-08-31 18:23:02 -0700287)
288
289generate_deb_tarball(
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800290 name = "ssh_v3",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700291 files = ssh_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800292 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh71f6fa72019-08-31 18:23:02 -0700293)
294
295generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700296 name = "pandoc",
297 files = pandoc_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800298 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7297c0c2018-08-05 13:43:00 -0700299)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700300
301generate_deb_tarball(
302 name = "libusb",
303 files = libusb_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800304 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4f6ba442018-08-05 14:34:58 -0700305)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700306
307generate_deb_tarball(
308 name = "mingw_compiler",
309 files = mingw_compiler_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800310 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700311)
Brian Silverman6470f442018-08-05 12:08:16 -0700312
313generate_deb_tarball(
314 name = "patchelf",
315 files = patchelf_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800316 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700317)
318
319generate_deb_tarball(
Brian Silverman50b9ac02018-08-12 13:24:10 -0700320 name = "arm_frc_gnueabi_deps",
321 files = arm_frc_gnueabi_deps_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800322 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman50b9ac02018-08-12 13:24:10 -0700323)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700324
325generate_deb_tarball(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700326 name = "gtk_runtime",
327 files = gtk_runtime_debs,
328 target_compatible_with = ["@platforms//os:linux"],
329)
330
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800331download_packages(
332 name = "download_opencv",
333 packages = [
334 "libopencv-calib3d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800335 "libopencv-calib3d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800336 "libopencv-contrib-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800337 "libopencv-contrib4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800338 "libopencv-core-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800339 "libopencv-core4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800340 "libopencv-dev",
341 "libopencv-features2d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800342 "libopencv-features2d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800343 "libopencv-flann-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800344 "libopencv-flann4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800345 "libopencv-highgui-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800346 "libopencv-highgui4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800347 "libopencv-imgcodecs-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800348 "libopencv-imgcodecs4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800349 "libopencv-imgproc-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800350 "libopencv-imgproc4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800351 "libopencv-ml-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800352 "libopencv-ml4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800353 "libopencv-objdetect-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800354 "libopencv-objdetect4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800355 "libopencv-photo-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800356 "libopencv-photo4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800357 "libopencv-shape-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800358 "libopencv-shape4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800359 "libopencv-stitching-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800360 "libopencv-stitching4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800361 "libopencv-superres-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800362 "libopencv-superres4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800363 "libopencv-video-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800364 "libopencv-video4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800365 "libopencv-videoio-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800366 "libopencv-videoio4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800367 "libopencv-videostab-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800368 "libopencv-videostab4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800369 "libopencv-viz-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800370 "libopencv-viz4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800371 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800372 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800373)
374
Brian Silvermand4260c72020-01-14 00:08:02 -0800375generate_deb_tarball(
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800376 name = "opencv_arm64",
377 files = opencv_arm64_debs,
378 target_compatible_with = ["@platforms//os:linux"],
379)
380
381generate_deb_tarball(
Brian Silvermand97a47c2020-01-16 00:47:53 -0800382 name = "opencv_amd64",
383 files = opencv_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800384 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermand97a47c2020-01-16 00:47:53 -0800385)
386
Tyler Chatow60671d32020-02-26 19:49:30 -0800387generate_deb_tarball(
388 name = "gstreamer_amd64",
389 files = gstreamer_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800390 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow60671d32020-02-26 19:49:30 -0800391)
392
393generate_deb_tarball(
Tyler Chatow6eda82c2022-03-27 22:37:38 -0700394 name = "gstreamer_arm64",
395 files = gstreamer_arm64_debs,
396 target_compatible_with = ["@platforms//os:linux"],
397)
398
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700399download_packages(
400 name = "download_lzma",
401 packages = [
402 "liblzma-dev",
403 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800404 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700405)
406
407generate_deb_tarball(
408 name = "lzma_amd64",
409 files = lzma_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800410 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700411)
412
413generate_deb_tarball(
414 name = "lzma_arm64",
415 files = lzma_arm64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800416 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700417)
418
Tyler Chatow8a51ac62022-03-15 13:23:12 -0700419generate_deb_tarball(
420 name = "libtinfo5_amd64",
421 files = libtinfo5_amd64_debs,
422 target_compatible_with = ["@platforms//os:linux"],
423)
424
Tyler Chatowec100e22022-03-22 16:23:04 -0700425generate_deb_tarball(
426 name = "libtinfo5_arm64",
427 files = libtinfo5_arm64_debs,
428 target_compatible_with = ["@platforms//os:linux"],
429)
430
Philipp Schraderf60e7d72023-02-19 17:07:22 -0800431download_packages(
432 name = "download_xvfb_packages",
433 excludes = [
434 "libglx-mesa0",
435 ],
436 packages = [
437 "xvfb",
438 ],
439)
440
441generate_deb_tarball(
442 name = "xvfb_amd64",
443 files = xvfb_amd64_debs,
444 target_compatible_with = ["@platforms//os:linux"],
445)
446
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800447exports_files([
448 "ssh_wrapper.sh",
James Kuszmaulc6ea63a2023-09-06 20:36:46 -0700449 "rsync_wrapper.sh",
Austin Schuh86110712022-09-16 15:40:54 -0700450 "curl.BUILD",
451 "BUILD.zlib.bazel",
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800452])