blob: 80e1da1b740a4d0728d304a567ffb8b1f0f5adab [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(
Brian Silverman50b9ac02018-08-12 13:24:10 -07006 ":arm_frc_gnueabi_deps.bzl",
7 arm_frc_gnueabi_deps_debs = "files",
8)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -07009load(
Austin Schuh8f99c822024-05-05 22:43:40 -070010 ":clang_amd64.bzl",
11 clang_amd64_debs = "files",
Brian Silvermand97a47c2020-01-16 00:47:53 -080012)
Tyler Chatow60671d32020-02-26 19:49:30 -080013load(
14 ":gstreamer_amd64.bzl",
15 gstreamer_amd64_debs = "files",
16)
17load(
Austin Schuh8f99c822024-05-05 22:43:40 -070018 ":gtk_runtime.bzl",
19 gtk_runtime_debs = "files",
Brian Silvermanf59fe3f2020-09-22 21:04:09 -070020)
Tyler Chatow8a51ac62022-03-15 13:23:12 -070021load(
22 ":libtinfo5_amd64.bzl",
23 libtinfo5_amd64_debs = "files",
24)
Tyler Chatowec100e22022-03-22 16:23:04 -070025load(
26 ":libtinfo5_arm64.bzl",
27 libtinfo5_arm64_debs = "files",
28)
Philipp Schraderf60e7d72023-02-19 17:07:22 -080029load(
Austin Schuh8f99c822024-05-05 22:43:40 -070030 ":libusb.bzl",
31 libusb_debs = "files",
32)
33load(
34 ":lzma_amd64.bzl",
35 lzma_amd64_debs = "files",
36)
37load(
38 ":lzma_arm64.bzl",
39 lzma_arm64_debs = "files",
40)
41load(
42 ":mingw_compiler.bzl",
43 mingw_compiler_debs = "files",
44)
45load(
46 ":opencv_amd64.bzl",
47 opencv_amd64_debs = "files",
48)
49load(":packages.bzl", "download_packages", "generate_deb_tarball")
50load(
51 ":pandoc.bzl",
52 pandoc_debs = "files",
53)
54load(
55 ":patch.bzl",
56 patch_debs = "files",
57)
58load(
59 ":patchelf.bzl",
60 patchelf_debs = "files",
61)
62load(
Maxwell Henderson8108e992024-05-07 22:00:22 -070063 ":phoenix6.bzl",
64 phoenix6_debs = "files",
65)
66load(
Austin Schuh8f99c822024-05-05 22:43:40 -070067 ":postgresql_amd64.bzl",
68 postgresql_amd64_debs = "files",
69)
70load(
71 ":rsync.bzl",
72 rsync_debs = "files",
73)
74load(
75 ":ssh.bzl",
76 ssh_debs = "files",
77)
78load(
Philipp Schraderf60e7d72023-02-19 17:07:22 -080079 ":xvfb_amd64.bzl",
80 xvfb_amd64_debs = "files",
81)
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",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800165 packages = [
Austin Schuh94dbdf32024-04-11 22:51:09 -0700166 "libtinfo5",
167 "libxml2",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800168 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800169 target_compatible_with = ["@platforms//os:linux"],
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800170)
171
Austin Schuh94dbdf32024-04-11 22:51:09 -0700172generate_deb_tarball(
173 name = "clang_amd64",
174 files = clang_amd64_debs,
175 target_compatible_with = ["@platforms//os:linux"],
176)
177
Brian Silverman7bda6212018-08-05 11:42:11 -0700178download_packages(
Philipp Schrader41011a12022-03-13 12:49:32 -0700179 name = "download_postgresql_deps",
180 excludes = [
181 "adduser",
182 "debconf",
183 "debconf-2.0",
184 "libsystemd0",
185 "lsb-base",
186 "libstdc++6",
187 "libc-bin",
188 "libc-l10n",
189 "netbase",
190 "ucf",
191 "locales",
192 "locales-all",
193 ],
194 packages = [
195 "postgresql",
196 ],
197 target_compatible_with = ["@platforms//os:linux"],
198)
199
200download_packages(
Brian Silverman7bda6212018-08-05 11:42:11 -0700201 name = "download_patch_deps",
202 packages = [
203 "patch",
204 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800205 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7bda6212018-08-05 11:42:11 -0700206)
207
Brian Silverman7297c0c2018-08-05 13:43:00 -0700208download_packages(
209 name = "download_pandoc_deps",
210 packages = [
211 "pandoc",
212 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800213 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7297c0c2018-08-05 13:43:00 -0700214)
215
Brian Silverman4f6ba442018-08-05 14:34:58 -0700216download_packages(
217 name = "download_libusb_deps",
218 packages = [
219 "libusb-0.1-4",
220 "libusb-1.0-0",
221 "libusb-1.0-0-dev",
222 "libusb-dev",
223 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800224 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4f6ba442018-08-05 14:34:58 -0700225)
226
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700227download_packages(
228 name = "download_mingw_compiler_deps",
229 packages = [
230 "g++-mingw-w64-x86-64",
231 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800232 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700233)
234
Brian Silverman6470f442018-08-05 12:08:16 -0700235download_packages(
236 name = "download_patchelf_deps",
237 packages = [
238 "patchelf",
239 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800240 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700241)
242
Brian Silverman50b9ac02018-08-12 13:24:10 -0700243# This list was obtained by manually looking at the output from:
244# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
245download_packages(
246 name = "download_arm_frc_gnueabi_deps",
247 packages = [
248 "libexpat1",
249 "libgmp10",
250 "libisl10",
251 "liblzma5",
252 "libmpc3",
253 "libmpfr4",
254 "libncurses5",
255 "libtinfo5",
256 "zlib1g",
257 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800258 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman50b9ac02018-08-12 13:24:10 -0700259)
260
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800261generate_deb_tarball(
Maxwell Henderson8108e992024-05-07 22:00:22 -0700262 name = "phoenix6",
263 files = phoenix6_debs,
264 target_compatible_with = ["@platforms//os:linux"],
265)
266
267generate_deb_tarball(
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800268 name = "apache2",
269 files = apache2_debs,
270 target_compatible_with = ["@platforms//os:linux"],
271)
272
273generate_deb_tarball(
Philipp Schrader41011a12022-03-13 12:49:32 -0700274 name = "postgresql_amd64",
275 files = postgresql_amd64_debs,
276 target_compatible_with = ["@platforms//os:linux"],
277)
278
279generate_deb_tarball(
Brian Silverman7bda6212018-08-05 11:42:11 -0700280 name = "patch",
281 files = patch_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800282 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7bda6212018-08-05 11:42:11 -0700283)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700284
285generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700286 name = "rsync",
287 files = rsync_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800288 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh71f6fa72019-08-31 18:23:02 -0700289)
290
291generate_deb_tarball(
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800292 name = "ssh_v3",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700293 files = ssh_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800294 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh71f6fa72019-08-31 18:23:02 -0700295)
296
297generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700298 name = "pandoc",
299 files = pandoc_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800300 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7297c0c2018-08-05 13:43:00 -0700301)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700302
303generate_deb_tarball(
304 name = "libusb",
305 files = libusb_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800306 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4f6ba442018-08-05 14:34:58 -0700307)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700308
309generate_deb_tarball(
310 name = "mingw_compiler",
311 files = mingw_compiler_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800312 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700313)
Brian Silverman6470f442018-08-05 12:08:16 -0700314
315generate_deb_tarball(
316 name = "patchelf",
317 files = patchelf_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800318 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700319)
320
321generate_deb_tarball(
Brian Silverman50b9ac02018-08-12 13:24:10 -0700322 name = "arm_frc_gnueabi_deps",
323 files = arm_frc_gnueabi_deps_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800324 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman50b9ac02018-08-12 13:24:10 -0700325)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700326
327generate_deb_tarball(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700328 name = "gtk_runtime",
329 files = gtk_runtime_debs,
330 target_compatible_with = ["@platforms//os:linux"],
331)
332
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800333download_packages(
334 name = "download_opencv",
335 packages = [
336 "libopencv-calib3d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800337 "libopencv-calib3d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800338 "libopencv-contrib-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800339 "libopencv-contrib4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800340 "libopencv-core-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800341 "libopencv-core4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800342 "libopencv-dev",
343 "libopencv-features2d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800344 "libopencv-features2d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800345 "libopencv-flann-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800346 "libopencv-flann4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800347 "libopencv-highgui-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800348 "libopencv-highgui4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800349 "libopencv-imgcodecs-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800350 "libopencv-imgcodecs4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800351 "libopencv-imgproc-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800352 "libopencv-imgproc4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800353 "libopencv-ml-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800354 "libopencv-ml4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800355 "libopencv-objdetect-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800356 "libopencv-objdetect4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800357 "libopencv-photo-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800358 "libopencv-photo4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800359 "libopencv-shape-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800360 "libopencv-shape4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800361 "libopencv-stitching-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800362 "libopencv-stitching4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800363 "libopencv-superres-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800364 "libopencv-superres4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800365 "libopencv-video-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800366 "libopencv-video4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800367 "libopencv-videoio-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800368 "libopencv-videoio4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800369 "libopencv-videostab-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800370 "libopencv-videostab4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800371 "libopencv-viz-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800372 "libopencv-viz4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800373 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800374 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800375)
376
Brian Silvermand4260c72020-01-14 00:08:02 -0800377generate_deb_tarball(
Brian Silvermand97a47c2020-01-16 00:47:53 -0800378 name = "opencv_amd64",
379 files = opencv_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800380 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermand97a47c2020-01-16 00:47:53 -0800381)
382
Tyler Chatow60671d32020-02-26 19:49:30 -0800383generate_deb_tarball(
384 name = "gstreamer_amd64",
385 files = gstreamer_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800386 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow60671d32020-02-26 19:49:30 -0800387)
388
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700389download_packages(
390 name = "download_lzma",
391 packages = [
392 "liblzma-dev",
393 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800394 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700395)
396
397generate_deb_tarball(
398 name = "lzma_amd64",
399 files = lzma_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800400 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700401)
402
403generate_deb_tarball(
404 name = "lzma_arm64",
405 files = lzma_arm64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800406 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700407)
408
Tyler Chatow8a51ac62022-03-15 13:23:12 -0700409generate_deb_tarball(
410 name = "libtinfo5_amd64",
411 files = libtinfo5_amd64_debs,
412 target_compatible_with = ["@platforms//os:linux"],
413)
414
Tyler Chatowec100e22022-03-22 16:23:04 -0700415generate_deb_tarball(
416 name = "libtinfo5_arm64",
417 files = libtinfo5_arm64_debs,
418 target_compatible_with = ["@platforms//os:linux"],
419)
420
Philipp Schraderf60e7d72023-02-19 17:07:22 -0800421download_packages(
422 name = "download_xvfb_packages",
423 excludes = [
424 "libglx-mesa0",
425 ],
426 packages = [
427 "xvfb",
428 ],
429)
430
431generate_deb_tarball(
432 name = "xvfb_amd64",
433 files = xvfb_amd64_debs,
434 target_compatible_with = ["@platforms//os:linux"],
435)
436
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800437exports_files([
438 "ssh_wrapper.sh",
James Kuszmaulc6ea63a2023-09-06 20:36:46 -0700439 "rsync_wrapper.sh",
Austin Schuh86110712022-09-16 15:40:54 -0700440 "curl.BUILD",
441 "BUILD.zlib.bazel",
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800442])