blob: dec850c0a2f6aafe281be35bf8739d6efb37b9d5 [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",
223 ],
224 packages = [
225 "libgtk-3-dev",
226 "python3-cairo",
227 "python3-gi",
228 "python3-gi-cairo",
229 "python3-shapely",
230 ],
231)
232
Philipp Schrader0e19c602018-03-07 21:07:22 -0800233generate_deb_tarball(
234 name = "python",
235 files = python_debs,
236)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800237
238generate_deb_tarball(
James Kuszmaul3ae42262019-11-08 12:33:41 -0800239 name = "clang_6p0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800240 files = clang_debs,
241)
Brian Silverman7bda6212018-08-05 11:42:11 -0700242
243generate_deb_tarball(
244 name = "patch",
245 files = patch_debs,
246)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700247
248generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700249 name = "rsync",
250 files = rsync_debs,
251)
252
253generate_deb_tarball(
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800254 name = "ssh_v3",
Austin Schuh71f6fa72019-08-31 18:23:02 -0700255 files = ssh_debs,
256)
257
258generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700259 name = "pandoc",
260 files = pandoc_debs,
261)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700262
263generate_deb_tarball(
264 name = "libusb",
265 files = libusb_debs,
266)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700267
268generate_deb_tarball(
269 name = "mingw_compiler",
270 files = mingw_compiler_debs,
271)
Brian Silverman6470f442018-08-05 12:08:16 -0700272
273generate_deb_tarball(
274 name = "patchelf",
275 files = patchelf_debs,
276)
277
278generate_deb_tarball(
279 name = "matplotlib",
280 files = matplotlib_debs,
281)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700282
283generate_deb_tarball(
284 name = "arm_frc_gnueabi_deps",
285 files = arm_frc_gnueabi_deps_debs,
286)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700287
288generate_deb_tarball(
289 name = "python_gtk",
290 files = python_gtk_debs,
291)
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800292
Brian Silvermand4260c72020-01-14 00:08:02 -0800293# This list was generated with download_packages.py on armhf and then
294# hand-tweaked to get everything it needs.
295generate_deb_tarball(
296 name = "opencv_armhf_v3",
297 files = opencv_armhf_debs,
298)
299
Brian Silvermand97a47c2020-01-16 00:47:53 -0800300# This was hand-written based on opencv_armhf.bzl.
301generate_deb_tarball(
302 name = "opencv_amd64",
303 files = opencv_amd64_debs,
304)
305
Brian Silvermanbd7860e2020-01-05 17:52:40 -0800306exports_files([
307 "ssh_wrapper.sh",
308])