# vim: filetype=yaml sw=2
version: '[% c("abbrev") %]'
filename: 'firefox-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %]'
git_hash: 'tor-browser-[% c("var/firefox_version") %]-[% c("var/torbrowser_branch") %]-1-build2'
tag_gpg_id: 1
git_url: https://git.torproject.org/tor-browser.git
git_submodule: 1
gpg_keyring: torbutton.gpg

var:
  firefox_platform_version: 60.6.0
  firefox_version: '[% c("var/firefox_platform_version") %]esr'
  torbrowser_branch: 8.5
  torbrowser_update_channel: alpha
  branding_directory: browser/branding/alpha
  copyright_year: '[% exec("git show -s --format=%ci").remove("-.*") %]'
  deps:
    - build-essential
    - unzip
    - zip
    - autoconf2.13
    - yasm
    - python
  container:
    use_container: 1
  # this should be updated when the list of gradle dependencies is changed
  gradle_dependencies_version: 3
  # used by projects/firefox-locale-bundle
  l10n-changesets.json: '[% exec("cat mobile/locales/l10n-changesets.json") %]'

steps:
  src-tarballs:
    filename: 'src-[% project %]-[% c("version") %].tar.xz'
    version: '[% c("git_hash") %]'
    input_files: []
    var:
      container:
        use_container: 0
    targets:
      nightly:
        version: '[% c("abbrev") %]'

targets:
  release:
    var:
      torbrowser_update_channel: release
      branding_directory: browser/branding/official

  nightly:
    git_hash: 'tor-browser-[% c("var/firefox_version") %]-[% c("var/torbrowser_branch") %]-1'
    tag_gpg_id: 0
    var:
      torbrowser_update_channel: default
      branding_directory: browser/branding/nightly

  android:
    var:
      arch_deps:
        - openjdk-8-jdk

  linux-x86_64:
    var:
      martools_filename: mar-tools-linux64.zip
      arch_deps:
        - libgtk2.0-dev
        - libgtk-3-dev
        - libdbus-glib-1-dev
        - libxt-dev
        - hardening-wrapper
        # To pass configure since ESR 31.
        - libpulse-dev
        # To pass configure since ESR 45.
        - libgconf2-dev
        # To pass configure since ESR 52
        - libx11-xcb-dev
        # We built GCC but not the libmpc2, thus we need to install it
        - libmpc2
        # needed to remove RUNPATH added by selfrando (see #22242)
        - chrpath

  linux-i686:
    var:
      martools_filename: mar-tools-linux32.zip
      sort_deps: 0
      arch_deps:
        - libgtk2.0-dev:i386
        - libgtk-3-dev:i386
        - libdbus-glib-1-dev:i386
        - libxt-dev:i386
        # To pass configure since ESR 31.
        - libpulse-dev:i386
        # To pass configure since ESR 45.
        - libgconf2-dev:i386
        # To pass configure since ESR 52
        - libx11-xcb-dev:i386
        # We built GCC but not the libmpc2, thus we need to install it
        - libmpc2
        # needed to remove RUNPATH added by selfrando (see #22242)
        - chrpath
        - hardening-wrapper

  osx-x86_64:
    var:
      martools_filename: mar-tools-mac64.zip
      arch_deps:
        - rsync

  windows:
    var:
      arch_deps:
        - wine

  windows-i686:
    var:
      martools_filename: mar-tools-win32.zip

  windows-x86_64:
    var:
      martools_filename: mar-tools-win64.zip

input_files:
  - project: container-image
  - name: '[% c("var/compiler") %]'
    project: '[% c("var/compiler") %]'
  - filename: get-moz-build-date
  - filename: 'mozconfig-[% c("var/osname") %]'
    name: mozconfig
  - project: binutils
    name: binutils
    enable: '[% c("var/linux") %]'
  - project: selfrando
    name: selfrando
    enable: '[% c("var/selfrando") %]'
  - filename: fix-info-plist.py
    enable: '[% c("var/osx") %]'
  - URL: https://people.torproject.org/~gk/mirrors/sources/msvcr100.dll
    sha256sum: 8793353461826fbd48f25ea8b835be204b758ce7510db2af631b28850355bd18
    enable: '[% c("var/windows-i686") %]'
  - URL: https://people.torproject.org/~boklm/mirrors/sources/msvcr100-x86_64.dll
    sha256sum: ae3cb6c6afba9a4aa5c85f66023c35338ca579b30326dd02918f9d55259503d5
    enable: '[% c("var/windows-x86_64") %]'
  - project: gcc
    name: gcc
    enable: '[% c("var/windows") %]'
  - filename: nsis-uninstall.patch
    enable: '[% c("var/windows") %]'
  - project: rust
    name: rust
  - project: llvm
    name: llvm
    enable: '[% c("var/linux") %]'
  - project: fxc2
    name: fxc2
    enable: '[% c("var/windows") %]'
  - filename: abicheck.cc
    enable: '[% c("var/linux") %]'
  - filename: start-firefox
    enable: '[% c("var/linux") %]'
  - filename: 'gradle-dependencies-[% c("var/gradle_dependencies_version") %]'
    name: gradle-dependencies
    exec: '[% INCLUDE "fetch-gradle-dependencies" %]'
    enable: '[% c("var/android") %]'
  - project: orbot
    name: orbot
    enable: '[% c("var/android") %]'
  - project: firefox-locale-bundle
    name: firefox-locale-bundle
    enable: '[% c("var/android") %]'
