{% set version = '0.1' %}

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

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

source:
  fn: printr_{{ version }}.tar.gz
  url:
    - https://cran.r-project.org/src/contrib/printr_{{ version }}.tar.gz
    - https://cran.r-project.org/src/contrib/Archive/printr/printr_{{ version }}.tar.gz
  sha256: e1109e5f7a2bbe04509ecf0bcbf178b62f0b7121d2e4cc3bdb7059ec38c3d88f

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

requirements:
  build:
    - r-base
    - r-knitr >=1.16

  run:
    - r-base
    - r-knitr >=1.16

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

about:
  home: https://yihui.name/printr
  license: GPL2 and GPL3
  summary: Extends the S3 generic function knit_print() in 'knitr' to automatically print some
    objects using an appropriate format such as Markdown or LaTeX. For example, data
    frames are automatically printed as tables, and the help() pages can also be rendered
    in 'knitr' documents.
  license_family: GPL
  license_file: '{{ environ["PREFIX"] }}/lib/R/share/licenses/GPL-2'  # [unix]
  license_file: '{{ environ["PREFIX"] }}\R\share\licenses\GPL-2'  # [win]

extra:
  recipe-maintainers:
    - johanneskoester
    - bgruening
    - daler
    - jdblischak
    - cbrueffer
