# vim: filetype=yaml sw=2
version: '[% c("var/torbrowser_version") %]'
filename: '[% c("var/project-name") %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %]'
timestamp: '[% c("var/browser_release_date_timestamp") %]'
container:
  use_container: 1

var:
  ddmg: '[% INCLUDE ddmg.sh %]'
  deps:
    - python3
    - bzip2
    - jq
  mar_osname: '[% c("var/osname") %]'
  version_json: version.json


targets:

  linux:
    var:
      arch_deps:
        # Install libc6-i386 to be able to run 32bit mar tools in linux-i686
        # builds (bug 29812). We don't need it in x86_64 builds, but we
        # share the container to reduce space used.
        - libc6-i386
      pt_path: ./TorBrowser/Tor/PluggableTransports/

  macos:
    var:
      arch_deps:
        - faketime
        - python3-dev
        - python3-pip
        - python3-distutils-extra
        - python3-psutil
      pt_path: PluggableTransports/

  macos-universal:
    var:
      mar_osname: macos

  windows:
    var:
      arch_deps:
        - python3-pefile
      pt_path: TorBrowser\Tor\PluggableTransports\

  android:
    build: '[% INCLUDE build.android %]'
    var:
      arch_deps:
        - 7zip
        - openjdk-17-jdk-headless
        - bsdiff
      container:
        # 7zip is in backports in bullseye, and we can already use Java 17 for
        # apksigner.
        suite: bookworm
        arch: amd64

  torbrowser:
    var:
      prefs_file: 000-tor-browser.js
      version_json: tbb_version.json

  basebrowser:
    var:
      prefs_file: 001-base-profile.js

  mullvadbrowser:
    var:
      prefs_file: 001-base-profile.js


input_files:
  - project: container-image
  - project: firefox
    name: firefox
    enable: '[% ! c("var/android") %]'
  - project: firefox
    name: firefox-aarch64
    enable: '[% c("var/macos_universal") %]'
    target_prepend:
      - macos-aarch64
  - project: firefox
    name: src-firefox
    pkg_type: src-tarballs
    enable: '[% c("var/macos") %]'
  - project: geckoview
    name: fenix
    pkg_type: build_apk
    enable: '[% c("var/android") && !c("var/android_single_arch") %]'
  - project: geckoview
    name: fenix
    pkg_type: build
    enable: '[% c("var/android") && c("var/android_single_arch") %]'
  - project: tor-expert-bundle
    name: tor-expert-bundle
    enable: '[% c("var/tor-browser") %]'
  - project: tor-expert-bundle
    name: tor-expert-bundle-aarch64
    enable: '[% c("var/macos_universal") && c("var/tor-browser") %]'
    target_replace:
      '^torbrowser-macos.*': torbrowser-macos-aarch64
  - project: moat-settings
    name: moat-settings
    enable: '[% c("var/tor-browser") %]'
  - project: fonts
    name: fonts
    enable: '[% ! c("var/android") %]'
  - filename: Bundle-Data
    enable: '[% ! c("var/android") %]'
  - URL: https://addons.mozilla.org/firefox/downloads/file/4411102/noscript-12.1.1.xpi
    name: noscript
    sha256sum: f9639e63ffcfc352036de00e4ff6694bb0ca65a0bb8fbd103bd08f32dc1ff31a
  - URL: https://addons.mozilla.org/firefox/downloads/file/4458450/ublock_origin-1.63.2.xpi
    name: ublock-origin
    sha256sum: d93176cef4dc042e41ba500aa2a90e5d57b5be77449cbd522111585e3a0cd158
    enable: '[% c("var/mullvad-browser") %]'
  - URL: https://cdn.mullvad.net/browser-extension/0.9.4/mullvad-browser-extension-0.9.4.xpi
    name: mullvad-extension
    sha256sum: c91fcf30fe9a998f45ddc92e083bca4cd7b6dbb24fc545391e155ed1ec13c8cb
    enable: '[% c("var/mullvad-browser") %]'
  - filename: 'gtk3-settings.ini'
    enable: '[% c("var/linux") %]'
  - project: hfsplus-tools
    name: hfsplus-tools
    enable: '[% c("var/macos") %]'
  - project: libdmg-hfsplus
    name: libdmg
    enable: '[% c("var/macos") %]'
  - project: nsis
    name: nsis
    enable: '[% c("var/windows") %]'
  - filename: windows-installer
    enable: '[% c("var/windows") %]'
  - filename: 'defines.nsh'
    content: '[% INCLUDE "windows-installer/defines.nsh.in" %]'
    refresh_input: 1
    enable: '[% c("var/windows") %]'
  - filename: pe_checksum_fix.py
    enable: '[% c("var/windows") %]'
  - project: translation
    name: translation-base-browser
    pkg_type: base-browser
    enable: '[% c("var/windows") && !c("var/testbuild") %]'
  - project: translation
    name: translation-mullvad-browser
    pkg_type: mullvad-browser
    enable: '[% c("var/mullvad-browser") && c("var/windows") && !c("var/testbuild") %]'
  # To generate a new keystore, see how-to-generate-keystore.txt
  - filename: android-qa.keystore
    enable: '[% c("var/android") %]'
  - name: '[% c("var/compiler") %]'
    project: '[% c("var/compiler") %]'
    enable: '[% c("var/android") || c("var/macos") %]'
  - name: electrum-nmc
    project: electrum-nmc
    enable: '[% c("var/namecoin") %]'
  - name: ncprop279
    project: ncprop279
    enable: '[% c("var/namecoin") %]'
  - name: stemns
    project: stemns
    enable: '[% c("var/namecoin") %]'
  - filename: namecoin.patch
    enable: '[% c("var/namecoin") %]'
  - project: manual
    name: manual
    enable: '[% ! c("var/android") && c("var/tor-browser") %]'
    # tor-browser-build#40920
  - filename: sort-baseline.py
    enable: '[% c("var/android") %]'
