blob: 7f3b7f1c0f3dd39b2bf5ee6997afa953917ee232 [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)
Philipp Schrader0e19c602018-03-07 21:07:22 -080059load("//debian:packages.bzl", "download_packages", "generate_deb_tarball")
60
Brian Silverman6470f442018-08-05 12:08:16 -070061filegroup(
62 name = "matplotlib_patches",
63 srcs = [
64 "matplotlib_init.patch",
65 ],
James Kuszmaul910f92b2020-01-01 15:30:38 -080066 visibility = ["@matplotlib_repo//:__pkg__"],
Brian Silverman6470f442018-08-05 12:08:16 -070067)
68
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070069filegroup(
70 name = "python_shapely_patches",
71 srcs = [
72 "python_shapely_init.patch",
73 ],
74 visibility = ["@python_gtk//:__pkg__"],
75)
76
77filegroup(
78 name = "python_gi_patches",
79 srcs = [
80 "python_gi_init.patch",
81 ],
82 visibility = ["@python_gtk//:__pkg__"],
83)
84
85filegroup(
86 name = "python_geos_patches",
87 srcs = [
88 "python_geos.patch",
89 ],
90 visibility = ["@python_gtk//:__pkg__"],
91)
92
Philipp Schrader0e19c602018-03-07 21:07:22 -080093py_binary(
94 name = "download_packages",
95 srcs = [
96 "download_packages.py",
97 ],
98 default_python_version = "PY3",
99 main = "download_packages.py",
100 srcs_version = "PY2AND3",
101)
102
103download_packages(
104 name = "download_python_deps",
105 excludes = [
106 "libblas.so.3",
107 "liblapack.so.3",
108 ],
109 packages = [
110 "python-dev",
111 "python-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700112 "python-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800113 "python3-dev",
114 "python3-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700115 "python3-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800116 ],
117)
118
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800119download_packages(
120 name = "download_clang_deps",
121 excludes = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800122 "lib32stdc++6",
123 "libstdc++6",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800124 ],
125 force_includes = [
126 "libc6",
127 "libc6-dev",
128 ],
129 packages = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800130 "clang-6.0",
131 "clang-format-6.0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800132 "gcc",
133 "gfortran",
134 ],
135)
136
Brian Silverman7bda6212018-08-05 11:42:11 -0700137download_packages(
138 name = "download_patch_deps",
139 packages = [
140 "patch",
141 ],
142)
143
Brian Silverman7297c0c2018-08-05 13:43:00 -0700144download_packages(
145 name = "download_pandoc_deps",
146 packages = [
147 "pandoc",
148 ],
149)
150
Brian Silverman4f6ba442018-08-05 14:34:58 -0700151download_packages(
152 name = "download_libusb_deps",
153 packages = [
154 "libusb-0.1-4",
155 "libusb-1.0-0",
156 "libusb-1.0-0-dev",
157 "libusb-dev",
158 ],
159)
160
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700161download_packages(
162 name = "download_mingw_compiler_deps",
163 packages = [
164 "g++-mingw-w64-x86-64",
165 ],
166)
167
Brian Silverman6470f442018-08-05 12:08:16 -0700168download_packages(
169 name = "download_patchelf_deps",
170 packages = [
171 "patchelf",
172 ],
173)
174
175download_packages(
176 name = "download_matplotlib_deps",
177 excludes = [
178 "python-dev",
179 "python-numpy",
180 "python-scipy",
181 "python3-dev",
182 "python3-numpy",
183 "python3-scipy",
184 "x11-common",
185 "fonts-freefont",
186 "python",
187 "libcups2",
188 ],
189 packages = [
190 "python-matplotlib",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700191 "python-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700192 "python3-matplotlib",
James Kuszmaul910f92b2020-01-01 15:30:38 -0800193 "python3-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700194 ],
195)
196
Brian Silverman50b9ac02018-08-12 13:24:10 -0700197# This list was obtained by manually looking at the output from:
198# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
199download_packages(
200 name = "download_arm_frc_gnueabi_deps",
201 packages = [
202 "libexpat1",
203 "libgmp10",
204 "libisl10",
205 "liblzma5",
206 "libmpc3",
207 "libmpfr4",
208 "libncurses5",
209 "libtinfo5",
210 "zlib1g",
211 ],
212)
213
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700214download_packages(
215 name = "download_python_gtk_deps",
216 excludes = [
217 "fonts-freefont",
218 "gsettings-backend",
219 "libpng-dev",
220 "libz-dev",
221 "python3-dev",
222 "python3",
James Kuszmaulf89cfab2020-01-17 19:48:25 -0800223 "libblas.so.3",
224 "liblapack.so.3",
225 "libstdc++-dev",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700226 ],
227 packages = [
228 "libgtk-3-dev",
229 "python3-cairo",
230 "python3-gi",
231 "python3-gi-cairo",
232 "python3-shapely",
233 ],
234)
235
Philipp Schrader0e19c602018-03-07 21:07:22 -0800236generate_deb_tarball(
237 name = "python",
238 files = python_debs,
239)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800240
241generate_deb_tarball(
James Kuszmaul3ae42262019-11-08 12:33:41 -0800242 name = "clang_6p0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800243 files = clang_debs,
244)
Brian Silverman7bda6212018-08-05 11:42:11 -0700245
246generate_deb_tarball(
247 name = "patch",
248 files = patch_debs,
249)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700250
251generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700252 name = "rsync",
253 files = rsync_debs,
254)
255
256generate_deb_tarball(
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800257 name = "ssh_v3",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700258 files = ssh_debs,
259)
260
261generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700262 name = "pandoc",
263 files = pandoc_debs,
264)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700265
266generate_deb_tarball(
267 name = "libusb",
268 files = libusb_debs,
269)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700270
271generate_deb_tarball(
272 name = "mingw_compiler",
273 files = mingw_compiler_debs,
274)
Brian Silverman6470f442018-08-05 12:08:16 -0700275
276generate_deb_tarball(
277 name = "patchelf",
278 files = patchelf_debs,
279)
280
281generate_deb_tarball(
282 name = "matplotlib",
283 files = matplotlib_debs,
284)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700285
286generate_deb_tarball(
287 name = "arm_frc_gnueabi_deps",
288 files = arm_frc_gnueabi_deps_debs,
289)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700290
291generate_deb_tarball(
292 name = "python_gtk",
293 files = python_gtk_debs,
294)
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800295
Brian Silvermand4260c72020-01-14 00:08:02 -0800296# This list was generated with download_packages.py on armhf and then
297# hand-tweaked to get everything it needs.
298generate_deb_tarball(
299 name = "opencv_armhf_v3",
300 files = opencv_armhf_debs,
301)
302
Brian Silvermand97a47c2020-01-16 00:47:53 -0800303# This was hand-written based on opencv_armhf.bzl.
304generate_deb_tarball(
305 name = "opencv_amd64",
306 files = opencv_amd64_debs,
307)
308
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800309exports_files([
310 "ssh_wrapper.sh",
311])