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

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

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

build:
  number: 0

requirements:
  build:
    - {{posix}}zip               # [win]
    # dummy requirement
    - make                       # [linux]
  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
