{% set name = "r-catboost" %}
{% set version = "1.0.3" %}
{% set posix = 'm2-' if win else '' %}

package:
  name: {{ name|lower }}
  version: {{ version }}

source:
  url: https://github.com/catboost/catboost/releases/download/v{{ version }}/catboost-R-Linux-{{ version }}.tgz  # [linux]
  sha256: d5be37a62dfae456ce03f1b419ac9ea7cde14eb3dadb7add0f42e8fd99a5d94f  # [linux]

  url: https://github.com/catboost/catboost/releases/download/v{{ version }}/catboost-R-Windows-{{ version }}.tgz  # [win]
  sha256: 19fe07e10435dd90b090f5e5dd7def1c7ad9de3f51f3ba287a9814bb43a9cd0d  # [win]

  url: https://github.com/catboost/catboost/releases/download/v{{ version }}/catboost-R-Darwin-{{ version }}.tgz  # [osx]
  sha256: 8dcf6f81b413bf8f41ff3563b515860763e808fe939f6f99d546988e2f7bd3fd  # [osx]

build:
  number: 0

requirements:
  build:
    - {{ posix }}zip               # [win]
  host:
    - r-base
    - r-jsonlite
  run:
    - r-base
    - r-jsonlite

test:
  commands:
    - $R -e "library('catboost')"  # [not win]
    - "\"%R%\" -e \"library('catboost')\""  # [win].

about:
  home: https://github.com/catboost/catboost
  license: Apache-2.0
  license_family: Apache
  license_file: LICENSE.txt
  summary: CatBoost is a machine learning algorithm that uses gradient boosting on decision trees. It is available as an open source library.
  doc_url: https://tech.yandex.com/catboost/doc/dg/concepts/about-docpage/

extra:
  recipe-maintainers:
    - conda-forge/r
    - curious-odd-man
