{% set version = '1.6' %}

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

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

source:
  fn: rmarkdown_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/rmarkdown_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/rmarkdown/rmarkdown_{{ version }}.tar.gz
  sha256: 8765875573a29622c822c6a6ab0c93afe418b49bf7aec0ba0dd3c55b7e81175d

build:
  number: 1
  skip: true  # [win32]

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - r-base
    - r-base64enc
    - r-catools
    - r-evaluate >=0.8
    - r-htmltools >=0.3.5
    - r-jsonlite
    - r-knitr >=1.14
    - r-rprojroot
    - r-stringr >=1.2.0
    - r-yaml >=2.1.5

  run:
    - r-base
    - r-base64enc
    - r-catools
    - r-evaluate >=0.8
    - r-htmltools >=0.3.5
    - r-jsonlite
    - r-knitr >=1.14
    - r-rprojroot
    - r-stringr >=1.2.0
    - r-yaml >=2.1.5

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

about:
  home: http://rmarkdown.rstudio.com
  license: GPL-3
  summary: Convert R Markdown documents into a variety of formats.
  license_family: GPL3

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - mdehollander
    - jdblischak
