blob: 35cdde8e6c26a8b35558da8f157ef3acc275e168 [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(
Brian Silvermand97a47c2020-01-16 00:47:53 -080046 ":opencv_amd64.bzl",
47 opencv_amd64_debs = "files",
48)
Tyler Chatow60671d32020-02-26 19:49:30 -080049load(
50 ":gstreamer_amd64.bzl",
51 gstreamer_amd64_debs = "files",
52)
53load(
Tyler Chatow6eda82c2022-03-27 22:37:38 -070054 ":gstreamer_arm64.bzl",
55 gstreamer_arm64_debs = "files",
56)
57load(
Brian Silvermanf59fe3f2020-09-22 21:04:09 -070058 ":lzma_amd64.bzl",
59 lzma_amd64_debs = "files",
60)
61load(
62 ":lzma_arm64.bzl",
63 lzma_arm64_debs = "files",
64)
Tyler Chatow8a51ac62022-03-15 13:23:12 -070065load(
66 ":libtinfo5_amd64.bzl",
67 libtinfo5_amd64_debs = "files",
68)
Tyler Chatowec100e22022-03-22 16:23:04 -070069load(
70 ":libtinfo5_arm64.bzl",
71 libtinfo5_arm64_debs = "files",
72)
Philipp Schraderf60e7d72023-02-19 17:07:22 -080073load(
74 ":xvfb_amd64.bzl",
75 xvfb_amd64_debs = "files",
76)
Brian Silvermanf59fe3f2020-09-22 21:04:09 -070077load(":packages.bzl", "download_packages", "generate_deb_tarball")
Philipp Schrader0e19c602018-03-07 21:07:22 -080078
Philipp Schradercc016b32021-12-30 08:59:58 -080079package(default_visibility = ["//visibility:public"])
80
Philipp Schrader0e19c602018-03-07 21:07:22 -080081py_binary(
82 name = "download_packages",
83 srcs = [
84 "download_packages.py",
85 ],
Philipp Schrader0e19c602018-03-07 21:07:22 -080086 main = "download_packages.py",
Philipp Schraderdada1072020-11-24 11:34:46 -080087 target_compatible_with = ["@platforms//os:linux"],
Philipp Schrader0e19c602018-03-07 21:07:22 -080088)
89
90download_packages(
Philipp Schraderd0e33a42022-01-22 21:55:15 -080091 name = "download_apache2_packages",
92 excludes = [
93 "libaprutil1-dbd-mysql",
94 "libaprutil1-dbd-odbc",
95 "libaprutil1-dbd-pgsql",
96 "libaprutil1-dbd-freetds",
97 "libstdc++6",
98 "lsb-base",
99 "debconf",
100 "libc6-dev",
101 ],
102 force_includes = [
103 "libaprutil1",
104 ],
105 packages = [
106 "apache2",
107 ],
108)
109
110download_packages(
James Kuszmaulc6ea63a2023-09-06 20:36:46 -0700111 name = "download_rsync_packages",
112 excludes = [
113 ],
114 packages = [
115 "rsync",
116 ],
117)
118
119download_packages(
120 name = "download_ssh_packages",
121 excludes = [
122 "libcbor0.8",
123 "libsemanage2",
124 "libsepol2",
125 ],
126 packages = [
127 "ssh",
128 ],
129)
130
131download_packages(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700132 name = "download_gtk_runtime",
133 excludes = [
134 "libstdc++6",
135 "lsb-base",
136 "libglib2.0-dev-bin",
137 "fonts-freefont",
138 "gsettings-backend",
139 "libpng-dev",
140 "libz-dev",
141 "libstdc++-dev",
142 "libc6-dev",
143 ],
144 # Since "libglib2.0-0" pulls in glibc, we need to forcibly remove it again.
145 force_excludes = [
146 "libc6",
147 "libgcc-s1",
148 ],
149 force_includes = [
150 "libglib2.0-0",
151 ],
152 packages = [
153 "gir1.2-gtk-3.0",
154 "libgtk-3-dev",
Philipp Schrader7520ee62022-12-10 14:04:40 -0800155 "librsvg2-common",
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700156 ],
157)
158
159download_packages(
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800160 name = "download_clang_deps",
161 excludes = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800162 "lib32stdc++6",
163 "libstdc++6",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800164 ],
165 force_includes = [
166 "libc6",
167 "libc6-dev",
168 ],
169 packages = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800170 "clang-6.0",
171 "clang-format-6.0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800172 "gcc",
173 "gfortran",
174 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800175 target_compatible_with = ["@platforms//os:linux"],
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800176)
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(
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800262 name = "apache2",
263 files = apache2_debs,
264 target_compatible_with = ["@platforms//os:linux"],
265)
266
267generate_deb_tarball(
Philipp Schrader41011a12022-03-13 12:49:32 -0700268 name = "postgresql_amd64",
269 files = postgresql_amd64_debs,
270 target_compatible_with = ["@platforms//os:linux"],
271)
272
273generate_deb_tarball(
Brian Silverman7bda6212018-08-05 11:42:11 -0700274 name = "patch",
275 files = patch_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800276 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7bda6212018-08-05 11:42:11 -0700277)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700278
279generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700280 name = "rsync",
281 files = rsync_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800282 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh71f6fa72019-08-31 18:23:02 -0700283)
284
285generate_deb_tarball(
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800286 name = "ssh_v3",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700287 files = ssh_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 Silverman7297c0c2018-08-05 13:43:00 -0700292 name = "pandoc",
293 files = pandoc_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800294 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7297c0c2018-08-05 13:43:00 -0700295)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700296
297generate_deb_tarball(
298 name = "libusb",
299 files = libusb_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800300 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4f6ba442018-08-05 14:34:58 -0700301)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700302
303generate_deb_tarball(
304 name = "mingw_compiler",
305 files = mingw_compiler_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800306 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700307)
Brian Silverman6470f442018-08-05 12:08:16 -0700308
309generate_deb_tarball(
310 name = "patchelf",
311 files = patchelf_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800312 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700313)
314
315generate_deb_tarball(
Brian Silverman50b9ac02018-08-12 13:24:10 -0700316 name = "arm_frc_gnueabi_deps",
317 files = arm_frc_gnueabi_deps_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800318 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman50b9ac02018-08-12 13:24:10 -0700319)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700320
321generate_deb_tarball(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700322 name = "gtk_runtime",
323 files = gtk_runtime_debs,
324 target_compatible_with = ["@platforms//os:linux"],
325)
326
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800327download_packages(
328 name = "download_opencv",
329 packages = [
330 "libopencv-calib3d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800331 "libopencv-calib3d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800332 "libopencv-contrib-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800333 "libopencv-contrib4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800334 "libopencv-core-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800335 "libopencv-core4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800336 "libopencv-dev",
337 "libopencv-features2d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800338 "libopencv-features2d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800339 "libopencv-flann-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800340 "libopencv-flann4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800341 "libopencv-highgui-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800342 "libopencv-highgui4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800343 "libopencv-imgcodecs-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800344 "libopencv-imgcodecs4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800345 "libopencv-imgproc-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800346 "libopencv-imgproc4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800347 "libopencv-ml-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800348 "libopencv-ml4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800349 "libopencv-objdetect-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800350 "libopencv-objdetect4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800351 "libopencv-photo-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800352 "libopencv-photo4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800353 "libopencv-shape-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800354 "libopencv-shape4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800355 "libopencv-stitching-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800356 "libopencv-stitching4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800357 "libopencv-superres-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800358 "libopencv-superres4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800359 "libopencv-video-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800360 "libopencv-video4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800361 "libopencv-videoio-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800362 "libopencv-videoio4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800363 "libopencv-videostab-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800364 "libopencv-videostab4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800365 "libopencv-viz-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800366 "libopencv-viz4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800367 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800368 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800369)
370
Brian Silvermand4260c72020-01-14 00:08:02 -0800371generate_deb_tarball(
Brian Silvermand97a47c2020-01-16 00:47:53 -0800372 name = "opencv_amd64",
373 files = opencv_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800374 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermand97a47c2020-01-16 00:47:53 -0800375)
376
Tyler Chatow60671d32020-02-26 19:49:30 -0800377generate_deb_tarball(
378 name = "gstreamer_amd64",
379 files = gstreamer_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800380 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow60671d32020-02-26 19:49:30 -0800381)
382
383generate_deb_tarball(
Tyler Chatow6eda82c2022-03-27 22:37:38 -0700384 name = "gstreamer_arm64",
385 files = gstreamer_arm64_debs,
386 target_compatible_with = ["@platforms//os:linux"],
387)
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])