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

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

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