brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 1 | # Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
thomasanderson | 018ffc7f | 2017-06-22 01:25:33 | [diff] [blame] | 5 | import("//build/config/c++/c++.gni") |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 6 | import("//build/config/chrome_build.gni") |
dpranke | 3b87061 | 2015-09-10 23:42:04 | [diff] [blame] | 7 | import("//build/config/features.gni") |
brettw | 4cab0f1 | 2015-09-14 21:40:01 | [diff] [blame] | 8 | import("//build/config/sanitizers/sanitizers.gni") |
thomasanderson | 7a01af4 | 2016-10-18 21:22:42 | [diff] [blame] | 9 | import("//build/config/sysroot.gni") |
raphael.kubo.da.costa | dc683d2 | 2016-09-17 19:41:13 | [diff] [blame] | 10 | import("//build/util/process_version.gni") |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 11 | import("//build/util/version.gni") |
raphael.kubo.da.costa | dc683d2 | 2016-09-17 19:41:13 | [diff] [blame] | 12 | import("//chrome/process_version_rc_template.gni") # For branding_file_path. |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 13 | |
xhwang | c3a252b | 2016-05-23 02:35:48 | [diff] [blame] | 14 | if (current_cpu == "x86" || current_cpu == "x64") { |
| 15 | import("//media/cdm/ppapi/cdm_paths.gni") |
| 16 | } |
| 17 | |
sbc | fa8f43b | 2016-10-05 17:11:35 | [diff] [blame] | 18 | assert(is_linux) |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 19 | |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 20 | packaging_files_executables = [ |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 21 | "$root_out_dir/chrome", |
| 22 | "$root_out_dir/chrome_sandbox", |
| 23 | ] |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 24 | packaging_files_shlibs = [] |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 25 | |
| 26 | if (enable_nacl) { |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 27 | packaging_files_executables += [ |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 28 | "$root_out_dir/nacl_helper", |
| 29 | "$root_out_dir/nacl_helper_bootstrap", |
| 30 | ] |
| 31 | |
| 32 | if (current_cpu == "x86") { |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 33 | packaging_files_executables += [ "$root_out_dir/nacl_irt_x86_32.nexe" ] |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 34 | } else if (current_cpu == "x64") { |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 35 | packaging_files_executables += [ "$root_out_dir/nacl_irt_x86_64.nexe" ] |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 36 | } else if (current_cpu == "arm") { |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 37 | packaging_files_executables += [ "$root_out_dir/nacl_irt_arm.nexe" ] |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 38 | } |
| 39 | } |
| 40 | |
| 41 | # The widevine BUILD.gn only produces shared libraries for x86 and x64 |
| 42 | if (is_chrome_branded && (current_cpu == "x86" || current_cpu == "x64")) { |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 43 | packaging_files_shlibs += [ |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 44 | "$root_out_dir/$widevine_cdm_path/libwidevinecdmadapter.so", |
| 45 | "$root_out_dir/$widevine_cdm_path/libwidevinecdm.so", |
| 46 | ] |
| 47 | } |
| 48 | |
| 49 | if (!libcpp_is_static && use_custom_libcxx) { |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 50 | packaging_files_shlibs += [ "$root_out_dir/libc++.so" ] |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 51 | } |
| 52 | |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 53 | packaging_files_binaries = packaging_files_executables + packaging_files_shlibs |
| 54 | |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 55 | # TODO(mmoss) Any convenient way to get all the relevant build files? |
| 56 | # (e.g. all locales, resources, etc.) |
| 57 | packaging_files = packaging_files_binaries + [ |
| 58 | "$root_out_dir/xdg-mime", |
| 59 | "$root_out_dir/xdg-settings", |
| 60 | "$root_out_dir/locales/en-US.pak", |
| 61 | ] |
| 62 | |
Tom Anderson | a80a9b4 | 2017-09-07 02:35:33 | [diff] [blame] | 63 | action_foreach("calculate_deb_dependencies") { |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 64 | deps = [ |
| 65 | ":installer_deps", |
| 66 | ] |
Tom Anderson | a80a9b4 | 2017-09-07 02:35:33 | [diff] [blame] | 67 | script = "debian/calculate_package_deps.py" |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 68 | sources = packaging_files_binaries |
Tom Anderson | 3a3c588 | 2017-09-12 21:16:24 | [diff] [blame] | 69 | inputs = [ |
| 70 | "debian/deb_version.py", |
| 71 | "debian/dist-package-versions.json", |
| 72 | "debian/package_version_interval.py", |
| 73 | ] |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 74 | outputs = [ |
Tom Anderson | a80a9b4 | 2017-09-07 02:35:33 | [diff] [blame] | 75 | "$root_out_dir/deb_{{source_name_part}}.deps", |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 76 | ] |
| 77 | args = [ |
| 78 | "{{source}}", |
| 79 | rebase_path(sysroot, root_build_dir), |
| 80 | target_cpu, |
Tom Anderson | a80a9b4 | 2017-09-07 02:35:33 | [diff] [blame] | 81 | "deb_{{source_name_part}}.deps", |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 82 | ] |
Tom Anderson | c92bc27 | 2017-09-15 23:12:57 | [diff] [blame^] | 83 | if (is_desktop_linux) { |
| 84 | args += [ "--distro-check" ] |
| 85 | } |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 86 | } |
| 87 | |
Tom Anderson | a80a9b4 | 2017-09-07 02:35:33 | [diff] [blame] | 88 | action("merge_deb_dependencies") { |
| 89 | deps = [ |
| 90 | ":calculate_deb_dependencies", |
| 91 | ] |
| 92 | script = "debian/merge_package_versions.py" |
Tom Anderson | 21254bb | 2017-09-07 04:07:18 | [diff] [blame] | 93 | additional_deps = "debian/additional_deps" |
| 94 | inputs = [ |
| 95 | additional_deps, |
Tom Anderson | 3a3c588 | 2017-09-12 21:16:24 | [diff] [blame] | 96 | "debian/deb_version.py", |
| 97 | "debian/package_version_interval.py", |
Tom Anderson | a80a9b4 | 2017-09-07 02:35:33 | [diff] [blame] | 98 | ] |
Tom Anderson | 21254bb | 2017-09-07 04:07:18 | [diff] [blame] | 99 | outputs = [ |
| 100 | "$root_out_dir/deb_common.deps", |
| 101 | ] |
| 102 | args = [ |
| 103 | "deb_common.deps", |
| 104 | rebase_path(additional_deps, root_build_dir), |
| 105 | ] |
Tom Anderson | a80a9b4 | 2017-09-07 02:35:33 | [diff] [blame] | 106 | args += rebase_path(get_target_outputs(":calculate_deb_dependencies"), |
| 107 | root_build_dir) |
| 108 | } |
| 109 | |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 110 | action_foreach("calculate_rpm_dependencies") { |
| 111 | deps = [ |
| 112 | ":installer_deps", |
| 113 | ] |
| 114 | script = "rpm/calculate_package_deps.py" |
| 115 | sources = packaging_files_binaries |
Tom Anderson | 3a3c588 | 2017-09-12 21:16:24 | [diff] [blame] | 116 | inputs = [ |
| 117 | "rpm/dist-package-provides.json", |
| 118 | ] |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 119 | outputs = [ |
| 120 | "$root_out_dir/rpm_{{source_name_part}}.deps", |
| 121 | ] |
| 122 | args = [ |
| 123 | "{{source}}", |
| 124 | "rpm_{{source_name_part}}.deps", |
| 125 | ] |
| 126 | args += rebase_path(packaging_files_shlibs, root_build_dir) |
Tom Anderson | c92bc27 | 2017-09-15 23:12:57 | [diff] [blame^] | 127 | if (is_desktop_linux) { |
| 128 | args += [ "--distro-check" ] |
| 129 | } |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 130 | } |
| 131 | |
| 132 | action("merge_rpm_dependencies") { |
| 133 | deps = [ |
| 134 | ":calculate_rpm_dependencies", |
| 135 | ] |
| 136 | script = "rpm/merge_package_deps.py" |
Tom Anderson | 3a3c588 | 2017-09-12 21:16:24 | [diff] [blame] | 137 | additional_deps = "rpm/additional_deps" |
| 138 | inputs = [ |
| 139 | additional_deps, |
| 140 | ] |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 141 | outputs = [ |
| 142 | "$root_out_dir/rpm_common.deps", |
| 143 | ] |
Tom Anderson | 3a3c588 | 2017-09-12 21:16:24 | [diff] [blame] | 144 | args = [ |
| 145 | "rpm_common.deps", |
| 146 | rebase_path(additional_deps, root_build_dir), |
| 147 | ] |
Tom Anderson | 7f6acf6 | 2017-09-08 03:13:09 | [diff] [blame] | 148 | args += rebase_path(get_target_outputs(":calculate_rpm_dependencies"), |
| 149 | root_build_dir) |
| 150 | } |
| 151 | |
Tom Anderson | ce16a0c | 2017-09-02 00:27:51 | [diff] [blame] | 152 | action("strip_chrome_binary") { |
| 153 | prog_name = "$root_out_dir/chrome" |
| 154 | debug_file = prog_name + ".debug" |
| 155 | stripped_file = prog_name + ".stripped" |
| 156 | deps = [ |
| 157 | "//chrome", |
| 158 | ] |
| 159 | script = "strip-chrome-binary.py" |
| 160 | sources = [ |
| 161 | prog_name, |
| 162 | ] |
| 163 | outputs = [ |
| 164 | debug_file, |
| 165 | stripped_file, |
| 166 | ] |
| 167 | args = [ |
| 168 | rebase_path("//third_party/eu-strip/bin/eu-strip", root_build_dir), |
| 169 | rebase_path(prog_name, root_build_dir), |
| 170 | rebase_path(debug_file, root_build_dir), |
| 171 | rebase_path(stripped_file, root_build_dir), |
| 172 | ] |
| 173 | } |
| 174 | |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 175 | # This target builds all "normal" Linux installers. |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 176 | # |
| 177 | # The bot setup is to build stable, unstable, and beta packages for the current |
| 178 | # build. Then a later step picks up the package corresponding to what the |
| 179 | # current build is supposed to be. This is wasteful since one build will only |
Tom Anderson | 1d58248 | 2017-09-05 20:41:28 | [diff] [blame] | 180 | # be one of these. |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 181 | # |
| 182 | # TODO it would be much nicer to have a build variable so the bot can tell us |
| 183 | # what the current build should be, so we only have to make one .deb/.rpm pair. |
| 184 | # |
| 185 | # |
| 186 | # TO BUILD LINUX INSTALLER PACKAGES |
| 187 | # |
| 188 | # The packages list the exact versions of each library used. The versions used |
| 189 | # on the bots are likely different than those on your workstation, so you'll |
| 190 | # get a stream of errors like: |
| 191 | # < libasound2 (>= 1.0.23) |
| 192 | # --- |
| 193 | # > libasound2 (>= 1.0.16) |
| 194 | # |
| 195 | # To avoid these warnings for testing purposes, do: |
| 196 | # |
| 197 | # export IGNORE_DEPS_CHANGES=1 |
| 198 | # |
| 199 | # before you build. |
| 200 | group("linux") { |
| 201 | deps = [ |
| 202 | ":beta", |
| 203 | ":stable", |
| 204 | ":unstable", |
| 205 | ] |
| 206 | } |
| 207 | |
| 208 | branding_dir = "//chrome/app/theme/$branding_path_component" |
| 209 | branding_dir_100 = |
| 210 | "//chrome/app/theme/default_100_percent/$branding_path_component" |
| 211 | |
| 212 | copy("common_packaging_files") { |
| 213 | visibility = [ ":*" ] |
| 214 | sources = [ |
| 215 | "common/apt.include", |
| 216 | "common/default-app-block.template", |
| 217 | "common/default-app.template", |
| 218 | "common/desktop.template", |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 219 | "common/installer.include", |
| 220 | "common/postinst.include", |
| 221 | "common/prerm.include", |
| 222 | "common/repo.cron", |
| 223 | "common/rpm.include", |
| 224 | "common/rpmrepo.cron", |
| 225 | "common/symlinks.include", |
| 226 | "common/variables.include", |
| 227 | "common/wrapper", |
| 228 | ] |
| 229 | |
sbc | fa8f43b | 2016-10-05 17:11:35 | [diff] [blame] | 230 | if (is_chrome_branded) { |
tomas.popela | dd765c0 | 2017-03-21 14:44:16 | [diff] [blame] | 231 | sources += [ |
| 232 | "common/google-chrome/google-chrome.appdata.xml.template", |
| 233 | "common/google-chrome/google-chrome.info", |
| 234 | ] |
sbc | fa8f43b | 2016-10-05 17:11:35 | [diff] [blame] | 235 | } else { |
tomas.popela | dd765c0 | 2017-03-21 14:44:16 | [diff] [blame] | 236 | sources += [ |
| 237 | "common/chromium-browser/chromium-browser.appdata.xml", |
| 238 | "common/chromium-browser/chromium-browser.info", |
| 239 | ] |
sbc | fa8f43b | 2016-10-05 17:11:35 | [diff] [blame] | 240 | } |
| 241 | |
Tom Anderson | 4312d5e | 2017-06-22 21:07:43 | [diff] [blame] | 242 | sources += [ "//third_party/eu-strip/bin/eu-strip" ] |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 243 | |
| 244 | outputs = [ |
| 245 | "$root_out_dir/installer/common/{{source_file_part}}", |
| 246 | ] |
| 247 | } |
| 248 | |
| 249 | copy("deb_packaging_files") { |
| 250 | visibility = [ ":*" ] |
| 251 | sources = [ |
| 252 | "debian/build.sh", |
| 253 | "debian/changelog.template", |
| 254 | "debian/control.template", |
| 255 | "debian/debian.menu", |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 256 | "debian/postinst", |
| 257 | "debian/postrm", |
| 258 | "debian/prerm", |
| 259 | ] |
| 260 | outputs = [ |
| 261 | "$root_out_dir/installer/debian/{{source_file_part}}", |
| 262 | ] |
| 263 | } |
| 264 | |
| 265 | copy("theme_files") { |
| 266 | visibility = [ ":*" ] |
| 267 | sources = [ |
| 268 | "$branding_dir/BRANDING", |
| 269 | "$branding_dir/linux/product_logo_32.xpm", |
| 270 | "$branding_dir/product_logo_128.png", |
| 271 | "$branding_dir/product_logo_22.png", |
| 272 | "$branding_dir/product_logo_24.png", |
| 273 | "$branding_dir/product_logo_256.png", |
| 274 | "$branding_dir/product_logo_48.png", |
| 275 | "$branding_dir/product_logo_64.png", |
| 276 | "$branding_dir_100/product_logo_16.png", |
| 277 | "$branding_dir_100/product_logo_32.png", |
| 278 | ] |
| 279 | outputs = [ |
| 280 | "$root_out_dir/installer/theme/{{source_file_part}}", |
| 281 | ] |
| 282 | } |
| 283 | |
| 284 | if (!is_chromeos) { |
| 285 | copy("rpm_packaging_files") { |
| 286 | visibility = [ ":*" ] |
| 287 | sources = [ |
| 288 | "rpm/build.sh", |
| 289 | "rpm/chrome.spec.template", |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 290 | ] |
| 291 | outputs = [ |
| 292 | "$root_out_dir/installer/rpm/{{source_file_part}}", |
| 293 | ] |
| 294 | } |
| 295 | } |
| 296 | |
| 297 | process_version("save_build_info") { |
| 298 | # Just output the default version info variables (no template). |
| 299 | process_only = true |
raphael.kubo.da.costa | dc683d2 | 2016-09-17 19:41:13 | [diff] [blame] | 300 | sources = [ |
| 301 | "//build/util/LASTCHANGE", |
| 302 | "//chrome/VERSION", |
| 303 | branding_file_path, |
| 304 | ] |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 305 | output = "$root_out_dir/installer/version.txt" |
| 306 | } |
| 307 | |
| 308 | # Dependencies for all Linux installer targets. |
| 309 | group("installer_deps") { |
mcgrathr | 6edf192f | 2015-10-19 19:39:11 | [diff] [blame] | 310 | # Though many of these things appear in data_deps further down the |
| 311 | # dependency chain, they must appear here as public_deps so that they can |
| 312 | # be listed as inputs to the actions that depend on ":installer_deps" |
| 313 | # and are guaranteed to have been built before those actions run. |
| 314 | |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 315 | public_deps = [ |
| 316 | ":common_packaging_files", |
| 317 | ":deb_packaging_files", |
| 318 | ":save_build_info", |
Tom Anderson | ce16a0c | 2017-09-02 00:27:51 | [diff] [blame] | 319 | ":strip_chrome_binary", |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 320 | ":theme_files", |
| 321 | "//chrome", |
| 322 | "//chrome:packed_resources", |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 323 | "//sandbox/linux:chrome_sandbox", |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 324 | ] |
dpranke | 3b87061 | 2015-09-10 23:42:04 | [diff] [blame] | 325 | if (enable_nacl) { |
mcgrathr | 6edf192f | 2015-10-19 19:39:11 | [diff] [blame] | 326 | public_deps += [ |
brettw | f4b4a428 | 2015-12-16 00:41:13 | [diff] [blame] | 327 | "//components/nacl/loader:nacl_helper", |
mcgrathr | 6edf192f | 2015-10-19 19:39:11 | [diff] [blame] | 328 | |
| 329 | # These are data_deps of nacl_helper, but that is not enough, |
| 330 | # as explained above. |
| 331 | "//native_client/src/trusted/service_runtime/linux:bootstrap", |
| 332 | "//ppapi/native_client:irt", |
| 333 | ] |
dpranke | 3b87061 | 2015-09-10 23:42:04 | [diff] [blame] | 334 | } |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 335 | if (current_cpu == "x86" || current_cpu == "x64") { |
| 336 | public_deps += [ |
| 337 | "//third_party/widevine/cdm:widevinecdm", |
| 338 | "//third_party/widevine/cdm:widevinecdmadapter", |
| 339 | ] |
| 340 | } |
| 341 | if (!is_chromeos) { |
| 342 | public_deps += [ ":rpm_packaging_files" ] |
| 343 | } |
Tom Anderson | 45583c7 | 2017-07-08 02:53:34 | [diff] [blame] | 344 | |
Tom Anderson | 45583c7 | 2017-07-08 02:53:34 | [diff] [blame] | 345 | if (!libcpp_is_static && use_custom_libcxx) { |
| 346 | public_deps += [ "//buildtools/third_party/libc++:libc++" ] |
| 347 | } |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 348 | } |
| 349 | |
| 350 | # Creates .deb and .rpm (RPM for non-ChromeOS only) installer packages. |
| 351 | # |
| 352 | # channel: |
| 353 | # Name of the channel. |
| 354 | template("linux_package") { |
| 355 | assert(defined(invoker.channel)) |
| 356 | channel = invoker.channel |
| 357 | |
| 358 | if (current_cpu == "x86") { |
mcgrathr | 6edf192f | 2015-10-19 19:39:11 | [diff] [blame] | 359 | # The shell scripts use "ia32" instead of "x86". |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 360 | build_script_arch = "ia32" |
| 361 | } else { |
| 362 | build_script_arch = current_cpu |
| 363 | } |
| 364 | |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 365 | deb_target_name = "${target_name}_deb" |
| 366 | action(deb_target_name) { |
| 367 | visibility = [ ":*" ] |
Tom Anderson | 29332fdd | 2017-09-12 00:18:34 | [diff] [blame] | 368 | script = "make_package.py" |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 369 | |
| 370 | if (current_cpu == "x86") { |
| 371 | deb_arch = "i386" |
| 372 | } else if (current_cpu == "x64") { |
| 373 | deb_arch = "amd64" |
| 374 | } else if (current_cpu == "arm") { |
| 375 | deb_arch = "arm" |
| 376 | } else { |
| 377 | assert(false, "Linux installer not configured for this architecture.") |
| 378 | } |
| 379 | |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 380 | inputs = packaging_files |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 381 | outputs = [ |
| 382 | "$root_out_dir/google-chrome-${channel}_${chrome_version_full}-1_${deb_arch}.deb", |
| 383 | ] |
| 384 | |
| 385 | args = [ |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 386 | rebase_path("$root_out_dir/installer/debian/build.sh", root_build_dir), |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 387 | "-a", |
| 388 | build_script_arch, |
Tom Anderson | cae008e | 2017-09-01 01:47:35 | [diff] [blame] | 389 | "-b", |
| 390 | rebase_path(root_out_dir, root_build_dir), |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 391 | "-c", |
| 392 | invoker.channel, |
| 393 | "-d", |
| 394 | branding_path_component, |
Tom Anderson | cae008e | 2017-09-01 01:47:35 | [diff] [blame] | 395 | "-o", |
| 396 | rebase_path(root_out_dir, root_build_dir), |
thomasanderson | 7a01af4 | 2016-10-18 21:22:42 | [diff] [blame] | 397 | "-s", |
| 398 | rebase_path(sysroot), |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 399 | ] |
Tom Anderson | cae008e | 2017-09-01 01:47:35 | [diff] [blame] | 400 | if (is_official_build) { |
| 401 | args += [ "-f" ] |
| 402 | } |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 403 | deps = [ |
| 404 | ":installer_deps", |
Tom Anderson | 21254bb | 2017-09-07 04:07:18 | [diff] [blame] | 405 | ":merge_deb_dependencies", |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 406 | ] |
| 407 | } |
| 408 | |
| 409 | if (!is_chromeos) { |
| 410 | rpm_target_name = "${target_name}_rpm" |
| 411 | action(rpm_target_name) { |
| 412 | visibility = [ ":*" ] |
Tom Anderson | 29332fdd | 2017-09-12 00:18:34 | [diff] [blame] | 413 | script = "make_package.py" |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 414 | |
| 415 | if (current_cpu == "x86") { |
| 416 | rpm_arch = "i386" |
| 417 | } else if (current_cpu == "x64") { |
| 418 | rpm_arch = "x86_64" |
| 419 | } else if (current_cpu == "arm") { |
| 420 | rpm_arch = "arm" |
| 421 | } else { |
| 422 | assert(false, "Linux installer not configured for this architecture.") |
| 423 | } |
| 424 | |
Tom Anderson | e068dcb | 2017-09-01 18:31:21 | [diff] [blame] | 425 | inputs = packaging_files |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 426 | outputs = [ |
Tom Anderson | 46b0cef | 2017-08-31 21:38:33 | [diff] [blame] | 427 | "$root_out_dir/google-chrome-${channel}-${chrome_version_full}-1.${rpm_arch}.rpm", |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 428 | ] |
| 429 | |
| 430 | args = [ |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 431 | rebase_path("$root_out_dir/installer/rpm/build.sh", root_build_dir), |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 432 | "-a", |
| 433 | build_script_arch, |
Tom Anderson | cae008e | 2017-09-01 01:47:35 | [diff] [blame] | 434 | "-b", |
| 435 | rebase_path(root_out_dir, root_build_dir), |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 436 | "-c", |
| 437 | invoker.channel, |
| 438 | "-d", |
| 439 | branding_path_component, |
Tom Anderson | cae008e | 2017-09-01 01:47:35 | [diff] [blame] | 440 | "-o", |
| 441 | rebase_path(root_out_dir, root_build_dir), |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 442 | ] |
Tom Anderson | cae008e | 2017-09-01 01:47:35 | [diff] [blame] | 443 | if (is_official_build) { |
| 444 | args += [ "-f" ] |
| 445 | } |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 446 | deps = [ |
| 447 | ":installer_deps", |
Tom Anderson | 3a3c588 | 2017-09-12 21:16:24 | [diff] [blame] | 448 | ":merge_rpm_dependencies", |
brettw | a874dcc | 2015-08-28 23:59:18 | [diff] [blame] | 449 | ] |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | group(target_name) { |
| 454 | deps = [ |
| 455 | ":$deb_target_name", |
| 456 | ] |
| 457 | if (!is_chromeos) { |
| 458 | deps += [ ":$rpm_target_name" ] |
| 459 | } |
| 460 | } |
| 461 | } |
| 462 | |
| 463 | # Standard packages. |
| 464 | linux_package("stable") { |
| 465 | channel = "stable" |
| 466 | } |
| 467 | linux_package("beta") { |
| 468 | channel = "beta" |
| 469 | } |
| 470 | linux_package("unstable") { |
| 471 | channel = "unstable" |
| 472 | } |