blob: ec2020b6d11525911e89a5b90f7e60cb92786bef [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)
Philipp Schrader0e19c602018-03-07 21:07:22 -080055load("//debian:packages.bzl", "download_packages", "generate_deb_tarball")
56
Brian Silverman6470f442018-08-05 12:08:16 -070057filegroup(
58 name = "matplotlib_patches",
59 srcs = [
60 "matplotlib_init.patch",
61 ],
James Kuszmaul910f92b2020-01-01 15:30:38 -080062 visibility = ["@matplotlib_repo//:__pkg__"],
Brian Silverman6470f442018-08-05 12:08:16 -070063)
64
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070065filegroup(
66 name = "python_shapely_patches",
67 srcs = [
68 "python_shapely_init.patch",
69 ],
70 visibility = ["@python_gtk//:__pkg__"],
71)
72
73filegroup(
74 name = "python_gi_patches",
75 srcs = [
76 "python_gi_init.patch",
77 ],
78 visibility = ["@python_gtk//:__pkg__"],
79)
80
81filegroup(
82 name = "python_geos_patches",
83 srcs = [
84 "python_geos.patch",
85 ],
86 visibility = ["@python_gtk//:__pkg__"],
87)
88
Philipp Schrader0e19c602018-03-07 21:07:22 -080089py_binary(
90 name = "download_packages",
91 srcs = [
92 "download_packages.py",
93 ],
94 default_python_version = "PY3",
95 main = "download_packages.py",
96 srcs_version = "PY2AND3",
97)
98
99download_packages(
100 name = "download_python_deps",
101 excludes = [
102 "libblas.so.3",
103 "liblapack.so.3",
104 ],
105 packages = [
106 "python-dev",
107 "python-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700108 "python-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800109 "python3-dev",
110 "python3-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700111 "python3-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800112 ],
113)
114
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800115download_packages(
116 name = "download_clang_deps",
117 excludes = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800118 "lib32stdc++6",
119 "libstdc++6",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800120 ],
121 force_includes = [
122 "libc6",
123 "libc6-dev",
124 ],
125 packages = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800126 "clang-6.0",
127 "clang-format-6.0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800128 "gcc",
129 "gfortran",
130 ],
131)
132
Brian Silverman7bda6212018-08-05 11:42:11 -0700133download_packages(
134 name = "download_patch_deps",
135 packages = [
136 "patch",
137 ],
138)
139
Brian Silverman7297c0c2018-08-05 13:43:00 -0700140download_packages(
141 name = "download_pandoc_deps",
142 packages = [
143 "pandoc",
144 ],
145)
146
Brian Silverman4f6ba442018-08-05 14:34:58 -0700147download_packages(
148 name = "download_libusb_deps",
149 packages = [
150 "libusb-0.1-4",
151 "libusb-1.0-0",
152 "libusb-1.0-0-dev",
153 "libusb-dev",
154 ],
155)
156
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700157download_packages(
158 name = "download_mingw_compiler_deps",
159 packages = [
160 "g++-mingw-w64-x86-64",
161 ],
162)
163
Brian Silverman6470f442018-08-05 12:08:16 -0700164download_packages(
165 name = "download_patchelf_deps",
166 packages = [
167 "patchelf",
168 ],
169)
170
171download_packages(
172 name = "download_matplotlib_deps",
173 excludes = [
174 "python-dev",
175 "python-numpy",
176 "python-scipy",
177 "python3-dev",
178 "python3-numpy",
179 "python3-scipy",
180 "x11-common",
181 "fonts-freefont",
182 "python",
183 "libcups2",
184 ],
185 packages = [
186 "python-matplotlib",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700187 "python-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700188 "python3-matplotlib",
James Kuszmaul910f92b2020-01-01 15:30:38 -0800189 "python3-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700190 ],
191)
192
Brian Silverman50b9ac02018-08-12 13:24:10 -0700193# This list was obtained by manually looking at the output from:
194# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
195download_packages(
196 name = "download_arm_frc_gnueabi_deps",
197 packages = [
198 "libexpat1",
199 "libgmp10",
200 "libisl10",
201 "liblzma5",
202 "libmpc3",
203 "libmpfr4",
204 "libncurses5",
205 "libtinfo5",
206 "zlib1g",
207 ],
208)
209
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700210download_packages(
211 name = "download_python_gtk_deps",
212 excludes = [
213 "fonts-freefont",
214 "gsettings-backend",
215 "libpng-dev",
216 "libz-dev",
217 "python3-dev",
218 "python3",
James Kuszmaulf89cfab2020-01-17 19:48:25 -0800219 "libblas.so.3",
220 "liblapack.so.3",
221 "libstdc++-dev",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700222 ],
223 packages = [
224 "libgtk-3-dev",
225 "python3-cairo",
226 "python3-gi",
227 "python3-gi-cairo",
228 "python3-shapely",
229 ],
230)
231
Philipp Schrader0e19c602018-03-07 21:07:22 -0800232generate_deb_tarball(
233 name = "python",
234 files = python_debs,
235)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800236
237generate_deb_tarball(
James Kuszmaul3ae42262019-11-08 12:33:41 -0800238 name = "clang_6p0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800239 files = clang_debs,
240)
Brian Silverman7bda6212018-08-05 11:42:11 -0700241
242generate_deb_tarball(
243 name = "patch",
244 files = patch_debs,
245)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700246
247generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700248 name = "rsync",
249 files = rsync_debs,
250)
251
252generate_deb_tarball(
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800253 name = "ssh_v3",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700254 files = ssh_debs,
255)
256
257generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700258 name = "pandoc",
259 files = pandoc_debs,
260)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700261
262generate_deb_tarball(
263 name = "libusb",
264 files = libusb_debs,
265)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700266
267generate_deb_tarball(
268 name = "mingw_compiler",
269 files = mingw_compiler_debs,
270)
Brian Silverman6470f442018-08-05 12:08:16 -0700271
272generate_deb_tarball(
273 name = "patchelf",
274 files = patchelf_debs,
275)
276
277generate_deb_tarball(
278 name = "matplotlib",
279 files = matplotlib_debs,
280)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700281
282generate_deb_tarball(
283 name = "arm_frc_gnueabi_deps",
284 files = arm_frc_gnueabi_deps_debs,
285)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700286
287generate_deb_tarball(
288 name = "python_gtk",
289 files = python_gtk_debs,
290)
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800291
Brian Silvermand4260c72020-01-14 00:08:02 -0800292# This list was generated with download_packages.py on armhf and then
293# hand-tweaked to get everything it needs.
294generate_deb_tarball(
295 name = "opencv_armhf_v3",
296 files = opencv_armhf_debs,
297)
298
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800299exports_files([
300 "ssh_wrapper.sh",
301])