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

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

  url: https://github.com/catboost/catboost/releases/download/v{{ version }}/catboost-R-Darwin-{{ version }}.tgz  # [osx]
  sha256: 7a44913a173dd43acd303c2985444295ca01520eff295c41e3319ee94a9afe3c  # [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:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - curious-odd-man
    - dbast
