{% set version = "3.0.4" %}

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: 1de6766f3ae08b1234c632b9c9cd9e579d5d426dfa6a0a8c2da6ddfe502084fd

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

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

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
