blob: a7b3b97f6c462dae51db0b8adfa90dd77c7e1fe5 [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(
Brian Silvermanf59fe3f2020-09-22 21:04:09 -070054 ":lzma_amd64.bzl",
55 lzma_amd64_debs = "files",
56)
57load(
58 ":lzma_arm64.bzl",
59 lzma_arm64_debs = "files",
60)
Tyler Chatow8a51ac62022-03-15 13:23:12 -070061load(
62 ":libtinfo5_amd64.bzl",
63 libtinfo5_amd64_debs = "files",
64)
Tyler Chatowec100e22022-03-22 16:23:04 -070065load(
66 ":libtinfo5_arm64.bzl",
67 libtinfo5_arm64_debs = "files",
68)
Philipp Schraderf60e7d72023-02-19 17:07:22 -080069load(
70 ":xvfb_amd64.bzl",
71 xvfb_amd64_debs = "files",
72)
Austin Schuh94dbdf32024-04-11 22:51:09 -070073load(
74 ":clang_amd64.bzl",
75 clang_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",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800161 packages = [
Austin Schuh94dbdf32024-04-11 22:51:09 -0700162 "libtinfo5",
163 "libxml2",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800164 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800165 target_compatible_with = ["@platforms//os:linux"],
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800166)
167
Austin Schuh94dbdf32024-04-11 22:51:09 -0700168generate_deb_tarball(
169 name = "clang_amd64",
170 files = clang_amd64_debs,
171 target_compatible_with = ["@platforms//os:linux"],
172)
173
Brian Silverman7bda6212018-08-05 11:42:11 -0700174download_packages(
Philipp Schrader41011a12022-03-13 12:49:32 -0700175 name = "download_postgresql_deps",
176 excludes = [
177 "adduser",
178 "debconf",
179 "debconf-2.0",
180 "libsystemd0",
181 "lsb-base",
182 "libstdc++6",
183 "libc-bin",
184 "libc-l10n",
185 "netbase",
186 "ucf",
187 "locales",
188 "locales-all",
189 ],
190 packages = [
191 "postgresql",
192 ],
193 target_compatible_with = ["@platforms//os:linux"],
194)
195
196download_packages(
Brian Silverman7bda6212018-08-05 11:42:11 -0700197 name = "download_patch_deps",
198 packages = [
199 "patch",
200 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800201 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7bda6212018-08-05 11:42:11 -0700202)
203
Brian Silverman7297c0c2018-08-05 13:43:00 -0700204download_packages(
205 name = "download_pandoc_deps",
206 packages = [
207 "pandoc",
208 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800209 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7297c0c2018-08-05 13:43:00 -0700210)
211
Brian Silverman4f6ba442018-08-05 14:34:58 -0700212download_packages(
213 name = "download_libusb_deps",
214 packages = [
215 "libusb-0.1-4",
216 "libusb-1.0-0",
217 "libusb-1.0-0-dev",
218 "libusb-dev",
219 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800220 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4f6ba442018-08-05 14:34:58 -0700221)
222
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700223download_packages(
224 name = "download_mingw_compiler_deps",
225 packages = [
226 "g++-mingw-w64-x86-64",
227 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800228 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700229)
230
Brian Silverman6470f442018-08-05 12:08:16 -0700231download_packages(
232 name = "download_patchelf_deps",
233 packages = [
234 "patchelf",
235 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800236 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700237)
238
Brian Silverman50b9ac02018-08-12 13:24:10 -0700239# This list was obtained by manually looking at the output from:
240# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
241download_packages(
242 name = "download_arm_frc_gnueabi_deps",
243 packages = [
244 "libexpat1",
245 "libgmp10",
246 "libisl10",
247 "liblzma5",
248 "libmpc3",
249 "libmpfr4",
250 "libncurses5",
251 "libtinfo5",
252 "zlib1g",
253 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800254 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman50b9ac02018-08-12 13:24:10 -0700255)
256
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800257generate_deb_tarball(
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800258 name = "apache2",
259 files = apache2_debs,
260 target_compatible_with = ["@platforms//os:linux"],
261)
262
263generate_deb_tarball(
Philipp Schrader41011a12022-03-13 12:49:32 -0700264 name = "postgresql_amd64",
265 files = postgresql_amd64_debs,
266 target_compatible_with = ["@platforms//os:linux"],
267)
268
269generate_deb_tarball(
Brian Silverman7bda6212018-08-05 11:42:11 -0700270 name = "patch",
271 files = patch_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800272 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7bda6212018-08-05 11:42:11 -0700273)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700274
275generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700276 name = "rsync",
277 files = rsync_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800278 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh71f6fa72019-08-31 18:23:02 -0700279)
280
281generate_deb_tarball(
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800282 name = "ssh_v3",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700283 files = ssh_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800284 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh71f6fa72019-08-31 18:23:02 -0700285)
286
287generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700288 name = "pandoc",
289 files = pandoc_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800290 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7297c0c2018-08-05 13:43:00 -0700291)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700292
293generate_deb_tarball(
294 name = "libusb",
295 files = libusb_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800296 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4f6ba442018-08-05 14:34:58 -0700297)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700298
299generate_deb_tarball(
300 name = "mingw_compiler",
301 files = mingw_compiler_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800302 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700303)
Brian Silverman6470f442018-08-05 12:08:16 -0700304
305generate_deb_tarball(
306 name = "patchelf",
307 files = patchelf_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800308 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700309)
310
311generate_deb_tarball(
Brian Silverman50b9ac02018-08-12 13:24:10 -0700312 name = "arm_frc_gnueabi_deps",
313 files = arm_frc_gnueabi_deps_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800314 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman50b9ac02018-08-12 13:24:10 -0700315)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700316
317generate_deb_tarball(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700318 name = "gtk_runtime",
319 files = gtk_runtime_debs,
320 target_compatible_with = ["@platforms//os:linux"],
321)
322
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800323download_packages(
324 name = "download_opencv",
325 packages = [
326 "libopencv-calib3d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800327 "libopencv-calib3d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800328 "libopencv-contrib-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800329 "libopencv-contrib4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800330 "libopencv-core-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800331 "libopencv-core4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800332 "libopencv-dev",
333 "libopencv-features2d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800334 "libopencv-features2d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800335 "libopencv-flann-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800336 "libopencv-flann4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800337 "libopencv-highgui-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800338 "libopencv-highgui4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800339 "libopencv-imgcodecs-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800340 "libopencv-imgcodecs4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800341 "libopencv-imgproc-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800342 "libopencv-imgproc4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800343 "libopencv-ml-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800344 "libopencv-ml4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800345 "libopencv-objdetect-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800346 "libopencv-objdetect4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800347 "libopencv-photo-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800348 "libopencv-photo4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800349 "libopencv-shape-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800350 "libopencv-shape4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800351 "libopencv-stitching-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800352 "libopencv-stitching4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800353 "libopencv-superres-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800354 "libopencv-superres4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800355 "libopencv-video-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800356 "libopencv-video4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800357 "libopencv-videoio-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800358 "libopencv-videoio4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800359 "libopencv-videostab-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800360 "libopencv-videostab4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800361 "libopencv-viz-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800362 "libopencv-viz4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800363 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800364 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800365)
366
Brian Silvermand4260c72020-01-14 00:08:02 -0800367generate_deb_tarball(
Brian Silvermand97a47c2020-01-16 00:47:53 -0800368 name = "opencv_amd64",
369 files = opencv_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800370 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermand97a47c2020-01-16 00:47:53 -0800371)
372
Tyler Chatow60671d32020-02-26 19:49:30 -0800373generate_deb_tarball(
374 name = "gstreamer_amd64",
375 files = gstreamer_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800376 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow60671d32020-02-26 19:49:30 -0800377)
378
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700379download_packages(
380 name = "download_lzma",
381 packages = [
382 "liblzma-dev",
383 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800384 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700385)
386
387generate_deb_tarball(
388 name = "lzma_amd64",
389 files = lzma_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800390 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700391)
392
393generate_deb_tarball(
394 name = "lzma_arm64",
395 files = lzma_arm64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800396 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700397)
398
Tyler Chatow8a51ac62022-03-15 13:23:12 -0700399generate_deb_tarball(
400 name = "libtinfo5_amd64",
401 files = libtinfo5_amd64_debs,
402 target_compatible_with = ["@platforms//os:linux"],
403)
404
Tyler Chatowec100e22022-03-22 16:23:04 -0700405generate_deb_tarball(
406 name = "libtinfo5_arm64",
407 files = libtinfo5_arm64_debs,
408 target_compatible_with = ["@platforms//os:linux"],
409)
410
Philipp Schraderf60e7d72023-02-19 17:07:22 -0800411download_packages(
412 name = "download_xvfb_packages",
413 excludes = [
414 "libglx-mesa0",
415 ],
416 packages = [
417 "xvfb",
418 ],
419)
420
421generate_deb_tarball(
422 name = "xvfb_amd64",
423 files = xvfb_amd64_debs,
424 target_compatible_with = ["@platforms//os:linux"],
425)
426
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800427exports_files([
428 "ssh_wrapper.sh",
James Kuszmaulc6ea63a2023-09-06 20:36:46 -0700429 "rsync_wrapper.sh",
Austin Schuh86110712022-09-16 15:40:54 -0700430 "curl.BUILD",
431 "BUILD.zlib.bazel",
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800432])