{% set version = '0.5.0' %}

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

source:
  fn: webshot_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/webshot_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/webshot/webshot_{{ version }}.tar.gz
  sha256: f0a1be8b0563d95550569a0620d546a9876d1e279a932e9293e4be57ff0f271f

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

requirements:
  build:
    - r-base
    - r-jsonlite
    - r-magrittr
    - r-processx
    - r-withr
  run:
    - r-base
    - r-jsonlite
    - r-magrittr
    - r-processx
    - r-withr

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

about:
  home: https://cran.r-project.org/web/packages/webshot
  license: GPL-2
  summary: Takes screenshots of web pages, including Shiny applications and R Markdown documents.

extra:
  recipe-maintainers:
    - ocefpaf
