# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %]-[% c("var/osname") %]-[% c("var/build_id") %].tar.gz'
version: 0.4.7.13
git_hash: 'tor-[% c("version") %]'
git_url: https://gitlab.torproject.org/tpo/core/tor.git
git_submodule: 1
gpg_keyring: tor.gpg
tag_gpg_id: 1
container:
  use_container: 1

targets:
  nightly:
    version: '[% c("abbrev") %]'
    git_hash: main
    tag_gpg_id: 0

  windows:
    var:
      flag_mwindows: '-Wl,--subsystem,console'

  linux-i686:
    var:
      libpath: '/var/tmp/dist/[% c("var/compiler") %]/lib32'
      sort_deps: 0
      arch_deps:
        - zlib1g-dev:i386
  linux-x86_64:
    var:
      libpath: '/var/tmp/dist/[% c("var/compiler") %]/lib64'
      arch_deps:
        - zlib1g-dev
  linux-cross:
    var:
      libpath: '/var/tmp/dist/gcc-cross/[% c("var/crosstarget") %]/lib'
      container:
        use_container: 1
        suite: buster
        arch: amd64
      post_pkginst: |
        export DEBIAN_FRONTEND=noninteractive
        # The recommended packages produce a package conflict.
        apt-get -y install --no-install-suggests --no-install-recommends zlib1g-dev:[% c("var/arch_debian") %]
        apt-get -y install --no-install-suggests --no-install-recommends libgcc-8-dev:[% c("var/arch_debian") %]
        apt-get -y install --no-install-suggests --no-install-recommends libstdc++-8-dev:[% c("var/arch_debian") %]
        # TODO: Build gcc+stdlib from source.
      arch_deps:
        - libtool
  android:
    var:
      configure_opt_project: '--enable-android --enable-static-openssl --enable-static-libevent --enable-zstd --disable-tool-name-check --disable-system-torrc --disable-system-torrc'

input_files:
  - project: container-image
  - name: openssl
    project: openssl
  - name: libevent
    project: libevent
  - name: zlib
    project: zlib
    enable: '[% c("var/windows") || c("var/android") %]'
  - name: '[% c("var/compiler") %]'
    project: '[% c("var/compiler") %]'
  - name: gcc-host
    project: gcc
    enable: '[% c("var/linux-cross") %]'
    target:
      - '[% c("var/channel") %]'
      - 'basebrowser-linux-x86_64'
  - name: zstd
    project: zstd
    enable: '[% c("var/android") %]'
