{% set name = "r-catboost" %}
{% set version = "1.0.5" %}
{% 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: 23b7c73b6f34304584cb4480889304a6b8e0670b65413b40a3d1237a34389203  # [linux]

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

  url: https://github.com/catboost/catboost/releases/download/v{{ version }}/catboost-R-Darwin-{{ version }}.tgz  # [osx]
  sha256: 3266728dff0d99ed219f736c5bbe5325f5b163dd489b9600a4e55187541e4172  # [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
