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

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

source:
  fn: bookdown_{{ version }}.tar.gz
  url:
    - {{ cran_mirror }}/src/contrib/bookdown_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/bookdown/bookdown_{{ version }}.tar.gz
  sha256: b824d7beafea8be369dfd656a314dca36019d521cbfa39b82ff0fe405ce06eac

build:
  merge_build_host: True  # [win]
  number: 1
  skip: true  # [win32]
  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{posix}}zip               # [win]
  host:
    - r-base
    - r-htmltools >=0.3.6
    - r-knitr >=1.16
    - r-rmarkdown >=1.5
    - r-tinytex
    - r-xfun
    - r-yaml >=2.1.14
  run:
    - r-base
    - r-htmltools >=0.3.6
    - r-knitr >=1.16
    - r-rmarkdown >=1.5
    - r-tinytex
    - r-xfun
    - r-yaml >=2.1.14

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

about:
  home: https://github.com/rstudio/bookdown
  license: GPL-3
  summary: Output formats and utilities for authoring books and technical documents with R Markdown.
  license_family: GPL3
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-3'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-3'  # [win]

extra:
  recipe-maintainers:
    - bsennblad
    - ConorIA
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
    - dbast
