blob: dee25cbeebe9e34654ecd75890930ccc323d7551 [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)
Philipp Schrader0e19c602018-03-07 21:07:22 -080067load("//debian:packages.bzl", "download_packages", "generate_deb_tarball")
68
Brian Silverman6470f442018-08-05 12:08:16 -070069filegroup(
70 name = "matplotlib_patches",
71 srcs = [
72 "matplotlib_init.patch",
73 ],
James Kuszmaul910f92b2020-01-01 15:30:38 -080074 visibility = ["@matplotlib_repo//:__pkg__"],
Brian Silverman6470f442018-08-05 12:08:16 -070075)
76
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070077filegroup(
78 name = "python_shapely_patches",
79 srcs = [
80 "python_shapely_init.patch",
81 ],
82 visibility = ["@python_gtk//:__pkg__"],
83)
84
85filegroup(
86 name = "python_gi_patches",
87 srcs = [
88 "python_gi_init.patch",
89 ],
90 visibility = ["@python_gtk//:__pkg__"],
91)
92
93filegroup(
94 name = "python_geos_patches",
95 srcs = [
96 "python_geos.patch",
97 ],
98 visibility = ["@python_gtk//:__pkg__"],
99)
100
Philipp Schrader0e19c602018-03-07 21:07:22 -0800101py_binary(
102 name = "download_packages",
103 srcs = [
104 "download_packages.py",
105 ],
106 default_python_version = "PY3",
107 main = "download_packages.py",
108 srcs_version = "PY2AND3",
109)
110
111download_packages(
112 name = "download_python_deps",
113 excludes = [
114 "libblas.so.3",
115 "liblapack.so.3",
116 ],
117 packages = [
118 "python-dev",
119 "python-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700120 "python-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800121 "python3-dev",
122 "python3-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700123 "python3-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800124 ],
125)
126
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800127download_packages(
128 name = "download_clang_deps",
129 excludes = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800130 "lib32stdc++6",
131 "libstdc++6",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800132 ],
133 force_includes = [
134 "libc6",
135 "libc6-dev",
136 ],
137 packages = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800138 "clang-6.0",
139 "clang-format-6.0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800140 "gcc",
141 "gfortran",
142 ],
143)
144
Brian Silverman7bda6212018-08-05 11:42:11 -0700145download_packages(
146 name = "download_patch_deps",
147 packages = [
148 "patch",
149 ],
150)
151
Brian Silverman7297c0c2018-08-05 13:43:00 -0700152download_packages(
153 name = "download_pandoc_deps",
154 packages = [
155 "pandoc",
156 ],
157)
158
Brian Silverman4f6ba442018-08-05 14:34:58 -0700159download_packages(
160 name = "download_libusb_deps",
161 packages = [
162 "libusb-0.1-4",
163 "libusb-1.0-0",
164 "libusb-1.0-0-dev",
165 "libusb-dev",
166 ],
167)
168
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700169download_packages(
170 name = "download_mingw_compiler_deps",
171 packages = [
172 "g++-mingw-w64-x86-64",
173 ],
174)
175
Brian Silverman6470f442018-08-05 12:08:16 -0700176download_packages(
177 name = "download_patchelf_deps",
178 packages = [
179 "patchelf",
180 ],
181)
182
183download_packages(
184 name = "download_matplotlib_deps",
185 excludes = [
186 "python-dev",
187 "python-numpy",
188 "python-scipy",
189 "python3-dev",
190 "python3-numpy",
191 "python3-scipy",
192 "x11-common",
193 "fonts-freefont",
194 "python",
195 "libcups2",
196 ],
197 packages = [
198 "python-matplotlib",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700199 "python-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700200 "python3-matplotlib",
James Kuszmaul910f92b2020-01-01 15:30:38 -0800201 "python3-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700202 ],
203)
204
Brian Silverman50b9ac02018-08-12 13:24:10 -0700205# This list was obtained by manually looking at the output from:
206# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
207download_packages(
208 name = "download_arm_frc_gnueabi_deps",
209 packages = [
210 "libexpat1",
211 "libgmp10",
212 "libisl10",
213 "liblzma5",
214 "libmpc3",
215 "libmpfr4",
216 "libncurses5",
217 "libtinfo5",
218 "zlib1g",
219 ],
220)
221
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700222download_packages(
223 name = "download_python_gtk_deps",
224 excludes = [
225 "fonts-freefont",
226 "gsettings-backend",
227 "libpng-dev",
228 "libz-dev",
229 "python3-dev",
230 "python3",
James Kuszmaulf89cfab2020-01-17 19:48:25 -0800231 "libblas.so.3",
232 "liblapack.so.3",
233 "libstdc++-dev",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700234 ],
235 packages = [
236 "libgtk-3-dev",
237 "python3-cairo",
238 "python3-gi",
239 "python3-gi-cairo",
240 "python3-shapely",
241 ],
242)
243
Philipp Schrader0e19c602018-03-07 21:07:22 -0800244generate_deb_tarball(
245 name = "python",
246 files = python_debs,
247)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800248
249generate_deb_tarball(
James Kuszmaul3ae42262019-11-08 12:33:41 -0800250 name = "clang_6p0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800251 files = clang_debs,
252)
Brian Silverman7bda6212018-08-05 11:42:11 -0700253
254generate_deb_tarball(
255 name = "patch",
256 files = patch_debs,
257)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700258
259generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700260 name = "rsync",
261 files = rsync_debs,
262)
263
264generate_deb_tarball(
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800265 name = "ssh_v3",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700266 files = ssh_debs,
267)
268
269generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700270 name = "pandoc",
271 files = pandoc_debs,
272)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700273
274generate_deb_tarball(
275 name = "libusb",
276 files = libusb_debs,
277)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700278
279generate_deb_tarball(
280 name = "mingw_compiler",
281 files = mingw_compiler_debs,
282)
Brian Silverman6470f442018-08-05 12:08:16 -0700283
284generate_deb_tarball(
285 name = "patchelf",
286 files = patchelf_debs,
287)
288
289generate_deb_tarball(
290 name = "matplotlib",
291 files = matplotlib_debs,
292)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700293
294generate_deb_tarball(
295 name = "arm_frc_gnueabi_deps",
296 files = arm_frc_gnueabi_deps_debs,
297)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700298
299generate_deb_tarball(
300 name = "python_gtk",
301 files = python_gtk_debs,
302)
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800303
Brian Silvermand4260c72020-01-14 00:08:02 -0800304# This list was generated with download_packages.py on armhf and then
305# hand-tweaked to get everything it needs.
306generate_deb_tarball(
307 name = "opencv_armhf_v3",
308 files = opencv_armhf_debs,
309)
310
Brian Silvermand97a47c2020-01-16 00:47:53 -0800311# This was hand-written based on opencv_armhf.bzl.
312generate_deb_tarball(
313 name = "opencv_amd64",
314 files = opencv_amd64_debs,
315)
316
Tyler Chatow60671d32020-02-26 19:49:30 -0800317generate_deb_tarball(
318 name = "gstreamer_amd64",
319 files = gstreamer_amd64_debs,
320)
321
322generate_deb_tarball(
323 name = "gstreamer_armhf",
324 files = gstreamer_armhf_debs,
325)
326
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800327exports_files([
328 "ssh_wrapper.sh",
329])