{% set version = '3.0.3' %}

package:
  name: r-rotl
  version: {{ version }}

source:
  fn: rotl_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/rotl_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/rotl/rotl_{{ version }}.tar.gz
  sha256: 049a417ee10203339b3543fd97116b59de467344493f234d0d01c4b6ad7fd75d

build:
  number: 0
  script: R CMD INSTALL --build .
  skip: True  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-ape
    - r-assertthat >=0.1
    - r-httr
    - r-jsonlite
    - r-rentrez
    - r-rncl >=0.6.0
  run:
    - r-base
    - r-ape
    - r-assertthat >=0.1
    - r-httr
    - r-jsonlite
    - r-rentrez
    - r-rncl >=0.6.0

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

about:
  home: https://cran.r-project.org/package=rotl
  license: BSD 2 Clause
  license_file: LICENSE
  summary: An interface to the 'Open Tree of Life' API to retrieve phylogenetic trees, information
    about studies used to assemble the synthetic tree, and utilities to match taxonomic
    names to 'Open Tree identifiers'. The 'Open Tree of Life' aims at assembling a comprehensive
    phylogenetic tree for all named species.

extra:
  recipe-maintainers:
    - ocefpaf
