{% set version = '1.5.0' %}

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

source:
  fn: WikipediR_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/WikipediR_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/WikipediR/WikipediR_{{ version }}.tar.gz
  sha256: f8d0e6f04fb65f7ad9c1c068852a6a8b699ffe8d39edf1f3fa07d32d087e8ff0

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

requirements:
  build:
    - r-base
    - r-httr
    - r-jsonlite
  run:
    - r-base
    - r-httr
    - r-jsonlite

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

about:
  home: https://cran.r-project.org/web/packages/WikipediR
  license: MIT
  license_file: LICENSE
  summary: A wrapper for the MediaWiki API, aimed particularly at the Wikimedia 'production'
    wikis, such as Wikipedia. It can be used to retrieve page text, information about
    users or the history of pages, and elements of the category tree.

extra:
  recipe-maintainers:
    - ocefpaf
