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

var:
  ddmg: '[% INCLUDE ddmg.sh %]'
  deps:
    - python
    - libparallel-forkmanager-perl
    - libfile-slurp-perl
    - zip
    - unzip
    - bzip2
    - xz-utils
    - patch

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
  linux-i686:
    var:
      mar_osname: linux32
  linux-x86_64:
    var:
      mar_osname: linux64
  macos:
    var:
      arch_deps:
        - faketime
        - python3-dev
        - python3-pip
        - python3-distutils-extra
        - python3-psutil
  macos-universal:
    var:
      mar_osname: macos
  macos-aarch64:
    var:
      mar_osname: macos-aarch64
  macos-x86_64:
    var:
      mar_osname: macos-x86_64
  windows:
    var:
      arch_deps:
        - python3-pefile
  windows-i686:
    var:
      mar_osname: win32
  windows-x86_64:
    var:
      mar_osname: win64
  android:
    build: '[% INCLUDE build.android %]'
    var:
      verify_allowed_addons: 1
  torbrowser:
    var:
      prefs_file: 000-tor-browser.js
  basebrowser:
    var:
      prefs_file: 001-base-profile.js
  privacybrowser:
    var:
      prefs_file: 001-base-profile.js

input_files:
  - project: container-image
  - filename: run_scripts
    enable: '[% ! c("var/android") %]'
  - 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: fenix
    name: fenix
    enable: '[% c("var/android") %]'
  - 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_prepend:
      - macos-aarch64
  - project: fonts
    name: fonts
    enable: '[% ! c("var/android") %]'
  - filename: Bundle-Data
    enable: '[% ! c("var/android") %]'
  - URL: https://addons.mozilla.org/firefox/downloads/file/4067473/noscript-11.4.16.xpi
    name: noscript
    sha256sum: 44bdddd89bee11e52e09ea967aebd3aa996dc2d66c1a819e8dfdaf9a16cc753b
  - URL: https://addons.mozilla.org/firefox/downloads/file/4047353/ublock_origin-1.46.0.xpi
    name: ublock-origin
    sha256sum: 6bf8af5266353fab5eabdc7476de026e01edfb7901b0430c5e539f6791f1edc8
    enable: '[% c("var/privacy-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: pe_checksum_fix.py
    enable: '[% c("var/windows") %]'
  # 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") %]'
  - filename: allowed_addons.json
    enable: '[% c("var/android") %]'
  - filename: verify_allowed_addons.py
    enable: '[% c("var/android") && c("var/verify_allowed_addons") %]'
  - project: manual
    name: manual
    enable: '[% ! c("var/android") && c("var/tor-browser") %]'
