blob: e40bf8f5f46c4910d41dda1849f7a47b78d4393f [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 Silvermand4260c72020-01-14 00:08:02 -080050 ":opencv_armhf.bzl",
51 opencv_armhf_debs = "files",
52)
Brian Silvermand97a47c2020-01-16 00:47:53 -080053load(
54 ":opencv_amd64.bzl",
55 opencv_amd64_debs = "files",
56)
Tyler Chatow60671d32020-02-26 19:49:30 -080057load(
58 ":gstreamer_amd64.bzl",
59 gstreamer_amd64_debs = "files",
60)
61load(
62 ":gstreamer_armhf.bzl",
63 gstreamer_armhf_debs = "files",
64)
Austin Schuh023e7f52020-08-18 21:24:37 -070065load(
Tyler Chatow6eda82c2022-03-27 22:37:38 -070066 ":gstreamer_arm64.bzl",
67 gstreamer_arm64_debs = "files",
68)
69load(
Brian Silvermanf59fe3f2020-09-22 21:04:09 -070070 ":lzma_amd64.bzl",
71 lzma_amd64_debs = "files",
72)
73load(
74 ":lzma_arm64.bzl",
75 lzma_arm64_debs = "files",
76)
Tyler Chatow8a51ac62022-03-15 13:23:12 -070077load(
78 ":libtinfo5_amd64.bzl",
79 libtinfo5_amd64_debs = "files",
80)
Tyler Chatowec100e22022-03-22 16:23:04 -070081load(
82 ":libtinfo5_arm64.bzl",
83 libtinfo5_arm64_debs = "files",
84)
Philipp Schraderf60e7d72023-02-19 17:07:22 -080085load(
86 ":xvfb_amd64.bzl",
87 xvfb_amd64_debs = "files",
88)
Brian Silvermanf59fe3f2020-09-22 21:04:09 -070089load(":packages.bzl", "download_packages", "generate_deb_tarball")
Philipp Schrader0e19c602018-03-07 21:07:22 -080090
Philipp Schradercc016b32021-12-30 08:59:58 -080091package(default_visibility = ["//visibility:public"])
92
Philipp Schrader0e19c602018-03-07 21:07:22 -080093py_binary(
94 name = "download_packages",
95 srcs = [
96 "download_packages.py",
97 ],
Philipp Schrader0e19c602018-03-07 21:07:22 -080098 main = "download_packages.py",
Philipp Schraderdada1072020-11-24 11:34:46 -080099 target_compatible_with = ["@platforms//os:linux"],
Philipp Schrader0e19c602018-03-07 21:07:22 -0800100)
101
102download_packages(
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800103 name = "download_apache2_packages",
104 excludes = [
105 "libaprutil1-dbd-mysql",
106 "libaprutil1-dbd-odbc",
107 "libaprutil1-dbd-pgsql",
108 "libaprutil1-dbd-freetds",
109 "libstdc++6",
110 "lsb-base",
111 "debconf",
112 "libc6-dev",
113 ],
114 force_includes = [
115 "libaprutil1",
116 ],
117 packages = [
118 "apache2",
119 ],
120)
121
122download_packages(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700123 name = "download_gtk_runtime",
124 excludes = [
125 "libstdc++6",
126 "lsb-base",
127 "libglib2.0-dev-bin",
128 "fonts-freefont",
129 "gsettings-backend",
130 "libpng-dev",
131 "libz-dev",
132 "libstdc++-dev",
133 "libc6-dev",
134 ],
135 # Since "libglib2.0-0" pulls in glibc, we need to forcibly remove it again.
136 force_excludes = [
137 "libc6",
138 "libgcc-s1",
139 ],
140 force_includes = [
141 "libglib2.0-0",
142 ],
143 packages = [
144 "gir1.2-gtk-3.0",
145 "libgtk-3-dev",
Philipp Schrader7520ee62022-12-10 14:04:40 -0800146 "librsvg2-common",
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700147 ],
148)
149
150download_packages(
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800151 name = "download_clang_deps",
152 excludes = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800153 "lib32stdc++6",
154 "libstdc++6",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800155 ],
156 force_includes = [
157 "libc6",
158 "libc6-dev",
159 ],
160 packages = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800161 "clang-6.0",
162 "clang-format-6.0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800163 "gcc",
164 "gfortran",
165 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800166 target_compatible_with = ["@platforms//os:linux"],
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800167)
168
Brian Silverman7bda6212018-08-05 11:42:11 -0700169download_packages(
Philipp Schrader41011a12022-03-13 12:49:32 -0700170 name = "download_postgresql_deps",
171 excludes = [
172 "adduser",
173 "debconf",
174 "debconf-2.0",
175 "libsystemd0",
176 "lsb-base",
177 "libstdc++6",
178 "libc-bin",
179 "libc-l10n",
180 "netbase",
181 "ucf",
182 "locales",
183 "locales-all",
184 ],
185 packages = [
186 "postgresql",
187 ],
188 target_compatible_with = ["@platforms//os:linux"],
189)
190
191download_packages(
Brian Silverman7bda6212018-08-05 11:42:11 -0700192 name = "download_patch_deps",
193 packages = [
194 "patch",
195 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800196 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7bda6212018-08-05 11:42:11 -0700197)
198
Brian Silverman7297c0c2018-08-05 13:43:00 -0700199download_packages(
200 name = "download_pandoc_deps",
201 packages = [
202 "pandoc",
203 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800204 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7297c0c2018-08-05 13:43:00 -0700205)
206
Brian Silverman4f6ba442018-08-05 14:34:58 -0700207download_packages(
208 name = "download_libusb_deps",
209 packages = [
210 "libusb-0.1-4",
211 "libusb-1.0-0",
212 "libusb-1.0-0-dev",
213 "libusb-dev",
214 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800215 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4f6ba442018-08-05 14:34:58 -0700216)
217
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700218download_packages(
219 name = "download_mingw_compiler_deps",
220 packages = [
221 "g++-mingw-w64-x86-64",
222 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800223 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700224)
225
Brian Silverman6470f442018-08-05 12:08:16 -0700226download_packages(
227 name = "download_patchelf_deps",
228 packages = [
229 "patchelf",
230 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800231 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700232)
233
Brian Silverman50b9ac02018-08-12 13:24:10 -0700234# This list was obtained by manually looking at the output from:
235# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
236download_packages(
237 name = "download_arm_frc_gnueabi_deps",
238 packages = [
239 "libexpat1",
240 "libgmp10",
241 "libisl10",
242 "liblzma5",
243 "libmpc3",
244 "libmpfr4",
245 "libncurses5",
246 "libtinfo5",
247 "zlib1g",
248 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800249 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman50b9ac02018-08-12 13:24:10 -0700250)
251
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800252generate_deb_tarball(
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800253 name = "apache2",
254 files = apache2_debs,
255 target_compatible_with = ["@platforms//os:linux"],
256)
257
258generate_deb_tarball(
Philipp Schrader41011a12022-03-13 12:49:32 -0700259 name = "postgresql_amd64",
260 files = postgresql_amd64_debs,
261 target_compatible_with = ["@platforms//os:linux"],
262)
263
264generate_deb_tarball(
Brian Silverman7bda6212018-08-05 11:42:11 -0700265 name = "patch",
266 files = patch_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800267 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7bda6212018-08-05 11:42:11 -0700268)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700269
270generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700271 name = "rsync",
272 files = rsync_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800273 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh71f6fa72019-08-31 18:23:02 -0700274)
275
276generate_deb_tarball(
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800277 name = "ssh_v3",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700278 files = ssh_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800279 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh71f6fa72019-08-31 18:23:02 -0700280)
281
282generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700283 name = "pandoc",
284 files = pandoc_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800285 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7297c0c2018-08-05 13:43:00 -0700286)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700287
288generate_deb_tarball(
289 name = "libusb",
290 files = libusb_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800291 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4f6ba442018-08-05 14:34:58 -0700292)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700293
294generate_deb_tarball(
295 name = "mingw_compiler",
296 files = mingw_compiler_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800297 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700298)
Brian Silverman6470f442018-08-05 12:08:16 -0700299
300generate_deb_tarball(
301 name = "patchelf",
302 files = patchelf_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800303 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700304)
305
306generate_deb_tarball(
Brian Silverman50b9ac02018-08-12 13:24:10 -0700307 name = "arm_frc_gnueabi_deps",
308 files = arm_frc_gnueabi_deps_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800309 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman50b9ac02018-08-12 13:24:10 -0700310)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700311
312generate_deb_tarball(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700313 name = "gtk_runtime",
314 files = gtk_runtime_debs,
315 target_compatible_with = ["@platforms//os:linux"],
316)
317
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800318download_packages(
319 name = "download_opencv",
320 packages = [
321 "libopencv-calib3d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800322 "libopencv-calib3d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800323 "libopencv-contrib-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800324 "libopencv-contrib4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800325 "libopencv-core-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800326 "libopencv-core4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800327 "libopencv-dev",
328 "libopencv-features2d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800329 "libopencv-features2d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800330 "libopencv-flann-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800331 "libopencv-flann4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800332 "libopencv-highgui-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800333 "libopencv-highgui4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800334 "libopencv-imgcodecs-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800335 "libopencv-imgcodecs4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800336 "libopencv-imgproc-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800337 "libopencv-imgproc4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800338 "libopencv-ml-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800339 "libopencv-ml4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800340 "libopencv-objdetect-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800341 "libopencv-objdetect4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800342 "libopencv-photo-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800343 "libopencv-photo4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800344 "libopencv-shape-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800345 "libopencv-shape4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800346 "libopencv-stitching-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800347 "libopencv-stitching4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800348 "libopencv-superres-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800349 "libopencv-superres4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800350 "libopencv-video-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800351 "libopencv-video4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800352 "libopencv-videoio-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800353 "libopencv-videoio4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800354 "libopencv-videostab-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800355 "libopencv-videostab4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800356 "libopencv-viz-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800357 "libopencv-viz4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800358 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800359 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800360)
361
Brian Silvermand4260c72020-01-14 00:08:02 -0800362generate_deb_tarball(
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800363 name = "opencv_arm64",
364 files = opencv_arm64_debs,
365 target_compatible_with = ["@platforms//os:linux"],
366)
367
368generate_deb_tarball(
Brian Silverman4c7235a2021-11-17 19:04:37 -0800369 name = "opencv_armhf_v4",
Brian Silvermand4260c72020-01-14 00:08:02 -0800370 files = opencv_armhf_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800371 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermand4260c72020-01-14 00:08:02 -0800372)
373
Brian Silvermand97a47c2020-01-16 00:47:53 -0800374generate_deb_tarball(
375 name = "opencv_amd64",
376 files = opencv_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800377 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermand97a47c2020-01-16 00:47:53 -0800378)
379
Tyler Chatow60671d32020-02-26 19:49:30 -0800380generate_deb_tarball(
381 name = "gstreamer_amd64",
382 files = gstreamer_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800383 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow60671d32020-02-26 19:49:30 -0800384)
385
386generate_deb_tarball(
387 name = "gstreamer_armhf",
388 files = gstreamer_armhf_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800389 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow60671d32020-02-26 19:49:30 -0800390)
391
Tyler Chatow6eda82c2022-03-27 22:37:38 -0700392generate_deb_tarball(
393 name = "gstreamer_arm64",
394 files = gstreamer_arm64_debs,
395 target_compatible_with = ["@platforms//os:linux"],
396)
397
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700398download_packages(
399 name = "download_lzma",
400 packages = [
401 "liblzma-dev",
402 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800403 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700404)
405
406generate_deb_tarball(
407 name = "lzma_amd64",
408 files = lzma_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800409 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700410)
411
412generate_deb_tarball(
413 name = "lzma_arm64",
414 files = lzma_arm64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800415 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700416)
417
Tyler Chatow8a51ac62022-03-15 13:23:12 -0700418generate_deb_tarball(
419 name = "libtinfo5_amd64",
420 files = libtinfo5_amd64_debs,
421 target_compatible_with = ["@platforms//os:linux"],
422)
423
Tyler Chatowec100e22022-03-22 16:23:04 -0700424generate_deb_tarball(
425 name = "libtinfo5_arm64",
426 files = libtinfo5_arm64_debs,
427 target_compatible_with = ["@platforms//os:linux"],
428)
429
Philipp Schraderf60e7d72023-02-19 17:07:22 -0800430download_packages(
431 name = "download_xvfb_packages",
432 excludes = [
433 "libglx-mesa0",
434 ],
435 packages = [
436 "xvfb",
437 ],
438)
439
440generate_deb_tarball(
441 name = "xvfb_amd64",
442 files = xvfb_amd64_debs,
443 target_compatible_with = ["@platforms//os:linux"],
444)
445
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800446exports_files([
447 "ssh_wrapper.sh",
Austin Schuh86110712022-09-16 15:40:54 -0700448 "curl.BUILD",
449 "BUILD.zlib.bazel",
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800450])