{% set version = '1.4.0' %}

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

source:
  fn: WikidataR_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/WikidataR_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/WikidataR/WikidataR_{{ version }}.tar.gz
  sha256: 64b1d53d7023249b73a77a7146adc3a8957b7bf3d808ebd6734795e9f58f4b2a

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

requirements:
  build:
    - r-base
    - r-wikipedir >=1.4.0
    - r-httr
    - r-jsonlite
  run:
    - r-base
    - r-wikipedir >=1.4.0
    - r-httr
    - r-jsonlite

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

about:
  home: https://cran.r-project.org/web/packages/wikidatar
  license: MIT
  license_file: LICENSE
  summary: An API client for the Wikidata

extra:
  recipe-maintainers:
    - ocefpaf
