blob: e2a85417c0af1b06c83a9806e187a88caf576f10 [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(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700115 name = "download_gtk_runtime",
116 excludes = [
117 "libstdc++6",
118 "lsb-base",
119 "libglib2.0-dev-bin",
120 "fonts-freefont",
121 "gsettings-backend",
122 "libpng-dev",
123 "libz-dev",
124 "libstdc++-dev",
125 "libc6-dev",
126 ],
127 # Since "libglib2.0-0" pulls in glibc, we need to forcibly remove it again.
128 force_excludes = [
129 "libc6",
130 "libgcc-s1",
131 ],
132 force_includes = [
133 "libglib2.0-0",
134 ],
135 packages = [
136 "gir1.2-gtk-3.0",
137 "libgtk-3-dev",
Philipp Schrader7520ee62022-12-10 14:04:40 -0800138 "librsvg2-common",
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700139 ],
140)
141
142download_packages(
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800143 name = "download_clang_deps",
144 excludes = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800145 "lib32stdc++6",
146 "libstdc++6",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800147 ],
148 force_includes = [
149 "libc6",
150 "libc6-dev",
151 ],
152 packages = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800153 "clang-6.0",
154 "clang-format-6.0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800155 "gcc",
156 "gfortran",
157 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800158 target_compatible_with = ["@platforms//os:linux"],
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800159)
160
Brian Silverman7bda6212018-08-05 11:42:11 -0700161download_packages(
Philipp Schrader41011a12022-03-13 12:49:32 -0700162 name = "download_postgresql_deps",
163 excludes = [
164 "adduser",
165 "debconf",
166 "debconf-2.0",
167 "libsystemd0",
168 "lsb-base",
169 "libstdc++6",
170 "libc-bin",
171 "libc-l10n",
172 "netbase",
173 "ucf",
174 "locales",
175 "locales-all",
176 ],
177 packages = [
178 "postgresql",
179 ],
180 target_compatible_with = ["@platforms//os:linux"],
181)
182
183download_packages(
Brian Silverman7bda6212018-08-05 11:42:11 -0700184 name = "download_patch_deps",
185 packages = [
186 "patch",
187 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800188 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7bda6212018-08-05 11:42:11 -0700189)
190
Brian Silverman7297c0c2018-08-05 13:43:00 -0700191download_packages(
192 name = "download_pandoc_deps",
193 packages = [
194 "pandoc",
195 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800196 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7297c0c2018-08-05 13:43:00 -0700197)
198
Brian Silverman4f6ba442018-08-05 14:34:58 -0700199download_packages(
200 name = "download_libusb_deps",
201 packages = [
202 "libusb-0.1-4",
203 "libusb-1.0-0",
204 "libusb-1.0-0-dev",
205 "libusb-dev",
206 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800207 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4f6ba442018-08-05 14:34:58 -0700208)
209
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700210download_packages(
211 name = "download_mingw_compiler_deps",
212 packages = [
213 "g++-mingw-w64-x86-64",
214 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800215 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700216)
217
Brian Silverman6470f442018-08-05 12:08:16 -0700218download_packages(
219 name = "download_patchelf_deps",
220 packages = [
221 "patchelf",
222 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800223 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700224)
225
Brian Silverman50b9ac02018-08-12 13:24:10 -0700226# This list was obtained by manually looking at the output from:
227# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
228download_packages(
229 name = "download_arm_frc_gnueabi_deps",
230 packages = [
231 "libexpat1",
232 "libgmp10",
233 "libisl10",
234 "liblzma5",
235 "libmpc3",
236 "libmpfr4",
237 "libncurses5",
238 "libtinfo5",
239 "zlib1g",
240 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800241 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman50b9ac02018-08-12 13:24:10 -0700242)
243
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800244generate_deb_tarball(
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800245 name = "apache2",
246 files = apache2_debs,
247 target_compatible_with = ["@platforms//os:linux"],
248)
249
250generate_deb_tarball(
Philipp Schrader41011a12022-03-13 12:49:32 -0700251 name = "postgresql_amd64",
252 files = postgresql_amd64_debs,
253 target_compatible_with = ["@platforms//os:linux"],
254)
255
256generate_deb_tarball(
Brian Silverman7bda6212018-08-05 11:42:11 -0700257 name = "patch",
258 files = patch_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800259 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7bda6212018-08-05 11:42:11 -0700260)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700261
262generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700263 name = "rsync",
264 files = rsync_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800265 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh71f6fa72019-08-31 18:23:02 -0700266)
267
268generate_deb_tarball(
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800269 name = "ssh_v3",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700270 files = ssh_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800271 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh71f6fa72019-08-31 18:23:02 -0700272)
273
274generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700275 name = "pandoc",
276 files = pandoc_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800277 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7297c0c2018-08-05 13:43:00 -0700278)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700279
280generate_deb_tarball(
281 name = "libusb",
282 files = libusb_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800283 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4f6ba442018-08-05 14:34:58 -0700284)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700285
286generate_deb_tarball(
287 name = "mingw_compiler",
288 files = mingw_compiler_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800289 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700290)
Brian Silverman6470f442018-08-05 12:08:16 -0700291
292generate_deb_tarball(
293 name = "patchelf",
294 files = patchelf_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800295 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700296)
297
298generate_deb_tarball(
Brian Silverman50b9ac02018-08-12 13:24:10 -0700299 name = "arm_frc_gnueabi_deps",
300 files = arm_frc_gnueabi_deps_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800301 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman50b9ac02018-08-12 13:24:10 -0700302)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700303
304generate_deb_tarball(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700305 name = "gtk_runtime",
306 files = gtk_runtime_debs,
307 target_compatible_with = ["@platforms//os:linux"],
308)
309
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800310download_packages(
311 name = "download_opencv",
312 packages = [
313 "libopencv-calib3d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800314 "libopencv-calib3d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800315 "libopencv-contrib-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800316 "libopencv-contrib4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800317 "libopencv-core-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800318 "libopencv-core4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800319 "libopencv-dev",
320 "libopencv-features2d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800321 "libopencv-features2d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800322 "libopencv-flann-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800323 "libopencv-flann4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800324 "libopencv-highgui-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800325 "libopencv-highgui4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800326 "libopencv-imgcodecs-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800327 "libopencv-imgcodecs4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800328 "libopencv-imgproc-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800329 "libopencv-imgproc4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800330 "libopencv-ml-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800331 "libopencv-ml4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800332 "libopencv-objdetect-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800333 "libopencv-objdetect4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800334 "libopencv-photo-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800335 "libopencv-photo4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800336 "libopencv-shape-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800337 "libopencv-shape4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800338 "libopencv-stitching-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800339 "libopencv-stitching4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800340 "libopencv-superres-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800341 "libopencv-superres4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800342 "libopencv-video-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800343 "libopencv-video4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800344 "libopencv-videoio-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800345 "libopencv-videoio4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800346 "libopencv-videostab-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800347 "libopencv-videostab4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800348 "libopencv-viz-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800349 "libopencv-viz4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800350 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800351 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800352)
353
Brian Silvermand4260c72020-01-14 00:08:02 -0800354generate_deb_tarball(
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800355 name = "opencv_arm64",
356 files = opencv_arm64_debs,
357 target_compatible_with = ["@platforms//os:linux"],
358)
359
360generate_deb_tarball(
Brian Silvermand97a47c2020-01-16 00:47:53 -0800361 name = "opencv_amd64",
362 files = opencv_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800363 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermand97a47c2020-01-16 00:47:53 -0800364)
365
Tyler Chatow60671d32020-02-26 19:49:30 -0800366generate_deb_tarball(
367 name = "gstreamer_amd64",
368 files = gstreamer_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800369 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow60671d32020-02-26 19:49:30 -0800370)
371
372generate_deb_tarball(
Tyler Chatow6eda82c2022-03-27 22:37:38 -0700373 name = "gstreamer_arm64",
374 files = gstreamer_arm64_debs,
375 target_compatible_with = ["@platforms//os:linux"],
376)
377
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700378download_packages(
379 name = "download_lzma",
380 packages = [
381 "liblzma-dev",
382 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800383 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700384)
385
386generate_deb_tarball(
387 name = "lzma_amd64",
388 files = lzma_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800389 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700390)
391
392generate_deb_tarball(
393 name = "lzma_arm64",
394 files = lzma_arm64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800395 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700396)
397
Tyler Chatow8a51ac62022-03-15 13:23:12 -0700398generate_deb_tarball(
399 name = "libtinfo5_amd64",
400 files = libtinfo5_amd64_debs,
401 target_compatible_with = ["@platforms//os:linux"],
402)
403
Tyler Chatowec100e22022-03-22 16:23:04 -0700404generate_deb_tarball(
405 name = "libtinfo5_arm64",
406 files = libtinfo5_arm64_debs,
407 target_compatible_with = ["@platforms//os:linux"],
408)
409
Philipp Schraderf60e7d72023-02-19 17:07:22 -0800410download_packages(
411 name = "download_xvfb_packages",
412 excludes = [
413 "libglx-mesa0",
414 ],
415 packages = [
416 "xvfb",
417 ],
418)
419
420generate_deb_tarball(
421 name = "xvfb_amd64",
422 files = xvfb_amd64_debs,
423 target_compatible_with = ["@platforms//os:linux"],
424)
425
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800426exports_files([
427 "ssh_wrapper.sh",
Austin Schuh86110712022-09-16 15:40:54 -0700428 "curl.BUILD",
429 "BUILD.zlib.bazel",
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800430])