blob: ca6d13481cf35eb9a6e0c54ac32b7eb90f0ac615 [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)
Brian Silvermanf59fe3f2020-09-22 21:04:09 -070085load(":packages.bzl", "download_packages", "generate_deb_tarball")
Philipp Schrader0e19c602018-03-07 21:07:22 -080086
Philipp Schradercc016b32021-12-30 08:59:58 -080087package(default_visibility = ["//visibility:public"])
88
Philipp Schrader0e19c602018-03-07 21:07:22 -080089py_binary(
90 name = "download_packages",
91 srcs = [
92 "download_packages.py",
93 ],
Philipp Schrader0e19c602018-03-07 21:07:22 -080094 main = "download_packages.py",
Philipp Schraderdada1072020-11-24 11:34:46 -080095 target_compatible_with = ["@platforms//os:linux"],
Philipp Schrader0e19c602018-03-07 21:07:22 -080096)
97
98download_packages(
Philipp Schraderd0e33a42022-01-22 21:55:15 -080099 name = "download_apache2_packages",
100 excludes = [
101 "libaprutil1-dbd-mysql",
102 "libaprutil1-dbd-odbc",
103 "libaprutil1-dbd-pgsql",
104 "libaprutil1-dbd-freetds",
105 "libstdc++6",
106 "lsb-base",
107 "debconf",
108 "libc6-dev",
109 ],
110 force_includes = [
111 "libaprutil1",
112 ],
113 packages = [
114 "apache2",
115 ],
116)
117
118download_packages(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700119 name = "download_gtk_runtime",
120 excludes = [
121 "libstdc++6",
122 "lsb-base",
123 "libglib2.0-dev-bin",
124 "fonts-freefont",
125 "gsettings-backend",
126 "libpng-dev",
127 "libz-dev",
128 "libstdc++-dev",
129 "libc6-dev",
130 ],
131 # Since "libglib2.0-0" pulls in glibc, we need to forcibly remove it again.
132 force_excludes = [
133 "libc6",
134 "libgcc-s1",
135 ],
136 force_includes = [
137 "libglib2.0-0",
138 ],
139 packages = [
140 "gir1.2-gtk-3.0",
141 "libgtk-3-dev",
Philipp Schrader7520ee62022-12-10 14:04:40 -0800142 "librsvg2-common",
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700143 ],
144)
145
146download_packages(
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800147 name = "download_clang_deps",
148 excludes = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800149 "lib32stdc++6",
150 "libstdc++6",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800151 ],
152 force_includes = [
153 "libc6",
154 "libc6-dev",
155 ],
156 packages = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800157 "clang-6.0",
158 "clang-format-6.0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800159 "gcc",
160 "gfortran",
161 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800162 target_compatible_with = ["@platforms//os:linux"],
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800163)
164
Brian Silverman7bda6212018-08-05 11:42:11 -0700165download_packages(
Philipp Schrader41011a12022-03-13 12:49:32 -0700166 name = "download_postgresql_deps",
167 excludes = [
168 "adduser",
169 "debconf",
170 "debconf-2.0",
171 "libsystemd0",
172 "lsb-base",
173 "libstdc++6",
174 "libc-bin",
175 "libc-l10n",
176 "netbase",
177 "ucf",
178 "locales",
179 "locales-all",
180 ],
181 packages = [
182 "postgresql",
183 ],
184 target_compatible_with = ["@platforms//os:linux"],
185)
186
187download_packages(
Brian Silverman7bda6212018-08-05 11:42:11 -0700188 name = "download_patch_deps",
189 packages = [
190 "patch",
191 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800192 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7bda6212018-08-05 11:42:11 -0700193)
194
Brian Silverman7297c0c2018-08-05 13:43:00 -0700195download_packages(
196 name = "download_pandoc_deps",
197 packages = [
198 "pandoc",
199 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800200 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7297c0c2018-08-05 13:43:00 -0700201)
202
Brian Silverman4f6ba442018-08-05 14:34:58 -0700203download_packages(
204 name = "download_libusb_deps",
205 packages = [
206 "libusb-0.1-4",
207 "libusb-1.0-0",
208 "libusb-1.0-0-dev",
209 "libusb-dev",
210 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800211 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4f6ba442018-08-05 14:34:58 -0700212)
213
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700214download_packages(
215 name = "download_mingw_compiler_deps",
216 packages = [
217 "g++-mingw-w64-x86-64",
218 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800219 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700220)
221
Brian Silverman6470f442018-08-05 12:08:16 -0700222download_packages(
223 name = "download_patchelf_deps",
224 packages = [
225 "patchelf",
226 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800227 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700228)
229
Brian Silverman50b9ac02018-08-12 13:24:10 -0700230# This list was obtained by manually looking at the output from:
231# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
232download_packages(
233 name = "download_arm_frc_gnueabi_deps",
234 packages = [
235 "libexpat1",
236 "libgmp10",
237 "libisl10",
238 "liblzma5",
239 "libmpc3",
240 "libmpfr4",
241 "libncurses5",
242 "libtinfo5",
243 "zlib1g",
244 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800245 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman50b9ac02018-08-12 13:24:10 -0700246)
247
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800248generate_deb_tarball(
Philipp Schraderd0e33a42022-01-22 21:55:15 -0800249 name = "apache2",
250 files = apache2_debs,
251 target_compatible_with = ["@platforms//os:linux"],
252)
253
254generate_deb_tarball(
Philipp Schrader41011a12022-03-13 12:49:32 -0700255 name = "postgresql_amd64",
256 files = postgresql_amd64_debs,
257 target_compatible_with = ["@platforms//os:linux"],
258)
259
260generate_deb_tarball(
Brian Silverman7bda6212018-08-05 11:42:11 -0700261 name = "patch",
262 files = patch_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800263 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7bda6212018-08-05 11:42:11 -0700264)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700265
266generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700267 name = "rsync",
268 files = rsync_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800269 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh71f6fa72019-08-31 18:23:02 -0700270)
271
272generate_deb_tarball(
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800273 name = "ssh_v3",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700274 files = ssh_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800275 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh71f6fa72019-08-31 18:23:02 -0700276)
277
278generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700279 name = "pandoc",
280 files = pandoc_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800281 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7297c0c2018-08-05 13:43:00 -0700282)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700283
284generate_deb_tarball(
285 name = "libusb",
286 files = libusb_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800287 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman4f6ba442018-08-05 14:34:58 -0700288)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700289
290generate_deb_tarball(
291 name = "mingw_compiler",
292 files = mingw_compiler_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800293 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700294)
Brian Silverman6470f442018-08-05 12:08:16 -0700295
296generate_deb_tarball(
297 name = "patchelf",
298 files = patchelf_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800299 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman6470f442018-08-05 12:08:16 -0700300)
301
302generate_deb_tarball(
Brian Silverman50b9ac02018-08-12 13:24:10 -0700303 name = "arm_frc_gnueabi_deps",
304 files = arm_frc_gnueabi_deps_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800305 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman50b9ac02018-08-12 13:24:10 -0700306)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700307
308generate_deb_tarball(
Philipp Schraderfd5489f2022-09-17 17:31:09 -0700309 name = "gtk_runtime",
310 files = gtk_runtime_debs,
311 target_compatible_with = ["@platforms//os:linux"],
312)
313
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800314download_packages(
315 name = "download_opencv",
316 packages = [
317 "libopencv-calib3d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800318 "libopencv-calib3d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800319 "libopencv-contrib-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800320 "libopencv-contrib4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800321 "libopencv-core-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800322 "libopencv-core4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800323 "libopencv-dev",
324 "libopencv-features2d-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800325 "libopencv-features2d4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800326 "libopencv-flann-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800327 "libopencv-flann4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800328 "libopencv-highgui-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800329 "libopencv-highgui4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800330 "libopencv-imgcodecs-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800331 "libopencv-imgcodecs4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800332 "libopencv-imgproc-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800333 "libopencv-imgproc4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800334 "libopencv-ml-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800335 "libopencv-ml4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800336 "libopencv-objdetect-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800337 "libopencv-objdetect4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800338 "libopencv-photo-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800339 "libopencv-photo4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800340 "libopencv-shape-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800341 "libopencv-shape4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800342 "libopencv-stitching-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800343 "libopencv-stitching4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800344 "libopencv-superres-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800345 "libopencv-superres4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800346 "libopencv-video-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800347 "libopencv-video4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800348 "libopencv-videoio-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800349 "libopencv-videoio4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800350 "libopencv-videostab-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800351 "libopencv-videostab4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800352 "libopencv-viz-dev",
Brian Silverman4c7235a2021-11-17 19:04:37 -0800353 "libopencv-viz4.5",
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800354 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800355 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh5e7bbd72020-11-04 21:43:21 -0800356)
357
Brian Silvermand4260c72020-01-14 00:08:02 -0800358generate_deb_tarball(
Philipp Schraderf1bbf342022-02-05 14:30:15 -0800359 name = "opencv_arm64",
360 files = opencv_arm64_debs,
361 target_compatible_with = ["@platforms//os:linux"],
362)
363
364generate_deb_tarball(
Brian Silverman4c7235a2021-11-17 19:04:37 -0800365 name = "opencv_armhf_v4",
Brian Silvermand4260c72020-01-14 00:08:02 -0800366 files = opencv_armhf_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800367 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermand4260c72020-01-14 00:08:02 -0800368)
369
Brian Silvermand97a47c2020-01-16 00:47:53 -0800370generate_deb_tarball(
371 name = "opencv_amd64",
372 files = opencv_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800373 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermand97a47c2020-01-16 00:47:53 -0800374)
375
Tyler Chatow60671d32020-02-26 19:49:30 -0800376generate_deb_tarball(
377 name = "gstreamer_amd64",
378 files = gstreamer_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800379 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow60671d32020-02-26 19:49:30 -0800380)
381
382generate_deb_tarball(
383 name = "gstreamer_armhf",
384 files = gstreamer_armhf_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800385 target_compatible_with = ["@platforms//os:linux"],
Tyler Chatow60671d32020-02-26 19:49:30 -0800386)
387
Tyler Chatow6eda82c2022-03-27 22:37:38 -0700388generate_deb_tarball(
389 name = "gstreamer_arm64",
390 files = gstreamer_arm64_debs,
391 target_compatible_with = ["@platforms//os:linux"],
392)
393
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700394download_packages(
395 name = "download_lzma",
396 packages = [
397 "liblzma-dev",
398 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800399 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700400)
401
402generate_deb_tarball(
403 name = "lzma_amd64",
404 files = lzma_amd64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800405 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700406)
407
408generate_deb_tarball(
409 name = "lzma_arm64",
410 files = lzma_arm64_debs,
Philipp Schraderdada1072020-11-24 11:34:46 -0800411 target_compatible_with = ["@platforms//os:linux"],
Brian Silvermanf59fe3f2020-09-22 21:04:09 -0700412)
413
Tyler Chatow8a51ac62022-03-15 13:23:12 -0700414generate_deb_tarball(
415 name = "libtinfo5_amd64",
416 files = libtinfo5_amd64_debs,
417 target_compatible_with = ["@platforms//os:linux"],
418)
419
Tyler Chatowec100e22022-03-22 16:23:04 -0700420generate_deb_tarball(
421 name = "libtinfo5_arm64",
422 files = libtinfo5_arm64_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])