blob: 5bebf04b051e9e9a75c37c1776642cbbe57eae63 [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)
Philipp Schrader0e19c602018-03-07 21:07:22 -080071load("//debian:packages.bzl", "download_packages", "generate_deb_tarball")
72
Brian Silverman6470f442018-08-05 12:08:16 -070073filegroup(
74 name = "matplotlib_patches",
75 srcs = [
76 "matplotlib_init.patch",
77 ],
James Kuszmaul910f92b2020-01-01 15:30:38 -080078 visibility = ["@matplotlib_repo//:__pkg__"],
Brian Silverman6470f442018-08-05 12:08:16 -070079)
80
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070081filegroup(
82 name = "python_shapely_patches",
83 srcs = [
84 "python_shapely_init.patch",
85 ],
86 visibility = ["@python_gtk//:__pkg__"],
87)
88
89filegroup(
90 name = "python_gi_patches",
91 srcs = [
92 "python_gi_init.patch",
93 ],
94 visibility = ["@python_gtk//:__pkg__"],
95)
96
97filegroup(
98 name = "python_geos_patches",
99 srcs = [
100 "python_geos.patch",
101 ],
102 visibility = ["@python_gtk//:__pkg__"],
103)
104
Philipp Schrader0e19c602018-03-07 21:07:22 -0800105py_binary(
106 name = "download_packages",
107 srcs = [
108 "download_packages.py",
109 ],
110 default_python_version = "PY3",
111 main = "download_packages.py",
112 srcs_version = "PY2AND3",
113)
114
115download_packages(
116 name = "download_python_deps",
117 excludes = [
118 "libblas.so.3",
119 "liblapack.so.3",
120 ],
121 packages = [
122 "python-dev",
123 "python-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700124 "python-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800125 "python3-dev",
126 "python3-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700127 "python3-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800128 ],
129)
130
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800131download_packages(
132 name = "download_clang_deps",
133 excludes = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800134 "lib32stdc++6",
135 "libstdc++6",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800136 ],
137 force_includes = [
138 "libc6",
139 "libc6-dev",
140 ],
141 packages = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800142 "clang-6.0",
143 "clang-format-6.0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800144 "gcc",
145 "gfortran",
146 ],
147)
148
Brian Silverman7bda6212018-08-05 11:42:11 -0700149download_packages(
150 name = "download_patch_deps",
151 packages = [
152 "patch",
153 ],
154)
155
Brian Silverman7297c0c2018-08-05 13:43:00 -0700156download_packages(
157 name = "download_pandoc_deps",
158 packages = [
159 "pandoc",
160 ],
161)
162
Brian Silverman4f6ba442018-08-05 14:34:58 -0700163download_packages(
164 name = "download_libusb_deps",
165 packages = [
166 "libusb-0.1-4",
167 "libusb-1.0-0",
168 "libusb-1.0-0-dev",
169 "libusb-dev",
170 ],
171)
172
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700173download_packages(
174 name = "download_mingw_compiler_deps",
175 packages = [
176 "g++-mingw-w64-x86-64",
177 ],
178)
179
Brian Silverman6470f442018-08-05 12:08:16 -0700180download_packages(
181 name = "download_patchelf_deps",
182 packages = [
183 "patchelf",
184 ],
185)
186
187download_packages(
188 name = "download_matplotlib_deps",
189 excludes = [
190 "python-dev",
191 "python-numpy",
192 "python-scipy",
193 "python3-dev",
194 "python3-numpy",
195 "python3-scipy",
196 "x11-common",
197 "fonts-freefont",
198 "python",
199 "libcups2",
200 ],
201 packages = [
202 "python-matplotlib",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700203 "python-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700204 "python3-matplotlib",
James Kuszmaul910f92b2020-01-01 15:30:38 -0800205 "python3-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700206 ],
207)
208
Brian Silverman50b9ac02018-08-12 13:24:10 -0700209# This list was obtained by manually looking at the output from:
210# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
211download_packages(
212 name = "download_arm_frc_gnueabi_deps",
213 packages = [
214 "libexpat1",
215 "libgmp10",
216 "libisl10",
217 "liblzma5",
218 "libmpc3",
219 "libmpfr4",
220 "libncurses5",
221 "libtinfo5",
222 "zlib1g",
223 ],
224)
225
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700226download_packages(
227 name = "download_python_gtk_deps",
228 excludes = [
229 "fonts-freefont",
230 "gsettings-backend",
231 "libpng-dev",
232 "libz-dev",
233 "python3-dev",
234 "python3",
James Kuszmaulf89cfab2020-01-17 19:48:25 -0800235 "libblas.so.3",
236 "liblapack.so.3",
237 "libstdc++-dev",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700238 ],
239 packages = [
240 "libgtk-3-dev",
241 "python3-cairo",
242 "python3-gi",
243 "python3-gi-cairo",
244 "python3-shapely",
245 ],
246)
247
Austin Schuh023e7f52020-08-18 21:24:37 -0700248download_packages(
249 name = "download_m4",
250 packages = [
251 "m4",
252 ],
253)
254
Philipp Schrader0e19c602018-03-07 21:07:22 -0800255generate_deb_tarball(
256 name = "python",
257 files = python_debs,
258)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800259
260generate_deb_tarball(
James Kuszmaul3ae42262019-11-08 12:33:41 -0800261 name = "clang_6p0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800262 files = clang_debs,
263)
Brian Silverman7bda6212018-08-05 11:42:11 -0700264
265generate_deb_tarball(
266 name = "patch",
267 files = patch_debs,
268)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700269
270generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700271 name = "rsync",
272 files = rsync_debs,
273)
274
275generate_deb_tarball(
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800276 name = "ssh_v3",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700277 files = ssh_debs,
278)
279
280generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700281 name = "pandoc",
282 files = pandoc_debs,
283)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700284
285generate_deb_tarball(
286 name = "libusb",
287 files = libusb_debs,
288)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700289
290generate_deb_tarball(
291 name = "mingw_compiler",
292 files = mingw_compiler_debs,
293)
Brian Silverman6470f442018-08-05 12:08:16 -0700294
295generate_deb_tarball(
296 name = "patchelf",
297 files = patchelf_debs,
298)
299
300generate_deb_tarball(
301 name = "matplotlib",
302 files = matplotlib_debs,
303)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700304
305generate_deb_tarball(
306 name = "arm_frc_gnueabi_deps",
307 files = arm_frc_gnueabi_deps_debs,
308)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700309
310generate_deb_tarball(
311 name = "python_gtk",
312 files = python_gtk_debs,
313)
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800314
Brian Silvermand4260c72020-01-14 00:08:02 -0800315# This list was generated with download_packages.py on armhf and then
316# hand-tweaked to get everything it needs.
317generate_deb_tarball(
318 name = "opencv_armhf_v3",
319 files = opencv_armhf_debs,
320)
321
Brian Silvermand97a47c2020-01-16 00:47:53 -0800322# This was hand-written based on opencv_armhf.bzl.
323generate_deb_tarball(
324 name = "opencv_amd64",
325 files = opencv_amd64_debs,
326)
327
Tyler Chatow60671d32020-02-26 19:49:30 -0800328generate_deb_tarball(
329 name = "gstreamer_amd64",
330 files = gstreamer_amd64_debs,
331)
332
333generate_deb_tarball(
334 name = "gstreamer_armhf",
335 files = gstreamer_armhf_debs,
336)
337
Austin Schuh023e7f52020-08-18 21:24:37 -0700338generate_deb_tarball(
339 name = "m4",
340 files = m4_debs,
341)
342
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800343exports_files([
344 "ssh_wrapper.sh",
345])