{% set version = '0.3.2' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-rvest
  version: {{ version|replace("-", "_") }}

source:
  fn: rvest_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/rvest_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/rvest/rvest_{{ version }}.tar.gz
  sha256: 0d6e8837fb1df79b1c83e7b48d8f1e6245f34a10c4bb6952e7bec7867e4abb12

build:
  number: 0
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-httr >=0.5
    - r-magrittr
    - r-selectr
    - r-xml2
  run:
    - r-base
    - r-httr >=0.5
    - r-magrittr
    - r-selectr
    - r-xml2

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

about:
  home: https://github.com/hadley/rvest
  license: GPL-3
  summary: Wrappers around the 'xml2' and 'httr' packages to make it easy to download, then manipulate,
    HTML and XML.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
