{% set version = "3.0.5" %}

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: 86dc67e466c3b45c681c48ffa65df5530e4677b9d3ac59b1d9369d77724838a2

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
