blob: f498dffcd0c09331e8379fbea602d5c345269467 [file] [log] [blame]
Philipp Schrader0e19c602018-03-07 21:07:22 -08001package(default_visibility = ["//visibility:public"])
Austin Schuh55139fe2015-10-14 23:55:24 -07002
Philipp Schrader0e19c602018-03-07 21:07:22 -08003load(
4 "//debian:python.bzl",
5 python_debs = "files",
6)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -08007load(
8 "//debian:clang.bzl",
9 clang_debs = "files",
10)
Brian Silverman7bda6212018-08-05 11:42:11 -070011load(
12 ":patch.bzl",
13 patch_debs = "files",
14)
Brian Silverman7297c0c2018-08-05 13:43:00 -070015load(
Austin Schuh71f6fa72019-08-31 18:23:02 -070016 ":rsync.bzl",
17 rsync_debs = "files",
18)
19load(
20 ":ssh.bzl",
21 ssh_debs = "files",
22)
23load(
Brian Silverman7297c0c2018-08-05 13:43:00 -070024 ":pandoc.bzl",
25 pandoc_debs = "files",
26)
Brian Silverman4f6ba442018-08-05 14:34:58 -070027load(
28 ":libusb.bzl",
29 libusb_debs = "files",
30)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -070031load(
32 ":mingw_compiler.bzl",
33 mingw_compiler_debs = "files",
34)
Brian Silverman6470f442018-08-05 12:08:16 -070035load(
36 ":patchelf.bzl",
37 patchelf_debs = "files",
38)
39load(
40 ":matplotlib.bzl",
41 matplotlib_debs = "files",
42)
Brian Silverman50b9ac02018-08-12 13:24:10 -070043load(
44 ":arm_frc_gnueabi_deps.bzl",
45 arm_frc_gnueabi_deps_debs = "files",
46)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070047load(
48 ":python_gtk.bzl",
49 python_gtk_debs = "files",
50)
Brian Silvermand4260c72020-01-14 00:08:02 -080051load(
52 ":opencv_armhf.bzl",
53 opencv_armhf_debs = "files",
54)
Brian Silvermand97a47c2020-01-16 00:47:53 -080055load(
56 ":opencv_amd64.bzl",
57 opencv_amd64_debs = "files",
58)
Tyler Chatow60671d32020-02-26 19:49:30 -080059load(
60 ":gstreamer_amd64.bzl",
61 gstreamer_amd64_debs = "files",
62)
63load(
64 ":gstreamer_armhf.bzl",
65 gstreamer_armhf_debs = "files",
66)
Austin Schuh023e7f52020-08-18 21:24:37 -070067load(
68 "//debian:m4.bzl",
69 m4_debs = "files",
70)
71
Philipp Schrader0e19c602018-03-07 21:07:22 -080072load("//debian:packages.bzl", "download_packages", "generate_deb_tarball")
73
Brian Silverman6470f442018-08-05 12:08:16 -070074filegroup(
75 name = "matplotlib_patches",
76 srcs = [
77 "matplotlib_init.patch",
78 ],
James Kuszmaul910f92b2020-01-01 15:30:38 -080079 visibility = ["@matplotlib_repo//:__pkg__"],
Brian Silverman6470f442018-08-05 12:08:16 -070080)
81
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070082filegroup(
83 name = "python_shapely_patches",
84 srcs = [
85 "python_shapely_init.patch",
86 ],
87 visibility = ["@python_gtk//:__pkg__"],
88)
89
90filegroup(
91 name = "python_gi_patches",
92 srcs = [
93 "python_gi_init.patch",
94 ],
95 visibility = ["@python_gtk//:__pkg__"],
96)
97
98filegroup(
99 name = "python_geos_patches",
100 srcs = [
101 "python_geos.patch",
102 ],
103 visibility = ["@python_gtk//:__pkg__"],
104)
105
Philipp Schrader0e19c602018-03-07 21:07:22 -0800106py_binary(
107 name = "download_packages",
108 srcs = [
109 "download_packages.py",
110 ],
111 default_python_version = "PY3",
112 main = "download_packages.py",
113 srcs_version = "PY2AND3",
114)
115
116download_packages(
117 name = "download_python_deps",
118 excludes = [
119 "libblas.so.3",
120 "liblapack.so.3",
121 ],
122 packages = [
123 "python-dev",
124 "python-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700125 "python-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800126 "python3-dev",
127 "python3-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700128 "python3-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800129 ],
130)
131
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800132download_packages(
133 name = "download_clang_deps",
134 excludes = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800135 "lib32stdc++6",
136 "libstdc++6",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800137 ],
138 force_includes = [
139 "libc6",
140 "libc6-dev",
141 ],
142 packages = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800143 "clang-6.0",
144 "clang-format-6.0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800145 "gcc",
146 "gfortran",
147 ],
148)
149
Brian Silverman7bda6212018-08-05 11:42:11 -0700150download_packages(
151 name = "download_patch_deps",
152 packages = [
153 "patch",
154 ],
155)
156
Brian Silverman7297c0c2018-08-05 13:43:00 -0700157download_packages(
158 name = "download_pandoc_deps",
159 packages = [
160 "pandoc",
161 ],
162)
163
Brian Silverman4f6ba442018-08-05 14:34:58 -0700164download_packages(
165 name = "download_libusb_deps",
166 packages = [
167 "libusb-0.1-4",
168 "libusb-1.0-0",
169 "libusb-1.0-0-dev",
170 "libusb-dev",
171 ],
172)
173
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700174download_packages(
175 name = "download_mingw_compiler_deps",
176 packages = [
177 "g++-mingw-w64-x86-64",
178 ],
179)
180
Brian Silverman6470f442018-08-05 12:08:16 -0700181download_packages(
182 name = "download_patchelf_deps",
183 packages = [
184 "patchelf",
185 ],
186)
187
188download_packages(
189 name = "download_matplotlib_deps",
190 excludes = [
191 "python-dev",
192 "python-numpy",
193 "python-scipy",
194 "python3-dev",
195 "python3-numpy",
196 "python3-scipy",
197 "x11-common",
198 "fonts-freefont",
199 "python",
200 "libcups2",
201 ],
202 packages = [
203 "python-matplotlib",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700204 "python-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700205 "python3-matplotlib",
James Kuszmaul910f92b2020-01-01 15:30:38 -0800206 "python3-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700207 ],
208)
209
Brian Silverman50b9ac02018-08-12 13:24:10 -0700210# This list was obtained by manually looking at the output from:
211# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
212download_packages(
213 name = "download_arm_frc_gnueabi_deps",
214 packages = [
215 "libexpat1",
216 "libgmp10",
217 "libisl10",
218 "liblzma5",
219 "libmpc3",
220 "libmpfr4",
221 "libncurses5",
222 "libtinfo5",
223 "zlib1g",
224 ],
225)
226
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700227download_packages(
228 name = "download_python_gtk_deps",
229 excludes = [
230 "fonts-freefont",
231 "gsettings-backend",
232 "libpng-dev",
233 "libz-dev",
234 "python3-dev",
235 "python3",
James Kuszmaulf89cfab2020-01-17 19:48:25 -0800236 "libblas.so.3",
237 "liblapack.so.3",
238 "libstdc++-dev",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700239 ],
240 packages = [
241 "libgtk-3-dev",
242 "python3-cairo",
243 "python3-gi",
244 "python3-gi-cairo",
245 "python3-shapely",
246 ],
247)
248
Austin Schuh023e7f52020-08-18 21:24:37 -0700249download_packages(
250 name = "download_m4",
251 packages = [
252 "m4",
253 ],
254)
255
Philipp Schrader0e19c602018-03-07 21:07:22 -0800256generate_deb_tarball(
257 name = "python",
258 files = python_debs,
259)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800260
261generate_deb_tarball(
James Kuszmaul3ae42262019-11-08 12:33:41 -0800262 name = "clang_6p0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800263 files = clang_debs,
264)
Brian Silverman7bda6212018-08-05 11:42:11 -0700265
266generate_deb_tarball(
267 name = "patch",
268 files = patch_debs,
269)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700270
271generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700272 name = "rsync",
273 files = rsync_debs,
274)
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,
279)
280
281generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700282 name = "pandoc",
283 files = pandoc_debs,
284)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700285
286generate_deb_tarball(
287 name = "libusb",
288 files = libusb_debs,
289)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700290
291generate_deb_tarball(
292 name = "mingw_compiler",
293 files = mingw_compiler_debs,
294)
Brian Silverman6470f442018-08-05 12:08:16 -0700295
296generate_deb_tarball(
297 name = "patchelf",
298 files = patchelf_debs,
299)
300
301generate_deb_tarball(
302 name = "matplotlib",
303 files = matplotlib_debs,
304)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700305
306generate_deb_tarball(
307 name = "arm_frc_gnueabi_deps",
308 files = arm_frc_gnueabi_deps_debs,
309)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700310
311generate_deb_tarball(
312 name = "python_gtk",
313 files = python_gtk_debs,
314)
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800315
Brian Silvermand4260c72020-01-14 00:08:02 -0800316# This list was generated with download_packages.py on armhf and then
317# hand-tweaked to get everything it needs.
318generate_deb_tarball(
319 name = "opencv_armhf_v3",
320 files = opencv_armhf_debs,
321)
322
Brian Silvermand97a47c2020-01-16 00:47:53 -0800323# This was hand-written based on opencv_armhf.bzl.
324generate_deb_tarball(
325 name = "opencv_amd64",
326 files = opencv_amd64_debs,
327)
328
Tyler Chatow60671d32020-02-26 19:49:30 -0800329generate_deb_tarball(
330 name = "gstreamer_amd64",
331 files = gstreamer_amd64_debs,
332)
333
334generate_deb_tarball(
335 name = "gstreamer_armhf",
336 files = gstreamer_armhf_debs,
337)
338
Austin Schuh023e7f52020-08-18 21:24:37 -0700339generate_deb_tarball(
340 name = "m4",
341 files = m4_debs,
342)
343
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800344exports_files([
345 "ssh_wrapper.sh",
346])