{% set version = '0.2.0' %}

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

source:
  fn: wikitaxa_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/wikitaxa_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/wikitaxa/wikitaxa_{{ version }}.tar.gz
  sha256: 944523717b2571af02a6bf15a58100dfb69530f702ab919f1c5fd3d263588c19

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

requirements:
  build:
    - r-base
    - r-wikidatar
    - r-crul >=0.3.4
    - r-curl
    - r-data.table
    - r-jsonlite
    - r-tibble
    - r-xml2

  run:
    - r-base
    - r-wikidatar
    - r-crul >=0.3.4
    - r-curl
    - r-data.table
    - r-jsonlite
    - r-tibble
    - r-xml2

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

about:
  home: https://cran.r-project.org/package=wikitaxa
  license: MIT
  license_file: LICENSE
  summary: 'Taxonomic information from Wikipedia, Wikicommons, Wikispecies, and
    Wikidata. Functions included for getting taxonomic information from each of
    the sources just listed, as well performing taxonomic search.'

extra:
  recipe-maintainers:
    - dpryan79
    - ocefpaf
